Cart

Create cart token

Create a new guest cart with unique UUID token or get authenticated customer cart. Returns sessionToken for guests.

post/cart-tokens

Request

Headers

X-STOREFRONT-KEYstring required

Storefront API Key for authentication. Required for all shop/storefront API requests.

X-Localestring
Example:en

Locale code for localized data (e.g. "en", "fr", "ar"). Defaults to channel's default locale.

X-Channelstring
Example:default

Channel code (e.g. "default"). Defaults to the current channel.

X-Currencystring
Example:USD

Currency code (e.g. "USD", "EUR", "INR"). Defaults to channel's base currency.

Request body

sessionIdstring

Session ID for cart creation (optional)

createNewboolean

Generate new cart with unique token (optional)

Example request

{
  "sessionId": "my-session-id",
  "createNew": true
}

Response

Guest cart created; returns the cart token used to identify the guest for subsequent cart/checkout calls.

Changes

No recorded changes to this operation across all 13 revisions of this API.