Xsolla-logo

Update cart item by cart ID

put/v2/project/{project_id}/cart/{cart_id}/item/{item_sku}

Updates an existing cart item or creates the one in the cart.

SecuritybasicAuth
Request
path Parameters
project_id
required
integer

Project ID.

Example: 44056
cart_id
required
string

Cart ID.

Example: custom_id
item_sku
required
string

Item SKU.

Example: booster_mega_1
Request Body schema: application/json
currency
string

Preferred payment currency. Three-letter currency code per ISO 4217.

quantity
number
Default: 123

Item quantity.

Responses
204

The cart was successfully updated.

404

Item not found. Make sure the project_id and the item_sku are correct.

422

Item quantity must be non-negative integer.

Request samples
application/json
{
  • "currency": "string",
  • "quantity": 123
}
Response samples
application/json
{
  • "statusCode": 404,
  • "errorCode": 4001,
  • "errorMessage": "[0401-4001]: Item with Project ID = 44056 and SKU = booster_mega_12222 not found"
}