Repository navigation
Tools Orders
16 tools for managing orders, invoices, shipments, and credit memos.
Get order by increment ID.
| Parameter | Type | Default | Description |
|---|---|---|---|
incrementId |
string | required | Order increment ID |
fields |
string | "" |
Field filter |
Search orders with optional status filter and pagination.
| Parameter | Type | Default | Description |
|---|---|---|---|
status |
string | "" |
Filter by order status |
fields |
string | "" |
Field filter |
pageSize |
int | 20 | Results per page |
currentPage |
int | 1 | Page number |
sortField |
string | created_at |
Sort field |
sortDir |
string | DESC |
Sort direction |
count_only |
bool | false | Return count only |
Returns line items for an order.
Lists order status history and comments.
Add a comment to order history.
| Parameter | Type | Default | Description |
|---|---|---|---|
orderId |
int | required | Order entity ID |
comment |
string | required | Comment text |
status |
string | "" |
New status |
notifyCustomer |
bool | false | Send notification |
Create a new order from a guest quote — or for an existing customer via customerId — by adding line items by SKU, setting a billing/shipping address, and placing the order with the given shipping and payment methods. Disabled by default and blocked in production mode.
| Parameter | Type | Default | Description |
|---|---|---|---|
customerEmail |
string | required | Order email (ignored when customerId is set) |
items |
array | required | Line items; each has sku + qty, plus optional per-type option data (see below) |
firstname |
string | required | Billing / shipping first name |
lastname |
string | required | Billing / shipping last name |
street |
string | required | Street address |
city |
string | required | City |
postcode |
string | required | Postal code |
countryId |
string | required | Country code (e.g. US, DE) |
telephone |
string | required | Phone number |
region |
string | "" |
Region name (for regions without an ID) |
regionId |
int | 0 | Region ID (required for US states, etc.) |
shippingMethod |
string | flatrate_flatrate |
Shipping method code |
paymentMethod |
string | checkmo |
Payment method code |
customerId |
int | 0 | Attach to an existing customer account; 0 = guest order |
storeId |
int | 0 | Store view ID (0 = default) |
Simple, virtual and link-free downloadable products need only sku + qty. Option-bearing types carry extra, human-friendly keys on the item that are resolved to Magento's internal ids:
| Product type | Extra key | Shape |
|---|---|---|
| Configurable | super_attribute |
{"<attribute code or label>": "<option value or label>"} |
| Grouped | grouped_quantities |
{"<child sku>": qty} (the line qty is ignored) |
| Bundle | bundle_selections |
[{"selection_sku": string, "qty": number}] |
| Downloadable | links |
["<link id or title>", …] — only when links are sold separately; defaults to all |
| Any type | custom_options |
{"<option title or id>": value} — select choices by title/id (a list for checkbox/multiple); text/date/file pass through |
[
{"sku": "hoodie", "qty": 1, "super_attribute": {"Color": "Red", "Size": "L"}},
{"sku": "set-of-3", "grouped_quantities": {"child-a": 1, "child-b": 2}},
{"sku": "gift-bundle", "qty": 1, "bundle_selections": [{"selection_sku": "wrap", "qty": 1}]},
{"sku": "mug", "qty": 2, "custom_options": {"Engraving": "Happy Birthday"}}
]Cancel an order. Blocked in production mode.
Place an order on hold or release it.
Create an invoice for an order.
| Parameter | Type | Default | Description |
|---|---|---|---|
orderId |
int | required | Order entity ID |
capture |
bool | true | Capture payment |
notify |
bool | true | Send notification |
List invoices with optional order filter and pagination.
Create a shipment for an order.
| Parameter | Type | Default | Description |
|---|---|---|---|
orderId |
int | required | Order entity ID |
notify |
bool | true | Send notification |
List shipments with optional order filter and pagination.
Add tracking information to a shipment.
| Parameter | Type | Default | Description |
|---|---|---|---|
shipmentId |
int | required | Shipment ID |
carrierCode |
string | required | Carrier code |
title |
string | required | Carrier title |
trackNumber |
string | required | Tracking number |
Create a credit memo (refund) for an order. Blocked in production mode.
| Parameter | Type | Default | Description |
|---|---|---|---|
orderId |
int | required | Order entity ID |
notify |
bool | true | Send notification |
List credit memos with optional order filter and pagination.
Getting Started
Architecture
Tools Reference
- Overview (84 Tools)
- Introspection
- Catalog
- Orders
- Customers
- Database
- Logs & Diagnostics
- GraphQL
- Development
Configuration
Guidelines & Skills
Code Generation
Diagnostics
Security