> For the complete documentation index, see [llms.txt](https://docs.spurtcommerce.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spurtcommerce.com/api-reference/store/cart/cart-items.md).

# Cart Items

Retrieve, create and remove shopping cart items.

## Get the current customer cart.

> Get the current customer cart.\
> \
> \*\*Authentication:\*\* Customer bearer token required.\
> \
> \*\*Feature area:\*\* Cart\
> \
> \*\*Implementation source:\*\* \`src/api/store/controllers/CustomerCartController.ts\`\
> \
> \*\*Request example provenance:\*\* Response envelope from source comment; include \`limit\`, \`offset\`, \`count\` query parameters as needed.\
> \
> \*\*Response example provenance:\*\* Response envelope from source comment; include \`limit\`, \`offset\`, \`count\` query parameters as needed.\
> \
> \> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.

```json
{"openapi":"3.0.3","info":{"title":"SpurtCommerce Store API","version":"6.0.0"},"tags":[{"name":"Cart items","description":"Retrieve, create and remove shopping cart items."}],"servers":[{"url":"https://api.example.com","description":"Replace with your SpurtCommerce API host. Paths include the /api prefix."}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Paste the JWT access token returned by the corresponding login endpoint."}}},"paths":{"/api/cart":{"get":{"operationId":"getApiCart","summary":"Get the current customer cart.","description":"Get the current customer cart.\n\n**Authentication:** Customer bearer token required.\n\n**Feature area:** Cart\n\n**Implementation source:** `src/api/store/controllers/CustomerCartController.ts`\n\n**Request example provenance:** Response envelope from source comment; include `limit`, `offset`, `count` query parameters as needed.\n\n**Response example provenance:** Response envelope from source comment; include `limit`, `offset`, `count` query parameters as needed.\n\n> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.","tags":["Cart items"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"Query parameter limit."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer"},"description":"Query parameter offset."},{"name":"count","in":"query","required":false,"schema":{"type":"boolean"},"description":"Query parameter count."}],"responses":{"200":{"description":"Successful response. Response envelope from source comment; include `limit`, `offset`, `count` query parameters as needed.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"data":{"type":"array","items":{}}},"additionalProperties":true}}}}}}}}}
```

## Create or update the current customer cart.

> Create or update the current customer cart.\
> \
> \*\*Authentication:\*\* Customer bearer token required; tenant validation applies.\
> \
> \*\*Feature area:\*\* Cart\
> \
> \*\*Implementation source:\*\* \`src/api/store/controllers/CustomerCartController.ts\`\
> \
> \*\*Request example provenance:\*\* Exact request and success message from source @api example; validation error from handler.\
> \
> \*\*Response example provenance:\*\* Exact request and success message from source @api example; validation error from handler.\
> \
> \> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.

```json
{"openapi":"3.0.3","info":{"title":"SpurtCommerce Store API","version":"6.0.0"},"tags":[{"name":"Cart items","description":"Retrieve, create and remove shopping cart items."}],"servers":[{"url":"https://api.example.com","description":"Replace with your SpurtCommerce API host. Paths include the /api prefix."}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Paste the JWT access token returned by the corresponding login endpoint."}}},"paths":{"/api/cart":{"post":{"operationId":"postApiCart","summary":"Create or update the current customer cart.","description":"Create or update the current customer cart.\n\n**Authentication:** Customer bearer token required; tenant validation applies.\n\n**Feature area:** Cart\n\n**Implementation source:** `src/api/store/controllers/CustomerCartController.ts`\n\n**Request example provenance:** Exact request and success message from source @api example; validation error from handler.\n\n**Response example provenance:** Exact request and success message from source @api example; validation error from handler.\n\n> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.","tags":["Cart items"],"responses":{"200":{"description":"Successful response. Exact request and success message from source @api example; validation error from handler.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"cartId":{"type":"integer"},"productId":{"type":"integer"},"skuId":{"type":"integer"},"quantity":{"type":"integer"}},"additionalProperties":true}}},"additionalProperties":true}}}},"400":{"description":"Error response example. Exact request and success message from source @api example; validation error from handler.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer"},"message":{"type":"string"}},"additionalProperties":true}}}}},"requestBody":{"required":true,"description":"Sample request body. Exact request and success message from source @api example; validation error from handler.","content":{"application/json":{"schema":{"type":"object","properties":{"cartDetails":{"type":"array","description":"Required non-empty collection of items to add to the cart.","items":{"type":"object","properties":{"productId":{"type":"integer"},"productPrice":{"type":"number"},"tirePrice":{"type":"number"},"quantity":{"type":"integer"},"skuId":{"type":"integer"},"type":{"type":"string"}}}}},"additionalProperties":true,"required":["cartDetails"]}}}}}}}}
```

## Remove specified cart items; omit cartId to clear the cart if supported by current handler.

> Remove specified cart items; omit cartId to clear the cart if supported by current handler.\
> \
> \*\*Authentication:\*\* Customer bearer token required.\
> \
> \*\*Feature area:\*\* Cart\
> \
> \*\*Implementation source:\*\* \`src/api/store/controllers/CustomerCartController.ts\`\
> \
> \*\*Request example provenance:\*\* Source-defined request and success message.\
> \
> \*\*Response example provenance:\*\* Source-defined request and success message.\
> \
> \> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.

```json
{"openapi":"3.0.3","info":{"title":"SpurtCommerce Store API","version":"6.0.0"},"tags":[{"name":"Cart items","description":"Retrieve, create and remove shopping cart items."}],"servers":[{"url":"https://api.example.com","description":"Replace with your SpurtCommerce API host. Paths include the /api prefix."}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Paste the JWT access token returned by the corresponding login endpoint."}}},"paths":{"/api/cart/delete-cart-item":{"delete":{"operationId":"deleteApiCartDeleteCartItem","summary":"Remove specified cart items; omit cartId to clear the cart if supported by current handler.","description":"Remove specified cart items; omit cartId to clear the cart if supported by current handler.\n\n**Authentication:** Customer bearer token required.\n\n**Feature area:** Cart\n\n**Implementation source:** `src/api/store/controllers/CustomerCartController.ts`\n\n**Request example provenance:** Source-defined request and success message.\n\n**Response example provenance:** Source-defined request and success message.\n\n> Example is based on the linked repository source. Replace example identifiers and credentials with values from your tenant.","tags":["Cart items"],"responses":{"200":{"description":"Successful response. Source-defined request and success message.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status":{"type":"string"}},"additionalProperties":true}}}}},"requestBody":{"required":false,"description":"Sample request body. Source-defined request and success message.","content":{"application/json":{"schema":{"type":"object","properties":{"cartId":{"type":"string"}},"additionalProperties":true}}}}}}}}
```
