curl 'http://localhost:9000/vendor/products/prod_01HXYZ/preview' \
-H 'Authorization: Bearer <token>' \
-H 'x-seller-id: <seller_id>'
const { product_change } = await client.vendor.products.$id.preview.query({
$id: "prod_01HXYZ",
})
{
"product_change": {
"id": "prodch_01HXYZ",
"product_id": "prod_01HXYZ",
"status": "pending",
"actions": [
{
"id": "prodchact_01HXYZ",
"action": "UPDATE",
"details": { "title": "Acme T-Shirt v2" },
"applied": false
}
]
}
}
Products
Preview Product Change
Retrieve the seller’s pending change request for a product.
GET
/
vendor
/
products
/
{id}
/
preview
curl 'http://localhost:9000/vendor/products/prod_01HXYZ/preview' \
-H 'Authorization: Bearer <token>' \
-H 'x-seller-id: <seller_id>'
const { product_change } = await client.vendor.products.$id.preview.query({
$id: "prod_01HXYZ",
})
{
"product_change": {
"id": "prodch_01HXYZ",
"product_id": "prod_01HXYZ",
"status": "pending",
"actions": [
{
"id": "prodchact_01HXYZ",
"action": "UPDATE",
"details": { "title": "Acme T-Shirt v2" },
"applied": false
}
]
}
}
Returns the seller’s
pending change request for the product, or null when there is none.
Path parameters
The product’s ID.
Response
Show properties
Show properties
The change request’s ID.
ID of the product the change targets.
Always
pending for this endpoint.ID of the seller that staged the change.
Staged operations, each with
id, action, details, ordering, and applied.Internal note attached to the change.
Note from the operator, e.g. a revision request.
curl 'http://localhost:9000/vendor/products/prod_01HXYZ/preview' \
-H 'Authorization: Bearer <token>' \
-H 'x-seller-id: <seller_id>'
const { product_change } = await client.vendor.products.$id.preview.query({
$id: "prod_01HXYZ",
})
{
"product_change": {
"id": "prodch_01HXYZ",
"product_id": "prod_01HXYZ",
"status": "pending",
"actions": [
{
"id": "prodchact_01HXYZ",
"action": "UPDATE",
"details": { "title": "Acme T-Shirt v2" },
"applied": false
}
]
}
}
⌘I