Create an Intent
Create a new intent for a customer to be notified when a product is back in stock. Unlike other API endpoints for Back in Stock, this API endpoint does not require an API Key.
Header parameters
X-Shopify-Shop-DomainstringRequired
The Shopify shop domain (e.g. 'restock-rocket-demo.myshopify.com')
Content-Typestring · enumRequiredPossible values:
Must be application/json
Body
Responses
200
Request processed but with errors
application/json
201
Intent created successfully
application/json
400
Bad request
401
Unauthorized
post
POST /api/v1/intents.json HTTP/1.1
Host: app.stoqapp.com
X-Shopify-Shop-Domain: text
Content-Type: application/json
Accept: */*
Content-Length: 437
{
"intent": {
"shopify_variant_id": 1,
"shopify_product_id": 1,
"shopify_market_id": 1,
"channel": "email",
"quantity": 1,
"source": "api"
},
"customer": {
"id": "text",
"name": "text",
"email": "text",
"phone": "text",
"push": "text",
"country_code": "text",
"country": "text",
"accepts_marketing": true,
"locale": "text",
"shopify_market_id": 1,
"shopify_customer_id": "text"
},
"product": {
"variant_count": 1,
"title": "text",
"variant_title": "text",
"vendor": "text",
"sku": "text"
}
}
{
"errors": [
"text"
]
}
Last updated