Skip to main content

Create a cart

POST 

/carts

Relays shopping-cart POST /carts and stores the new cart id in the sf_state cookie. An empty body adopts the cookie's shopper.

Request​

Responses​

The created cart; sets the sf_state cookie.

Response Headers
    Set-Cookie

    The sf_state cookie (HttpOnly, SameSite=Lax, path /api/storefront, Max-Age 30 days, Secure when COOKIE_SECURE is set). State, not authentication.

    Idempotency-Replayed

    Present, with the value true, only when the answer is a replay of a stored one (any upstream write hop of the composition was replayed).