Subscribe to back-in-stock notifications
POST/api/v1/sdk/cart/store/:storeId/back-in-stock-subscription
This endpoint subscribes the authenticated customer to back-in-stock notifications for a specific product variant.
Authentication: Requires customer authentication (JWT token with verified phone). Optional API key for additional store validation.
Behavior:
- Customer will be notified via SMS/Email when product is back in stock
- If already subscribed, subscription is updated
- Subscription persists until product is back in stock or customer unsubscribes
Use Cases:
- Allowing customers to request notifications for out-of-stock items
- Product waitlist management
- Improving customer experience for popular products
Error Scenarios:
- 404 NOT FOUND - Product variant not found (Error code: VARIANT_NOT_FOUND)
- 400 BAD REQUEST - Product is already in stock or invalid request (Error code: PRODUCT_IN_STOCK or INVALID_REQUEST)
- 401 UNAUTHORIZED - Customer not authenticated (Error code: UNAUTHORIZED)
- 403 FORBIDDEN - API key doesn't have access to this store (Error code: NO_STORE_ACCESS)
Request​
Responses​
- 200
- 400
- 401
- 403
- 404
- 500
Subscription created successfully - customer will be notified when back in stock
Invalid request or product already in stock
Unauthorized - Customer authentication required
Forbidden - No access to this store
Product variant not found
Internal server error