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

# Get the current cart

**Published**: 2026-11-30
**Category**: Commerce

## `GET /cart`

**Get the current cart**

Returns the caller's active cart with its lines and totals. A signed-in customer gets
their own cart. A guest sends the `X-Lynkow-Cart-Token` header. No cart, or a wrong
token, returns 404 `CART_NOT_FOUND`.

Totals include provisional VAT for the delivery country, else the `country` query
parameter, else the merchant's country. Checkout recomputes every figure.

Reading the cart applies the current catalogue prices. It removes the lines that can
no longer be sold and reports them in `removedLines`. It also clears a shipping option
no longer offered for the delivery country.

> **Note:** Available only on sites with e-commerce enabled.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `country` | query | string | No | Country (ISO 3166-1 alpha-2) for this response's VAT while the cart has no delivery country. An invalid code returns 422 |


### 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 |
| `422` | Validation error |


### SDK

```typescript
import { createClient } from 'lynkow'

const lynkow = createClient({
  siteId: process.env.LYNKOW_SITE_ID!,
  publishableKey: process.env.LYNKOW_PK,
})

try {
  const cart = await lynkow.cart.retrieve()
  render(cart.items, cart.totalCents)
} catch (error) {
  if (isLynkowError(error) && error.code === 'NOT_FOUND') renderEmptyCart()
  else throw error
}
```

---