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
string
required
The order’s ID.
Response
object
Show properties
Show properties
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
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
}
}