> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update an item

> Update an item

### Path parameters

<ParamField path="id" type="string" required>
  Cart ID
</ParamField>

<ParamField path="item_id" type="string" required>
  Cart item ID
</ParamField>

### Request body

`UpdateCartItemRequest`

<ParamField body="discount_amount" type="string,null">
  Decimal discount amount as a string.
</ParamField>

<ParamField body="quantity" type="integer,null (int32)" />

<ParamField body="unit_price" type="string,null">
  Decimal unit price as a string.
</ParamField>

### Responses

<ResponseField name="200" type="CartItemResponse" />

<ResponseField name="400" type="ErrorBody" />

<RequestExample>
  ```bash cURL theme={null}
  curl --request PUT \
    --url 'https://api.stateset.com/api/v1/carts/{id}/items/{item_id}' \
    --header 'Authorization: Bearer YOUR_API_KEY' \
    --header 'Content-Type: application/json' \
    --data '{
    "discount_amount": null,
    "quantity": null,
    "unit_price": null
  }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "discount_amount": "string",
    "id": "string",
    "name": "string",
    "product_id": null,
    "quantity": 1,
    "sku": "string",
    "total": "string",
    "unit_price": "string"
  }
  ```
</ResponseExample>
