Gets promo code rewards by its code.
Can be used to allow users to choose one of many items as a bonus.
The usual case is choosing a DRM if the promo code contains a game as a bonus (type=unit
).
List of promo code rewards was successfully received.
Authentication not passed or wrong.
Authorization header not sent.
Enter valid coupon code.
Invalid request.
curl -i -X GET \ 'https://store.xsolla.com/api/v2/project/{project_id}/promocode/code/{promocode_code}/rewards' \ -H 'Authorization: Bearer <YOUR_JWT_HERE>'
{- "bonus": [
- {
- "item": {
- "sku": "game_1",
- "name": "Game name",
- "type": "unit",
- "description": "Game description",
- "unit_items": [
- {
- "sku": "game_key_01",
- "name": "Game name",
- "type": "game_key",
- "is_free": false,
- "drm_name": "Steam",
- "drm_sku": "steam"
}, - {
- "sku": "game_key_02",
- "name": "Game name",
- "type": "game_key",
- "drm_name": "Origin",
- "drm_sku": "origin"
}
]
}, - "quantity": 1
}, - {
- "item": {
- "sku": "game_2",
- "name": "Game name",
- "type": "unit",
- "description": "Game description",
- "unit_items": [
- {
- "sku": "game_key_01",
- "type": "game_key",
- "name": "Game name",
- "drm_name": "Steam",
- "drm_sku": "steam"
}
]
}, - "quantity": 2
}
], - "discount": {
- "percent": "10.00"
}, - "is_selectable": true,
- "discounted_items": [
- {
- "sku": "elven_sword",
- "discount": {
- "percent": "10.00"
}
}
]
}