Update Line Item

POST/store/:storeCode/carts/:cartId/line-items/:lineItemId
publishable key

Update a line item in a cart.

Path Parameters
storeCoderequiredstring

Store slug in the URL (first argument to every SDK store method).

cartIdrequiredstring

The cart's ID.

lineItemIdrequiredstring

The line item's ID.

Query Parameters
fieldsstring

Comma-separated fields to include. Prefix with `*` to expand a relation (e.g. `id,*variants`).

Request Body

Schema

Copy
HttpTypes.StoreUpdateCartLineItem

Properties

quantityrequirednumber

Updated quantity.

metadataRecord<string, unknown>

Custom metadata.

Response

Status

200OK

Schema

Copy
HttpTypes.StoreCartResponse

Properties

cartrequiredStoreCart

The updated cart.