Skip to content
Coritan Docs

Organization API: Commerce Store API: Store

The 41 Organization API operations for store.

View as Markdown

Part of Commerce Store API.

Method Path Summary
GET /api/v1/orgs/{org_slug}/store Store info
POST /api/v1/orgs/{org_slug}/store/affiliates/hits One click on a referral link today (UTC); 204 whether or not the code counted
GET /api/v1/orgs/{org_slug}/store/affiliates/me The shopper's own affiliate record and the program's terms
POST /api/v1/orgs/{org_slug}/store/affiliates/me Make the shopper an affiliate with the code they ask for, or one made up
POST /api/v1/orgs/{org_slug}/store/affiliates/me/claims Claim the next reward the shopper has earned
GET /api/v1/orgs/{org_slug}/store/affiliates/program The program's public terms, for the storefront's cookie and its signup page
GET /api/v1/orgs/{org_slug}/store/affiliates/validate {valid}: whether the code belongs to an active affiliate while the program is on
POST /api/v1/orgs/{org_slug}/store/carts A cart in the key's mode and sales channel, in a region and its currency
GET /api/v1/orgs/{org_slug}/store/carts/recover The cart an abandoned cart or failed payment email links to, while it is open
GET /api/v1/orgs/{org_slug}/store/carts/{cart_id} Get cart
PATCH /api/v1/orgs/{org_slug}/store/carts/{cart_id} Email, addresses, region or country (re-prices every line), note, locale, metadata
POST /api/v1/orgs/{org_slug}/store/carts/{cart_id}/complete Place the cart's order: {"order", "accesstoken"}
GET /api/v1/orgs/{org_slug}/store/carts/{cart_id}/fees Every fee the cart is offered, with selected: the same list as the cart's fees
POST /api/v1/orgs/{org_slug}/store/carts/{cart_id}/fees/{code} Select an offered fee
DELETE /api/v1/orgs/{org_slug}/store/carts/{cart_id}/fees/{code} Turn an offered fee off; the choice is kept even for a fee on by default
POST /api/v1/orgs/{org_slug}/store/carts/{cart_id}/gift-cards Apply a gift card by its code: 10 attempts per 10 minutes per cart and per client IP
DELETE /api/v1/orgs/{org_slug}/store/carts/{cart_id}/gift-cards/{gift_card_id} Remove gift card
POST /api/v1/orgs/{org_slug}/store/carts/{cart_id}/line-items Add a variant; the same variant with the same metadata merges into its line
PATCH /api/v1/orgs/{org_slug}/store/carts/{cart_id}/line-items/{line_id} Set a line's quantity; 0 removes it
DELETE /api/v1/orgs/{org_slug}/store/carts/{cart_id}/line-items/{line_id} Delete line item
GET /api/v1/orgs/{org_slug}/store/carts/{cart_id}/payment-providers The providers that can take this cart's payment, and whether it needs one
POST /api/v1/orgs/{org_slug}/store/carts/{cart_id}/payment-sessions Start the payment with provider, or refresh the one already started for the same amount
POST /api/v1/orgs/{org_slug}/store/carts/{cart_id}/promotions Apply a code
DELETE /api/v1/orgs/{org_slug}/store/carts/{cart_id}/promotions Remove a code, named in the body {"code"} or as ?code=
POST /api/v1/orgs/{org_slug}/store/carts/{cart_id}/shipping-methods Choose an option; it replaces the method its shipping profile had
GET /api/v1/orgs/{org_slug}/store/carts/{cart_id}/shipping-options The options the cart's address and items allow, priced for them, per shipping profile
GET /api/v1/orgs/{org_slug}/store/categories The active, public categories as a tree
GET /api/v1/orgs/{org_slug}/store/categories/{handle} Get category
GET /api/v1/orgs/{org_slug}/store/collections List collections
GET /api/v1/orgs/{org_slug}/store/collections/{handle} A published collection; its products are /store/products?collectionhandle=
POST /api/v1/orgs/{org_slug}/store/leads Record a sign-up
POST /api/v1/orgs/{org_slug}/store/leads/impressions One more view of a popup design today (UTC)
POST /api/v1/orgs/{org_slug}/store/orders/lookup Look up orders
GET /api/v1/orgs/{org_slug}/store/orders/{order_id} Get order
GET /api/v1/orgs/{org_slug}/store/orders/{order_id}/documents The invoice and credit notes, as issued by the seller of record
GET /api/v1/orgs/{org_slug}/store/orders/{order_id}/returns The order's returns, oldest first
POST /api/v1/orgs/{org_slug}/store/orders/{order_id}/returns Request return
GET /api/v1/orgs/{org_slug}/store/regions The regions the store sells in, to pick a country and currency from
GET /api/v1/orgs/{org_slug}/store/regions/{region_id} Get region
GET /api/v1/orgs/{org_slug}/store/return-reasons List return reasons
POST /api/v1/orgs/{org_slug}/store/unsubscribe Suppress the token's address for this store's marketing emails

