Xsolla-logo

Fill cart with items

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

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

SecurityAuthForClient
Request
path Parameters
project_id
required
integer

Project ID.

Example: 44056
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": {
    }
}