Check a new order without saving it
preview_orderCheck a new order without saving it. Returns what creating this order would do: problems, the shipping options and their prices, the wallet hold and stock shortages. Takes the same fields as the order itself; the body is optional (an empty body is checked as an empty order). Nothing is saved or charged, and it works while the account is on hold. It checks new orders only. The result includes a previewToken for exactly this order, which creating the order requires. Needs the orders:read permission.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "preview_order"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| city | No | ||
| lines | No | The items in the order | |
| address1 | No | ||
| address2 | No | ||
| province | No | ||
| buyerNote | No | ||
| channelId | No | A shipping option from an order preview (shippingOptions[].channelId). Leave empty to use your shipping preference for the country. | |
| postalCode | No | ||
| countryCode | No | Two-letter country code, for example US | |
| storeOrderNo | No | Your store's order number, unique among your orders. Leave empty to use our order number. | |
| recipientName | No | ||
| recipientEmail | No | ||
| recipientPhone | No | ||
| recipientCompany | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | ||
| previewToken | Yes | Required to create exactly this order |