Create Cart

POST/store/:storeCode/carts
publishable key

Create a cart.

Path Parameters
storeCoderequiredstring

Store slug in the URL (first argument to every SDK store method).

Query Parameters
fieldsstring

Comma-separated fields to include. Prefix with `*` to expand a relation (e.g. `id,*variants`).

Request Body

Schema

Copy
HttpTypes.StoreCreateCart

Properties

region_idstring

Region for the cart.

emailstring

Customer email.

currency_codestring

Currency code.

shipping_addressStoreAddAddress

Shipping address object.

billing_addressStoreAddAddress

Billing address object.

itemsStoreAddCartLineItem[]

Initial line items.

sales_channel_idstring

Sales channel ID.

promo_codesstring[]

Promotion codes to apply.

metadataRecord<string, unknown>

Custom metadata.

Response

Status

200OK

Schema

Copy
HttpTypes.StoreCartResponse

Properties

cartrequiredStoreCart

The created cart.