vex_orders
Manage Vendure orders and draft orders: list or fetch orders, create drafts, add items, assign customers, transition states, and cancel orders.
Instructions
Manage Vendure orders and draft orders.
Actions:
list: List orders with optional code filter.
get: Get a single order by ID with full details.
create_draft: Create a new draft order.
add_item: Add a product variant to a draft order.
set_customer: Set the customer for a draft order.
transition: Transition an order to a new state.
cancel: Cancel an order.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"action": "<action>"
},
"name": "vex_orders"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | Order ID | |
| env | No | Target env name (default: VEX_ENV, else active). | |
| skip | No | Items to skip (default 0). | |
| take | No | Items per page (default 20). | |
| state | No | Target order state (e.g. 'ArrangingPayment', 'PaymentSettled', 'Shipped', 'Delivered') | |
| action | Yes | Operation to perform; see description for valid values. | |
| reason | No | Cancellation reason | |
| orderId | No | Draft order ID | |
| quantity | No | Quantity to add | |
| customerId | No | Customer ID to assign | |
| filterByCode | No | Filter by order code (contains) | |
| productVariantId | No | Product variant ID to add |