canonical: https://jentic.com/apis/magento.com/magento

# Magento 2 API

Jentic publishes the only available OpenAPI specification for Magento 2 API, keeping it validated and agent-ready. Magento 2 (now Adobe Commerce) is a major open-source e-commerce platform whose REST API exposes products, categories, orders, customers, carts, invoices, shipments, credit memos, stock items and CMS content. The spec covers 24 endpoints spanning the catalogue, checkout, fulfilment and content layers of a Magento store, plus admin and customer token issuance for authenticated access.

## For AI agents

Manage Magento 2 catalogues, orders, customers, carts and CMS content through 24 REST endpoints covering the full storefront lifecycle.

## Scope

Does not handle payment processing, marketing automation, or B2B price-list management - use for catalogue, order, customer, inventory and CMS operations on a Magento store only.

## Capabilities

- Manage product listings via /products endpoints supporting list, create, retrieve by SKU, update and delete
- Maintain category hierarchies through /categories with full create, retrieve, update and delete coverage
- Process and fulfil sales orders, invoices, shipments and credit memos via dedicated endpoints
- Issue admin and customer access tokens through /integration/admin/token and /integration/customer/token
- Track and adjust stock levels with /stockItems endpoints for warehouse and fulfilment workflows
- Publish and update storefront content via /cmsPage and /cmsBlock endpoints
- Read and update shopping carts through /carts to support guest and authenticated checkout flows

## Use cases

### Catalogue Management

Run bulk product and category operations against a Magento storefront. POST /products creates new SKUs, GET /products lists existing ones, and PUT /products/{sku} applies attribute changes such as price, stock or description. The /categories endpoints maintain the merchandising hierarchy. Suitable for ops teams syncing product data from a PIM or running seasonal price changes.

Example prompt: POST /products with the new SKU payload and then PUT /categories/{id} to attach the SKU to the seasonal landing category

### Order and Fulfilment Processing

Drive the order-to-cash flow against Magento orders. GET /orders polls new orders, POST /invoices issues an invoice once payment captures, POST /shipments creates a shipment when goods leave the warehouse, and POST /creditmemos handles refunds. The agent can chain these calls to deliver a fully automated fulfilment pipeline.

Example prompt: Poll GET /orders for new entries, POST /invoices to invoice the order, then POST /shipments when goods are dispatched

### Stock and Inventory Sync

Keep Magento stock levels aligned with an external warehouse system. GET /stockItems lists current stock records, POST /stockItems creates a record for a new SKU, and PUT /stockItems/{id} updates the quantity. The agent can run this on a schedule to push warehouse counts into Magento before storefront browsing reflects out-of-stock states.

Example prompt: PUT /stockItems/{id} for every SKU with a changed quantity in the warehouse export feed

### Customer Account Administration

Manage customer records and authentication for support and onboarding workflows. GET /customers lists accounts, POST /customers provisions new ones, and POST /integration/customer/token issues a customer-scoped access token for delegated calls. Useful for support agents resetting accounts or onboarding flows that import bulk customer data.

Example prompt: POST /customers to create the new account, then POST /integration/customer/token to mint a session token for the storefront

### AI Agent Storefront Operations

Let an AI agent operate a Magento storefront end-to-end without holding raw admin credentials. Through Jentic the agent searches for catalogue, order or stock operations, loads the schema for the relevant /products, /orders or /stockItems endpoint, and executes with credentials brokered by the vault. Suitable for retail ops assistants and merchandising bots.

Example prompt: Search Jentic for 'create a magento product', load POST /products, and execute with the agent-provided SKU and price payload

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /products | Create a new product |
| PUT | /products/{sku} | Update a product by SKU |
| GET | /orders | List orders |
| POST | /invoices | Issue an invoice |
| POST | /shipments | Create a shipment record |
| POST | /creditmemos | Create a credit memo for refunds |
| PUT | /stockItems/{id} | Update stock quantity |
| POST | /integration/admin/token | Get an admin access token |

## Key resources

- **Products** — Full CRUD over catalogue products via /products and /products/{sku}
- **Categories** — Manage merchandising categories via /categories
- **Orders** — Read and write sales orders via /orders
- **Customers** — Manage customer accounts via /customers
- **Carts** — Read and update shopping carts via /carts
- **Invoices and Shipments** — Issue invoices, shipments and credit memos via /invoices, /shipments, /creditmemos
- **Stock Items** — Adjust inventory levels via /stockItems
- **CMS** — Publish CMS pages and blocks via /cmsPage and /cmsBlock

## Why Jentic

- **Setup:** Wiring the Magento 2 API by hand means obtaining an admin token from /integration/admin/token, sending it as a bearer on every request, and pointing at your own store's /rest/V1 host across product, order, invoice, and stock paths. Through Jentic you install once, import the Magento 2 API from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Magento puts the product SKU in the URL path (/products/{sku}), so a rule can pin your agent to updating one product and nothing else. You choose the operations it may call, so financial ones like issuing invoices or creating credit memos are not included unless you add them.
- **Credential handling:** Your Magento token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'create a Magento product' or 'issue a Magento refund', and Jentic returns the matching Magento operation with its input schema so the agent calls the right endpoint without browsing the Magento docs.

## Related APIs

- **Shopify Admin API** — Hosted SaaS storefront with strong app ecosystem and managed infra
- **Stripe API** — Card processing and recurring billing alongside Magento orders
- **SendGrid Mail API** — Transactional email delivery for order confirmations and shipping notices

## FAQ

### Why is there no official OpenAPI spec for Magento 2 API?

Adobe Commerce does not publish a curated OpenAPI specification for Magento 2 - its docs use a custom Swagger-style schema generator. Jentic generates and maintains this spec so AI agents and developers can call the Magento REST API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the Magento 2 API use?

The API uses bearer tokens (the BearerAuth scheme in the spec). Tokens are minted by POSTing to /integration/admin/token (admin scope) or /integration/customer/token (customer scope). Through Jentic these tokens are stored encrypted in your Jentic One instance, so an agent calls /products or /orders with a scoped token rather than handling raw credentials.

### Can I create products and categories through the Magento 2 API?

Yes. POST /products creates a SKU and POST /categories creates a category, both at the {store_url}/rest/V1 base path. PUT /products/{sku} and PUT /categories/{id} apply updates, and DELETE handles removal. The same pattern applies to customers, carts, invoices, shipments and CMS content.

### What are the rate limits for the Magento 2 API?

Magento does not enforce platform-wide REST rate limits in the spec; limits are typically driven by the underlying server's configuration and any rate-limiting Adobe Commerce Cloud or Fastly applies in front of the store. For high-volume sync workloads, batch via /products and stagger calls based on your store's observed throughput.

### How do I update inventory levels with the Magento 2 API through Jentic?

Run pip install jentic, search for 'update magento stock', and Jentic surfaces PUT /stockItems/{id} with its input schema. Execute with the SKU stock item id and the new quantity, and Jentic returns the updated stock record. The same flow works for batch updates by iterating over the warehouse export.

### Can the Magento 2 API issue refunds?

Yes. POST /creditmemos creates a credit memo against an existing order, which is the canonical Magento mechanism for refunds. Pair this with PUT /orders/{id} to update the order state if a partial refund or comment is needed.

### Can I limit what my agent is allowed to do with the Magento 2 API?

Yes. Jentic One is self-hosted, so your own rules decide which Magento operations and credentials the agent may use. Because Magento puts the product SKU in the URL path (/products/{sku}), a rule can pin the agent to updating a single product and nothing else. You also choose exactly which operations it may call, so financial actions like POST /invoices or POST /creditmemos are excluded unless you explicitly add them.