GET /api/v1/orgs/{org_slug}/store

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

One click on a referral link today (UTC); 204 whether or not the code counted

Section titled One click on a referral link today (UTC); 204 whether or not the code counted

POST /api/v1/orgs/{org_slug}/store/affiliates/hits

One click on a referral link today (UTC); 204 whether or not the code counted.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required Description
code string yes The code in the /ref/CODE/ link the shopper followed.
Status Meaning
204 Success.
422 The request is not valid. detail lists each problem.

The shopper's own affiliate record and the program's terms

Section titled The shopper's own affiliate record and the program's terms

GET /api/v1/orgs/{org_slug}/store/affiliates/me

The shopper's own affiliate record and the program's terms.

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Make the shopper an affiliate with the code they ask for, or one made up

Section titled Make the shopper an affiliate with the code they ask for, or one made up

POST /api/v1/orgs/{org_slug}/store/affiliates/me

Make the shopper an affiliate with the code they ask for, or one made up.

Name In Type Required
org_slug path string yes

application/json

Field Type Required Description
code string or null no The code the shopper wants; one is made up without it.
Status Meaning
201 Success.
422 The request is not valid. detail lists each problem.

Claim the next reward the shopper has earned

Section titled Claim the next reward the shopper has earned

POST /api/v1/orgs/{org_slug}/store/affiliates/me/claims

Claim the next reward the shopper has earned.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required Description
variant_id Variant Id yes One of the program's reward_variant_ids.
shipping_address Shipping Address yes Where the reward is sent.
Status Meaning
201 Success.
422 The request is not valid. detail lists each problem.

The program's public terms, for the storefront's cookie and its signup page

Section titled The program's public terms, for the storefront's cookie and its signup page

GET /api/v1/orgs/{org_slug}/store/affiliates/program

The program's public terms, for the storefront's cookie and its signup page.

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

{valid}: whether the code belongs to an active affiliate while the program is on

Section titled {valid}: whether the code belongs to an active affiliate while the program is on

GET /api/v1/orgs/{org_slug}/store/affiliates/validate

{valid}: whether the code belongs to an active affiliate while the program is on.

Name In Type Required Description
org_slug path string yes
code query string no The code to check.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

A cart in the key's mode and sales channel, in a region and its currency

Section titled A cart in the key's mode and sales channel, in a region and its currency

POST /api/v1/orgs/{org_slug}/store/carts

A cart in the key's mode and sales channel, in a region and its currency.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required
region_id integer or null no
country_code string or null no
currency_code string or null no
email string or null no
sales_channel_id integer or null no
locale string or null no
metadata object or null no
items array of LineItemIn or null no
items[].variant_id integer yes
items[].quantity integer no
items[].metadata object or null no
Status Meaning
201 Success.
422 The request is not valid. detail lists each problem.

The cart an abandoned cart or failed payment email links to, while it is open

Section titled The cart an abandoned cart or failed payment email links to, while it is open

GET /api/v1/orgs/{org_slug}/store/carts/recover

The cart an abandoned cart or failed payment email links to, while it is open.

Name In Type Required Description
org_slug path string yes
t query string yes The token from the email's cart link.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/orgs/{org_slug}/store/carts/{cart_id}

Name In Type Required
cart_id path string yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Email, addresses, region or country (re-prices every line), note, locale, metadata

Section titled Email, addresses, region or country (re-prices every line), note, locale, metadata

PATCH /api/v1/orgs/{org_slug}/store/carts/{cart_id}

Email, addresses, region or country (re-prices every line), note, locale, metadata.

Name In Type Required
cart_id path string yes
org_slug path string yes

application/json (required)

Field Type Required
email string or null no
shipping_address object or null no
billing_address object or null no
region_id integer or null no
country_code string or null no
note string or null no
locale string or null no
metadata object or null no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Place the cart's order: {"order", "accesstoken"}

Section titled Place the cart's order: {"order", "accesstoken"}

POST /api/v1/orgs/{org_slug}/store/carts/{cart_id}/complete

Place the cart's order: {"order", "access_token"}. The token is what the shopper's order link carries (GET /store/orders/{id}?token=).

create_account: true from a guest asks for an account with the cart's email once the order is placed, with password (8 to 128 characters, 422 without create_account) or, without one, a link to choose it by email (app/commerce/accounts.py). It runs once the answer is sent, on the first answer and on every retry, never makes a second account and never changes the answer, so the answer does not say whether the email already had an account.

