Xsolla-logo

Fill cart with itemsClient-side

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.

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
Request Body schema: application/json
required
Array of objects

List of items.

Array
sku
required
string
Default: "booster_mega_1"
quantity
required
number
Default: 123
Responses
200

The cart with items was successfully returned.

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