Create an Intent

Create Customer Intent to Buy Product

post

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 · enumRequired

Must be application/json

Possible values:
Body
Responses
200
Request processed but with errors
application/json
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