canonical: https://jentic.com/apis/vtex.local/orders-api

# Vtex Orders API

Each purchase a customer makes in your store generates an [order](https://help.vtex.com/en/tutorial/order-flow-and-status--tutorials_196) on VTEX. With the Orders API, you can view orders statuses and manage multiple aspects involved in order fulfillment, such as financial transactions, invoicing, shipping, and subscriptions. You can also [modify orders](https://developers.vtex.com/docs/api-refere. The API exposes 35 endpoints secured with apiKey authentication.

## For AI agents

Programmatically get order, get orders by order group id. Covers 35 operations with apiKey authentication.

## Scope

Does not handle payments, communications, or crm - use for e-commerce only.

## Capabilities

- Get order
- List orders
- Start handling order
- Cancel order
- Register modifications on order
- Add log in orders

## Use cases

### E-Commerce Operations

Use the Orders API to perform e commerce operations programmatically. The API provides 35 endpoints covering core functionality including get order, get orders by order group id, list orders.

Example prompt: Call GET `/api/oms/pvt/orders/{orderId}` to get order

### Automated Orders Management

Automate orders operations by combining multiple Orders API endpoints. Agents can get orders by order group id and then list orders in a single workflow.

Example prompt: Call GET `/api/oms/pvt/orders/order-group/{orderGroup}` to get orders by order group id, then verify the result

### AI Agent Integration via Jentic

AI agents discover and call Orders API endpoints through Jentic without managing credentials directly. An agent searches for the required operation by intent, receives the matching endpoint schema, and executes the call with Jentic-managed authentication. This eliminates the need to read API documentation or handle apiKey tokens manually.

Example prompt: Search Jentic for 'get order', load the operation schema, and execute with Jentic-managed credentials

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/api/oms/pvt/orders/{orderId}` | Get order |
| GET | `/api/oms/pvt/orders/order-group/{orderGroup}` | Get orders by order group ID |
| GET | `/api/oms/pvt/orders` | List orders |
| POST | `/api/oms/pvt/orders/{orderId}/start-handling` | Start handling order |
| POST | `/api/oms/pvt/orders/{orderId}/cancel` | Cancel order |
| POST | `/api/oms/pvt/orders/{orderId}/changes` | Register modifications on order |
| POST | `/api/oms/pvt/orders/{orderId}/interactions` | Add log in orders |
| POST | `/api/oms/pvt/orders/{orderId}/invoice` | Order invoice notification |

## Key resources

- **Orders** — Operations related to Orders
- **Order modifications** — Operations related to Order modifications
- **Invoice** — Operations related to Invoice
- **Tracking** — Operations related to Tracking
- **Conversation** — Operations related to Conversation

## Why Jentic

- **Setup:** Wiring the VTEX Orders API by hand means pairing an App Key with an App Token in the X-VTEX-API-AppKey and X-VTEX-API-AppToken headers, and templating the {accountName} and {environment} host into every call. Through Jentic you install once, import the Orders API from the API Directory, store the App Key and App Token once, and your agent calls it.
- **Permission scoping:** The Orders API puts the order id in the URL path (`/api/oms/pvt/orders/{orderId}`), so a rule can pin your agent to one order and the actions under it. You choose the operations it may call, so destructive ones like cancelling an order are not included unless you add them.
- **Credential handling:** Your VTEX App Key and App Token are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'get an order by id' or 'start handling an order', and Jentic returns the matching Orders API operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **Shopify** — Alternative e commerce API
- **Stripe** — Alternative e commerce API

## FAQ

### What authentication does the Orders API use?

The Orders API uses an API key passed in the `X-VTEX-API-AppKey` header. Through Jentic, these credentials are stored encrypted in your Jentic One instance and injected at execution time, so raw secrets never enter the agent context.

### Can I get order with the Orders API?

Yes. Use the GET `/api/oms/pvt/orders/{orderId}` endpoint. The API returns structured JSON responses that agents can parse and act on directly.

### What are the rate limits for the Orders API?

Rate limits are not specified in the OpenAPI spec. Check the vendor documentation for current limits. Through Jentic, rate limiting is handled automatically with retry logic built into the execution layer.

### How do I get order through Jentic?

Install the Jentic SDK with pip install jentic, authenticate through Jentic One, the self-hosted execution layer, then search for 'get order'. Jentic returns the matching Orders API operation with its input schema. Load the schema and execute the call - credentials are injected automatically.

### How many endpoints does the Orders API have?

The Orders API exposes 35 endpoints covering orders, order modifications, invoice operations.

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

Yes. Jentic One is self-hosted by you, so your own rules decide which Orders API operations and credentials the agent may use. Because the order id sits in the URL path at `/api/oms/pvt/orders/{orderId}`, you can pin the agent to a single order and the actions under it. You also choose the operations it may call, so a destructive endpoint like POST `/api/oms/pvt/orders/{orderId}/cancel` stays off limits unless you explicitly add it.
