> For the complete Lynkow documentation index in agent-friendly format, see [llms.txt](/llms.txt).

# Get the current cart

**Publié le** : 2026-08-19
**Catégorie** : Commerce

## `GET /cart`

**Get the current cart**

Returns the caller's active cart with its lines and server-computed totals.
An authenticated buyer (customer session token) gets their single active
cart; a guest gets the cart identified by the `X-Lynkow-Cart-Token` header
issued when the cart was created. A missing, wrong, retired, or other-site
token, and simply having no cart yet, all return the SAME 404, so this route
never reveals whether some other buyer's cart exists. The response carries
only the public cart whitelist (wire cart id, currency, totals, and per-item
variant wire id, quantity, captured unit price, line subtotal, and the
product/variant labels snapshotted when the item was added); no tenant,
customer, token, or timestamp field is ever surfaced.
The stored totals and returned lines come from one MVCC snapshot without a
write lock, so a concurrent cart mutation may land immediately before or after
this response but can never splice an older total onto a newer item set.

Reading a cart also SELF-HEALS it: any line whose variant is no longer sellable
(its product unpublished, its variant no longer live, or the variant hard
deleted) is auto-removed and reported once in `removedLines`, so the totals a
buyer sees never carry an item that can no longer be sold. A cart with nothing to
heal is served as a plain read, with `removedLines` absent.

> **Note:** This endpoint requires the e-commerce feature to be enabled on your site.

### Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |
| `401` | Missing or invalid storefront publishable key |
| `402` | The site subscription does not currently permit this operation |
| `403` | The storefront key origin is not allowed |
| `404` | Site, resource, or commerce feature not found |


---