Coming soon

The Storefront API isn’t open to developers yet. This is a preview of the docs, and details may change before launch.

Guides

Analytics events

Send shopper activity so it appears in the merchant's Storepecker analytics, like visits to their own website.

POST /v1/events → 202 Accepted

{ "type": "page_view", "visitor_id": "4f9c2e1a-…", "path": "/shop/blue-mug-large",
  "referrer": "https://instagram.com/", "utm": { "source": "instagram", "campaign": "diwali" } }
{ "type": "add_to_cart", "visitor_id": "4f9c2e1a-…", "variant_id": "var_…", "quantity": 2, "value": 99800 }
FieldMeaning
typepage_view, add_to_cart, remove_from_cart, checkout_started, address_entered, shipping_selected, payment_selected, payment_initiated
visitor_idYour stable anonymous ID for the visitor (a UUID in a first-party cookie); letters, digits and dashes, up to 50
pathRequired for page_view. Use /shop/{variant_slug} for product pages so they count as product views
referrer, utm, click_idsOptional campaign attribution (utm keys: source, medium, campaign, term, content)
variant_id, quantity, valueFor cart events; value in the smallest currency unit

From your server, send the shopper's X-Buyer-IP and X-Buyer-User-Agent (see Keys and security); bots and crawlers are dropped automatically.