---
title: "Update cart item quantity"
method: POST
path: "/update-cart-item"
tags: ["Cart"]
---

# Update cart item quantity

`POST /update-cart-item`

## Request

- Base URL: `http://localhost:8000/api/shop`
- URL: `http://localhost:8000/api/shop/update-cart-item`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-shop-api/docs/update-cart-item/post.ts> (a function with typed inputs; its response is checked against the schema)

Update the quantity of an item in the cart.

## Headers

- `X-STOREFRONT-KEY` string, required
- `X-Locale` string
- `X-Channel` string
- `X-Currency` string

## Request body

- object
  - `cartItemId` integer, required: Cart item ID to update
  - `quantity` integer, required: New quantity

## Response `201`

Cart item quantity updated. Returns the full cart.

## Other responses

- `400`: Missing cartItemId/quantity, or item not in cart.
- `422`: Validation Error

---

[API](https://skmtc.dev/bagisto/apis/bagisto-shop-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-shop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-shop-api/revisions/f619df36bf29?raw)
