# Magento Api

> Quick reference for Magento 2 REST and GraphQL API endpoints, searchCriteria syntax, and authentication patterns. Background knowledge — loaded automatically when working with Magento APIs.

- **Type:** Skill
- **Install:** `agentstack add skill-magendooro-magento-claude-skills-magento-api`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [magendooro](https://agentstack.voostack.com/s/magendooro)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [magendooro](https://github.com/magendooro)
- **Source:** https://github.com/magendooro/magento-claude-skills/tree/master/.claude/skills/magento-api

## Install

```sh
agentstack add skill-magendooro-magento-claude-skills-magento-api
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Magento API Reference

Provide quick-reference Magento 2 API information relevant to the tool the user is building or asking about. If the user specifies a domain (products, orders, customers, inventory, etc.), focus on that domain.

## REST API Endpoints

### Products / Catalog

| Operation | Method | Endpoint |
|-----------|--------|----------|
| Get product by SKU | GET | `/rest/V1/products/{sku}` |
| Search products | GET | `/rest/V1/products?searchCriteria[...]` |
| Get categories | GET | `/rest/V1/categories` |
| Get category by ID | GET | `/rest/V1/categories/{id}` |
| Product attributes | GET | `/rest/V1/products/attributes/{attributeCode}` |
| Product media | GET | `/rest/V1/products/{sku}/media` |
| Configurable options | GET | `/rest/V1/configurable-products/{sku}/options/all` |

### Orders

| Operation | Method | Endpoint |
|-----------|--------|----------|
| Get order by ID | GET | `/rest/V1/orders/{id}` |
| Search orders | GET | `/rest/V1/orders?searchCriteria[...]` |
| Order items | GET | `/rest/V1/orders/items?searchCriteria[...]` |
| Order comments | GET | `/rest/V1/orders/{id}/comments` |
| Invoices | GET | `/rest/V1/invoices?searchCriteria[...]` |
| Shipments | GET | `/rest/V1/shipments?searchCriteria[...]` |
| Credit memos | GET | `/rest/V1/creditmemos?searchCriteria[...]` |

### Customers

| Operation | Method | Endpoint |
|-----------|--------|----------|
| Get customer by ID | GET | `/rest/V1/customers/{id}` |
| Search customers | GET | `/rest/V1/customers/search?searchCriteria[...]` |
| Customer groups | GET | `/rest/V1/customerGroups/search?searchCriteria[...]` |
| Customer addresses | GET | `/rest/V1/customers/{id}/billingAddress` |

### Inventory / Stock

| Operation | Method | Endpoint |
|-----------|--------|----------|
| Stock item by SKU | GET | `/rest/V1/stockItems/{sku}` |
| Source items | GET | `/rest/V1/inventory/source-items?searchCriteria[...]` |
| Stock status (MSI) | GET | `/rest/V1/inventory/get-product-salable-qty/{sku}/{stockId}` |
| Sources | GET | `/rest/V1/inventory/sources?searchCriteria[...]` |
| Stocks | GET | `/rest/V1/inventory/stocks?searchCriteria[...]` |

### CMS

| Operation | Method | Endpoint |
|-----------|--------|----------|
| CMS pages | GET | `/rest/V1/cmsPage/search?searchCriteria[...]` |
| CMS blocks | GET | `/rest/V1/cmsBlock/search?searchCriteria[...]` |

### Store / Config

| Operation | Method | Endpoint |
|-----------|--------|----------|
| Store configs | GET | `/rest/V1/store/storeConfigs` |
| Store groups | GET | `/rest/V1/store/storeGroups` |
| Websites | GET | `/rest/V1/store/websites` |
| Modules | GET | `/rest/V1/modules` |

## searchCriteria Pattern

Magento uses a standard searchCriteria query pattern for list endpoints:

```
?searchCriteria[filterGroups][0][filters][0][field]=status
&searchCriteria[filterGroups][0][filters][0][value]=processing
&searchCriteria[filterGroups][0][filters][0][conditionType]=eq
&searchCriteria[pageSize]=20
&searchCriteria[currentPage]=1
&searchCriteria[sortOrders][0][field]=created_at
&searchCriteria[sortOrders][0][direction]=DESC
```

Condition types: `eq`, `neq`, `gt`, `gteq`, `lt`, `lteq`, `like`, `in`, `notnull`, `null`, `from`, `to`.

## GraphQL Queries

### Products

```graphql
{
  products(search: "jacket", filter: { price: { from: "10", to: "100" } }, pageSize: 20) {
    items {
      sku
      name
      price_range { minimum_price { final_price { value currency } } }
      stock_status
    }
    total_count
  }
}
```

### Categories

```graphql
{
  categories(filters: { ids: { eq: "2" } }) {
    items { id name children { id name url_path } }
  }
}
```

### Customer Orders (authenticated)

```graphql
{
  customer {
    orders(filter: { number: { eq: "000000001" } }) {
      items {
        order_number
        status
        total { grand_total { value currency } }
        items { product_name quantity_ordered }
      }
    }
  }
}
```

## Authentication

- **REST**: Bearer token via `Authorization: Bearer ` header. Admin tokens from `POST /rest/V1/integration/admin/token`. Customer tokens from `POST /rest/V1/integration/customer/token`.
- **GraphQL**: Same bearer token in header. Customer queries require customer token. Admin-only queries (orders list, customer search) require admin token or integration token.
- **Integration tokens**: Long-lived, configured in Admin > System > Integrations. Preferred for MCP server use.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [magendooro](https://github.com/magendooro)
- **Source:** [magendooro/magento-claude-skills](https://github.com/magendooro/magento-claude-skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-magendooro-magento-claude-skills-magento-api
- Seller: https://agentstack.voostack.com/s/magendooro
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
