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
string
required
The product’s ID.
Response
object | null
Show properties
Show properties
string
The change request’s ID.
string
ID of the product the change targets.
string
Always
pending for this endpoint.string
ID of the seller that staged the change.
object[]
Staged operations, each with
id, action, details, ordering, and applied.string
Internal note attached to the change.
string
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
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
}
]
}
}