Name In Type Required
cart_id path string yes
org_slug path string yes
Idempotency-Key header string or null no

application/json

Field Type Required Description
accept_terms boolean no
create_account boolean no A guest asks for an account with the cart's email once the order is placed.
password string or null no The new account's password; only with create_account. Without one, a link to choose it is emailed.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Every fee the cart is offered, with selected: the same list as the cart's fees

Section titled Every fee the cart is offered, with selected: the same list as the cart's fees

GET /api/v1/orgs/{org_slug}/store/carts/{cart_id}/fees

Every fee the cart is offered, with selected: the same list as the cart's fees.

Name In Type Required
cart_id path string yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/orgs/{org_slug}/store/carts/{cart_id}/fees/{code}

Select an offered fee. 404 not_found for a code the cart is not offered.

Name In Type Required
cart_id path string yes
code path string yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Turn an offered fee off; the choice is kept even for a fee on by default

Section titled Turn an offered fee off; the choice is kept even for a fee on by default

DELETE /api/v1/orgs/{org_slug}/store/carts/{cart_id}/fees/{code}

Turn an offered fee off; the choice is kept even for a fee on by default.

Name In Type Required
cart_id path string yes
code path string yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Apply a gift card by its code: 10 attempts per 10 minutes per cart and per client IP

Section titled Apply a gift card by its code: 10 attempts per 10 minutes per cart and per client IP

POST /api/v1/orgs/{org_slug}/store/carts/{cart_id}/gift-cards

Apply a gift card by its code: 10 attempts per 10 minutes per cart and per client IP.

Name In Type Required
cart_id path string yes
org_slug path string yes

application/json (required)

Field Type Required
code string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

DELETE /api/v1/orgs/{org_slug}/store/carts/{cart_id}/gift-cards/{gift_card_id}

Name In Type Required
cart_id path string yes
gift_card_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Add a variant; the same variant with the same metadata merges into its line

Section titled Add a variant; the same variant with the same metadata merges into its line

POST /api/v1/orgs/{org_slug}/store/carts/{cart_id}/line-items

Add a variant; the same variant with the same metadata merges into its line.

Name In Type Required
cart_id path string yes
org_slug path string yes

application/json (required)

Field Type Required
variant_id integer yes
quantity integer no
metadata object or null no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Set a line's quantity; 0 removes it

Section titled Set a line's quantity; 0 removes it

PATCH /api/v1/orgs/{org_slug}/store/carts/{cart_id}/line-items/{line_id}

Set a line's quantity; 0 removes it.

Name In Type Required
cart_id path string yes
line_id path integer yes
org_slug path string yes

application/json (required)

Field Type Required
quantity integer yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

DELETE /api/v1/orgs/{org_slug}/store/carts/{cart_id}/line-items/{line_id}

Name In Type Required
cart_id path string yes
line_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

The providers that can take this cart's payment, and whether it needs one

Section titled The providers that can take this cart's payment, and whether it needs one

GET /api/v1/orgs/{org_slug}/store/carts/{cart_id}/payment-providers

The providers that can take this cart's payment, and whether it needs one.

Name In Type Required
cart_id path string yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Start the payment with provider, or refresh the one already started for the same amount

Section titled Start the payment with provider, or refresh the one already started for the same amount

POST /api/v1/orgs/{org_slug}/store/carts/{cart_id}/payment-sessions

Start the payment with provider, or refresh the one already started for the same amount. accept_terms records the shopper's acceptance of the store's terms with the session.

Name In Type Required
cart_id path string yes
org_slug path string yes

application/json (required)

Field Type Required Description
provider string yes stripe, paypal or manual.
accept_terms boolean no
return_url string or null no
cancel_url string or null no
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/orgs/{org_slug}/store/carts/{cart_id}/promotions

Apply a code. 422 promotion_not_applicable says why in reason.

Name In Type Required
cart_id path string yes
org_slug path string yes

application/json (required)

Field Type Required
code string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Remove a code, named in the body {"code"} or as ?code=

Section titled Remove a code, named in the body {"code"} or as ?code=

DELETE /api/v1/orgs/{org_slug}/store/carts/{cart_id}/promotions

Remove a code, named in the body {"code"} or as ?code=.

Name In Type Required
cart_id path string yes
org_slug path string yes
code query string or null no

application/json

Field Type Required
code string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Choose an option; it replaces the method its shipping profile had

Section titled Choose an option; it replaces the method its shipping profile had

POST /api/v1/orgs/{org_slug}/store/carts/{cart_id}/shipping-methods

Choose an option; it replaces the method its shipping profile had.

Name In Type Required
cart_id path string yes
org_slug path string yes

application/json (required)

