Subscribe to a product
"Let me know": the shopper gets an e-mail when the product is back in
stock or its price drops (through the store's journey for
inventory.back_in_stock / products.price_dropped). Creates the contact
if the e-mail is new, with marketing consent only when
marketing_opt_in is true. Signing up again reactivates the
subscription.
Path Parameters
Store slug
Product id or slug
Header Parameters
A unique value (e.g. a UUID) per logical request. Retrying with the same key within 24 hours replays the first response instead of repeating the side effect; the replay carries Idempotent-Replayed: true. Reusing a key for a different request is a 422 idempotency_key_reused; retrying while the first is still running is a 409 idempotency_request_in_progress. JSON bodies up to 1 MB.
length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/storefront-api/string/api/products/string/subscribe" \ -H "Content-Type: application/json" \ -d '{ "email": "string" }'{
"message": "string",
"ok": true
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}{
"code": "not_found",
"details": {},
"error": "Order not found"
}