Skip to main content
POST
Creates a cart

Headers

Session cookie (_fluid_session)

x-fluid-follows-cart-channel
string

Send true only when the client subscribes to the cart's live channel and reads the cart again once subscribed. For a company that fills carts in the background, the response is then the bare cart with population_status: pending, and the filled cart (or a cart_population_failed event) arrives over the channel. Without this header, or with any other value, the cart is filled in the request and population_status is complete.

Query Parameters

jwt
string

JWT token for user authentication. When provided, extracts user and assigns it as the rep to the cart.

Body

application/json

Cart params

country_code
string
required

ISO 2-letter country code

fluid_shop
string
required

The domain of your Fluid shop (excluding the scheme)

fluid_session
string | null

Session token

visitor_token
string | null

Visitor token

source
string | null

The source that created the cart

language_iso
string | null

ISO language code the cart is created in. A language the company does not support is ignored (the cart is still created); the change_language endpoint remains the way to switch an existing cart.

items
(object | null)[] | null
attribution
object
enrollment
boolean

Flag the cart as enrollment eligible without an enrollment pack. Requires an active enrollment configuration for the cart's country or the company default; otherwise the request is refused with 422.

Response

Success

cart
object
required
meta
object | null
required
skipped_items
object[]

Items that could not be added (e.g. out of stock or unavailable in the cart's country). Present only when at least one item was skipped.