Skip to main content
POST
Register Back-in-Stock Request
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

string
required
Your product identifier (the productId used when upserting products).
string
Your variant identifier. Defaults to productId for products without variants.
string
Product title snapshot used in notifications. Defaults to the synced product title.
string
Variant title snapshot used in notifications. Defaults to the synced variant title.
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.

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