Record Click
/admin/clicksRecords that visitorId arrived on the store's link code, as a visit to /r/ on the store's domain does, for a merchant whose own site the visitor arrived on. Arrivals of one visitor on a link less than a minute apart count once. recorded is false when code names no live link of the store: an unknown or archived one. To credit the visitor's order, name the same visitorId when creating its headless checkout session.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
case-sensitive base62 (A-Z, a-z, 0-9)
2 <= length <= 32^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/admin/clicks" \ -H "Content-Type: application/json" \ -d '{ "code": "string", "visitorId": "string" }'{ "recorded": true}List Links GET
Every link of the store, archived ones included: those with an archivedAt. A link is shared on the store's own domain as /r/<code>, and as /r/<code>?to=<destinationPath>, URL-encoded, when its destination is not /: a visitor lands on the page the URL names, or on / when it names none, whatever the link's destinationPath.
Add Coupon POST
A new coupon. A "percentage" discount's amount is a percent from 0 to 100, so 15 takes 15% off, not 0.15. A "fixed" discount's amountInMinorUnits comes off the cart's subtotal, and never more than it. Its code must be one no other live coupon of the store has. scope {"_tag":"store"} takes the discount off the whole cart; {"_tag":"chosen","productIds":[...],"variantIds":[...]} (ids from ListStoreVariants, at least one and at most 100 together) takes it off only the cart lines of those products and variants: a percentage off each such line, a fixed amount shared between them and never more than they cost, and a cart holding none of them is refused the coupon.
