curl 'http://localhost:9000/vendor/orders/order_01HXYZABCDEF/preview' \
-H 'Authorization: Bearer <token>' \
-H 'x-seller-id: <seller_id>'
const { order } = await client.vendor.orders.$id.preview.query({
$id: "order_01HXYZABCDEF",
})
{
"order": {
"id": "order_01HXYZABCDEF",
"display_id": 42,
"status": "pending",
"items": [
{
"id": "ordli_01HXYZABCDEF",
"title": "T-Shirt / M",
"quantity": 1,
"unit_price": 2500
}
],
"order_change": {
"id": "ordch_01HXYZABCDEF",
"change_type": "edit",
"status": "pending"
},
"total": 2500
}
}
Orders
Preview Order
Preview the order with its pending order change applied.
GET
/
vendor
/
orders
/
{id}
/
preview
curl 'http://localhost:9000/vendor/orders/order_01HXYZABCDEF/preview' \
-H 'Authorization: Bearer <token>' \
-H 'x-seller-id: <seller_id>'
const { order } = await client.vendor.orders.$id.preview.query({
$id: "order_01HXYZABCDEF",
})
{
"order": {
"id": "order_01HXYZABCDEF",
"display_id": 42,
"status": "pending",
"items": [
{
"id": "ordli_01HXYZABCDEF",
"title": "T-Shirt / M",
"quantity": 1,
"unit_price": 2500
}
],
"order_change": {
"id": "ordch_01HXYZABCDEF",
"change_type": "edit",
"status": "pending"
},
"total": 2500
}
}
Returns a preview of the order as it would look once the currently active order change (e.g. a pending edit, return, or exchange) is confirmed.
Path parameters
The order’s ID.
Response
Show properties
Show properties
The order’s ID.
Human-readable order number.
The order’s status.
Line items with pending change actions applied.
Shipping methods with pending change actions applied.
The active order change being previewed.
Projected order total after the change.
curl 'http://localhost:9000/vendor/orders/order_01HXYZABCDEF/preview' \
-H 'Authorization: Bearer <token>' \
-H 'x-seller-id: <seller_id>'
const { order } = await client.vendor.orders.$id.preview.query({
$id: "order_01HXYZABCDEF",
})
{
"order": {
"id": "order_01HXYZABCDEF",
"display_id": 42,
"status": "pending",
"items": [
{
"id": "ordli_01HXYZABCDEF",
"title": "T-Shirt / M",
"quantity": 1,
"unit_price": 2500
}
],
"order_change": {
"id": "ordch_01HXYZABCDEF",
"change_type": "edit",
"status": "pending"
},
"total": 2500
}
}
⌘I