Skip to main content
POST
/
api
/
v1
/
back-in-stock
Register Back-in-Stock Request
curl --request POST \
  --url https://api.sequenzy.com/api/v1/back-in-stock \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "productId": "<string>",
  "variantId": "<string>",
  "productTitle": "<string>",
  "variantTitle": "<string>",
  "customer": {}
}
'
{
  "success": true,
  "subscriberId": "sub_abc123"
}
Register a customer’s request to be notified when a product is back in stock. When a later product upsert marks the product or variant in stock again, the ecommerce.back_in_stock event fires for waiting subscribers, which can trigger automations. This is the Commerce API equivalent of the Shopify/WooCommerce storefront back-in-stock widgets. Call it from your own storefront or backend when a customer asks to be notified.

Request Body

productId
string
required
Your product identifier (the productId used when upserting products).
variantId
string
Your variant identifier. Defaults to productId for products without variants.
productTitle
string
Product title snapshot used in notifications. Defaults to the synced product title.
variantTitle
string
Variant title snapshot used in notifications. Defaults to the synced variant title.
customer
object
required
The customer requesting the notification. Requires email; also accepts externalId, firstName, lastName, and attributes. The subscriber is created if they don’t exist.
curl -X POST "https://api.sequenzy.com/api/v1/back-in-stock" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "productId": "SKU-PROTEIN-1KG",
    "variantId": "SKU-PROTEIN-1KG-VANILLA",
    "customer": { "email": "buyer@example.com" }
  }'

What Happens Next

  1. The subscriber is created (if needed) without triggering signup automations
  2. The ecommerce.back_in_stock_requested event is recorded
  3. When a product upsert marks the variant in stock again, the ecommerce.back_in_stock event fires and can start automations

Responses

{
  "success": true,
  "subscriberId": "sub_abc123"
}