Field Type Required
option_id integer yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

The options the cart's address and items allow, priced for them, per shipping profile

Section titled The options the cart's address and items allow, priced for them, per shipping profile

GET /api/v1/orgs/{org_slug}/store/carts/{cart_id}/shipping-options

The options the cart's address and items allow, priced for them, per shipping profile.

Name In Type Required
cart_id path string yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

The active, public categories as a tree

Section titled The active, public categories as a tree

GET /api/v1/orgs/{org_slug}/store/categories

The active, public categories as a tree. A category that is inactive or internal hides the categories under it too.

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/orgs/{org_slug}/store/categories/{handle}

Name In Type Required
handle path string yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/orgs/{org_slug}/store/collections

Name In Type Required Description
org_slug path string yes
limit query integer no Default: 50.
offset query integer no Default: 0.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

A published collection; its products are /store/products?collectionhandle=

Section titled A published collection; its products are /store/products?collectionhandle=

GET /api/v1/orgs/{org_slug}/store/collections/{handle}

A published collection; its products are /store/products?collection_handle=.

Name In Type Required
handle path string yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/orgs/{org_slug}/store/leads

Record a sign-up. Always {"ok": true} for a valid address.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required Description
email string yes
source string or null no Where the storefront collected it, such as welcome_popup.
variant string or null no The popup design the shopper signed up through.
consent boolean or null no Whether the shopper agreed to marketing email.
consent_text string or null no The words the shopper agreed to.
metadata object or null no
turnstile_token string or null no
Status Meaning
202 Success.
422 The request is not valid. detail lists each problem.

One more view of a popup design today (UTC)

Section titled One more view of a popup design today (UTC)

POST /api/v1/orgs/{org_slug}/store/leads/impressions

One more view of a popup design today (UTC).

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required Description
variant string yes The popup design the storefront showed.
Status Meaning
204 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/orgs/{org_slug}/store/orders/lookup

Email the links to the orders placed with email (in the key's mode, within the store's order link lifetime). Always {"sent": true}; the email goes out after the answer, and only when there are orders.

Name In Type Required
org_slug path string yes

application/json (required)

Field Type Required Description
email string yes
order_number string or null no #1001 or 1001: only that order.
Status Meaning
202 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/orgs/{org_slug}/store/orders/{order_id}

Name In Type Required Description
order_id path string yes
org_slug path string yes
token query string or null no The order link's token.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

The invoice and credit notes, as issued by the seller of record

Section titled The invoice and credit notes, as issued by the seller of record

GET /api/v1/orgs/{org_slug}/store/orders/{order_id}/documents

The invoice and credit notes, as issued by the seller of record.

Name In Type Required Description
order_id path string yes
org_slug path string yes
token query string or null no The order link's token.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

The order's returns, oldest first

Section titled The order's returns, oldest first

GET /api/v1/orgs/{org_slug}/store/orders/{order_id}/returns

The order's returns, oldest first.

Name In Type Required Description
order_id path string yes
org_slug path string yes
token query string or null no The order link's token.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

POST /api/v1/orgs/{org_slug}/store/orders/{order_id}/returns

Ask to return shipped units, or to exchange them: requested until the store approves or declines it.

Name In Type Required Description
order_id path string yes
org_slug path string yes
token query string or null no The order link's token.
Idempotency-Key header string or null no

application/json (required)

Field Type Required Description
items array of ReturnItemIn yes
items[].order_item_id integer yes
items[].quantity integer yes
items[].reason_code string or null no The code of a return reason.
items[].note string or null no
exchange_items array of ExchangeItemIn or null no
exchange_items[].variant_id integer yes
exchange_items[].quantity integer yes
note string or null no
Status Meaning
201 Success.
422 The request is not valid. detail lists each problem.

The regions the store sells in, to pick a country and currency from

Section titled The regions the store sells in, to pick a country and currency from

GET /api/v1/orgs/{org_slug}/store/regions

The regions the store sells in, to pick a country and currency from.

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/orgs/{org_slug}/store/regions/{region_id}

Name In Type Required
region_id path integer yes
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

GET /api/v1/orgs/{org_slug}/store/return-reasons

The reasons a shopper may pick for a return, in the store's order, leaving out those it disabled. An item's reason_code takes a code.

Name In Type Required
org_slug path string yes
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.

Suppress the token's address for this store's marketing emails

Section titled Suppress the token's address for this store's marketing emails

POST /api/v1/orgs/{org_slug}/store/unsubscribe

Suppress the token's address for this store's marketing emails. No publishable key.

Name In Type Required Description
org_slug path string yes
t query string or null no The token from the email's unsubscribe link.
Status Meaning
200 Success.
422 The request is not valid. detail lists each problem.