Xsolla-logo

Update cart item from current cartClient-side

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

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

SecurityAuthForCart
Request
path Parameters
project_id
required
integer

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

Example: 44056
item_sku
required
string

Item SKU.

Example: booster_mega_1
Request Body schema: application/json
quantity
number
Default: 123

Item quantity.

Responses
204

The cart was successfully updated.

404

The item was not found. Make sure the project_id and the item_sku are correct.

422

This type of item cannot be put to the cart. Select another type of item.

Request samples
application/json
{
  • "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"
}