Create or update store
PUT/api/v1/stores/{store_id}
Creates the store with your ID, or updates it. The first call for a web shop.
Responds 201 when the store was created and 200 when it was updated. You choose the store's ID yourself (e.g. butik-se) and it never changes: everything else in e-commerce sits under /stores/{store_id}.
With domain, links to the shop in the workspace's mailings get the parameter qn_cid=<campaign id>. Save it in the shop when the customer arrives and send it as campaign_id on the order, and the order counts as the campaign's revenue.
Scope
ecommerce:writeEdit e-commerce – the person behind the key must be editor or higher.
Path parameters
store_idstringrequired- The store's ID, which you choose.
Body
JSON, Content-Type: application/json. Unknown fields return 422.
namestringrequired- The store's name, as shown in the app.at least 1 characters · at most 200 characters
domainstring | null- The store's domain, e.g. butik.se. Links there (and to subdomains) in the workspace's mailings get qn_cid=<campaign ID>, which the shop sends back as campaign_id on the order.at most 253 characters
currencystringrequired- The store's currency (ISO 4217). Orders and carts without a currency of their own get it.
Retrying a request
PUT creates or updates using the shop's own ID: the same call twice gives the same result, so it can always be repeated. Batch and idempotency
Response
200 The store (201 if it was created).
idstringrequired- The store's ID.
namestringrequireddomainstring | nullrequiredcurrencystringrequiredcountsobjectrequired- How much the store has sent in.
counts.customersintegerrequiredcounts.productsintegerrequiredcounts.ordersintegerrequiredcounts.cartsintegerrequiredcreated_atstring (time, ISO 8601)required- When the store was created.
updated_atstring (time, ISO 8601)required- When the store was last changed.
Errors
- 400
- bad_request
- 429
- rate_limited