Échange un code d'une promotion par code promo. Après avoir échangé un code de promo, l'utilisateur reçoit des biens gratuits et/ou le prix du panier et/ou des objets spécifiques sera réduit.
project_id required | integer ID de projet. Ce paramètre se trouve dans le Compte éditeur à côté du nom du projet. Example: 44056 |
Le code promo a été utilisé avec succès.
L'authentification n'a pas été passée ou est incorrecte.
L'en-tête d'autorisation n'a pas été passé.
Entrez un code promo valide.
Requête non valide.
{- "cart": {
- "id": "current"
}, - "coupon_code": "SUMMER2021",
- "selected_unit_items": {
- "game_1": "game_1_steam",
- "game_2": "game_2_playstation"
}
}
{- "cart_id": "cart_id",
- "is_free": false,
- "items": [
- {
- "attributes": [ ],
- "can_be_bought": true,
- "description": "Take it, take it all! All of Xsolla's riches in one Mega Booster.",
- "groups": [
- {
- "external_id": "powerups",
- "name": "Power Ups"
}
], - "is_free": false,
- "limits": {
- "per_user": {
- "available": 3,
- "recurrent_schedule": {
- "interval_type": "weekly",
- "reset_next_date": 1746057600
}, - "total": 5
}
}, - "name": "Xsolla Booster Mega",
- "periods": [
- {
- "date_from": "2020-08-11T10:00:00+03:00",
- "date_until": "2020-08-11T20:00:00+03:00"
}
], - "price": {
- "amount": "50.0000000000000000",
- "amount_without_discount": "100.0000000000000000",
- "currency": "USD"
}, - "promotions": [
- {
- "bonus": [
- {
- "name": "Xsolla Minigun",
- "quantity": 1,
- "sku": "minigun_1",
- "type": "virtual_good"
}
], - "date_end": "2026-04-15T16:16:00+03:00",
- "date_start": "2020-04-15T16:16:00+03:00",
- "discount": {
- "percent": "50.00"
}, - "name": "Bonus promotion"
}
], - "quantity": 123,
- "sku": "booster_mega_1",
- "type": "virtual_good",
- "virtual_item_type": "consumable",
- "virtual_prices": [ ],
- "vp_rewards": [
- {
- "amount": 130,
- "is_clan": false,
- "item_id": 175232,
- "name": "Value point",
- "sku": "value_point_1"
}, - {
- "amount": 50,
- "is_clan": true,
- "item_id": 186321,
- "name": "Clan Reward VP 1",
- "sku": "clan_value_point_sku_1"
}
]
}, - {
- "attributes": [ ],
- "can_be_bought": true,
- "description": "Honshu Boshin Wakizashi - Modern Tactical Samurai / Ninja Sword - Hand Forged 1060 Carbon Steel - Full Tang, Fully Functional, Battle Ready - Black TPR, Steel Guard and Pommel.",
- "groups": [ ],
- "is_free": true,
- "limits": {
- "per_user": {
- "available": 3,
- "recurrent_schedule": {
- "interval_type": "weekly",
- "reset_next_date": 1746057600
}, - "total": 5
}
}, - "name": "Sword Xsolla Skin",
- "periods": [
- {
- "date_from": "2020-08-11T10:00:00+03:00",
- "date_until": "2020-08-11T20:00:00+03:00"
}
], - "price": [ ],
- "promotions": [
- {
- "bonus": [
- {
- "name": "Xsolla Minigun",
- "quantity": 1,
- "sku": "minigun_1",
- "type": "virtual_good"
}
], - "date_end": "2026-04-15T16:16:00+03:00",
- "date_start": "2020-04-15T16:16:00+03:00",
- "discount": {
- "percent": "50.00"
}, - "name": "Bonus promotion"
}
], - "quantity": 1,
- "sku": "swords_1",
- "type": "virtual_good",
- "virtual_item_type": "non_consumable",
- "virtual_prices": [ ],
- "vp_rewards": [
- {
- "amount": 130,
- "item_id": 175232,
- "name": "Value point",
- "sku": "value_point_1"
}, - {
- "amount": 50,
- "is_clan": true,
- "item_id": 186321,
- "name": "Clan Reward VP 1",
- "sku": "clan_value_point_sku_1"
}
]
}
], - "price": {
- "amount": "6150.0000000000000000",
- "amount_without_discount": "12300.0000000000000000",
- "currency": "USD"
}, - "rewards": {
- "bonus": [
- {
- "item": {
- "description": "Honshu Boshin Wakizashi - Modern Tactical Samurai / Ninja Sword - Hand Forged 1060 Carbon Steel - Full Tang, Fully Functional, Battle Ready - Black TPR, Steel Guard and Pommel.",
- "name": "Sword Xsolla Skin",
- "sku": "swords_1",
- "type": "virtual_good",
- "virtual_item_type": "non_consumable"
}, - "quantity": 1
}
], - "discount": {
- "percent": null
}, - "discounted_items": [
- {
- "discount": {
- "percent": "50.00"
}, - "sku": "booster_mega_1"
}
], - "is_selectable": false
}
}