---
title: "Update Cart Item"
method: PATCH
path: "/cart/items/{item_id}"
tags: ["Shopping"]
---

# Update Cart Item

`PATCH /cart/items/{item_id}`

## Request

- Base URL: `https://vesremont.com/api/v1`
- URL: `https://vesremont.com/api/v1/cart/items/{item_id}`
- Auth: OAuth 2 (authorization code, authorization URL `https://vesremont.com/oauth/authorize`, token URL `https://vesremont.com/oauth/token`, scopes: `cart:write`)

Set the absolute quantity of a basket line using its item_id from get_cart, not product_id. Zero removes the line; use add_cart_item to increment instead. Returns the refreshed basket; no order or payment. OAuth scopes: cart:write. Changes buyer or order state. Requires a JSON object body; use {} for an operation without body fields.

## Path parameters

- `item_id` integer, required: Basket line item_id from this consenting buyer's get_cart response, not product_id or another buyer's item.

## Request body

- object
  - `quantity` integer, required: New ABSOLUTE quantity for this basket line, not an increment. Zero removes the line.

## Response `200`

Successful operation.

- object
  - `items` object[], required
    - `item_id` integer, required
    - `product_id` integer, required
    - `name` string, required
    - `url` string, uri, nullable, required
    - `quantity` number, required
    - `unit_price` number, nullable, required
    - `line_total` number, nullable, required
    - `currency` 'RUB', required
    - `orderable` boolean, required
    - `price_changed` boolean, nullable, required
    - `stock` object, required: Both fields are the aggregate across the store warehouse network. They do not promise pickup today or a delivery lead time.
      - `local` number, nullable, required
      - `total` number, nullable, required
    - `availability` 'in_stock' | 'backorder' | 'preorder' | 'out_of_stock' | 'unavailable' | 'unknown', required
  - `empty` boolean, required
  - `total_quantity` number, required
  - `subtotal` number, nullable, required
  - `currency` 'RUB', required
  - `orderable` boolean, required

## Other responses

- `400`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `401`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `403`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `404`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `405`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `406`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `409`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `413`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `414`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `415`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `422`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `429`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `431`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `500`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.
- `503`: Structured failure. The code is stable; do not retry uncertain order writes with a new key.

---

[API](https://skmtc.dev/vesremont/apis/vesremont-public-api.md) · [All operations](https://skmtc.dev/vesremont/apis/vesremont-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/vesremont/apis/vesremont-public-api/revisions/3bfec100b67d?raw)
