Xsolla-logo

Fill specific cart with items

put/v2/project/{project_id}/cart/{cart_id}/fill

Fills the specific cart with items. If the cart already has an item with the same SKU, the existing item position will be replaced by the passed value.

SecurityAuthForClient
Request
path Parameters
project_id
required
integer

Project ID.

Example: 44056
cart_id
required
string

Cart ID.

Example: custom_id
Request Body schema: application/json
required
Array of objects

List of items.

Array
quantity
required
number
Default: 123
sku
required
string
Default: "booster_mega_1"
currency
string

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

Responses
200

The cart with items was successfully returned.

Request samples
application/json
[
  • {
    }
]
Response samples
application/json
{
  • "cart_id": "cart_id",
  • "is_free": false,
  • "items": [
    ],
  • "warnings": [
    ],
  • "price": {
    }
}