获取项目的促销活动列表。
已成功接收促销活动列表。
基本认证未通过或错误。确保您使用了基本认证或正确的凭据。
curl -i -X GET \ -u <merchant_id_or_project_id>:<api_key> \ 'https://store.xsolla.com/api/v2/project/{project_id}/admin/promotion?limit=50&offset=0&enabled=0'
{- "active_promotions_count": 3,
- "inactive_promotions_count": 2,
- "promotions": [
- {
- "bonus": [
- {
- "item": {
- "bundle_type": "virtual_currency_package",
- "content": [ ],
- "description": null,
- "image_url": null,
- "name": {
- "en": "Diamonds pack",
- "ru": "Пак кристаллов"
}, - "sku": "com.xsolla.diamonds_pack_1",
- "type": "bundle"
}, - "quantity": 1
}
], - "condition": [
- {
- "item": {
- "description": null,
- "image_url": null,
- "inventory_options": {
- "consumable": {
- "usages_count": 1
}, - "expiration_period": null
}, - "name": {
- "en": "VG name",
- "ru": "Название VG"
}, - "sku": "com.xsolla.virtual_good_bonus_2",
- "type": "virtual_good"
}
}
], - "date_end": null,
- "date_start": "2020-01-01T00:00",
- "discount": null,
- "id": 1,
- "is_enabled": true,
- "name": {
- "en": "promotion_1"
}, - "type": "item_bonus"
}, - {
- "bonus": [ ],
- "condition": [
- {
- "item": {
- "description": null,
- "image_url": null,
- "inventory_options": {
- "consumable": {
- "usages_count": 1
}, - "expiration_period": null
}, - "name": {
- "en": "VG name",
- "ru": "Название VG"
}, - "sku": "com.xsolla.virtual_good_bonus_2",
- "type": "virtual_good"
}
}
], - "date_end": "2030-01-01T00:00",
- "date_start": "2020-01-01T00:00",
- "discount": {
- "percent": "10.99"
}, - "id": 2,
- "is_enabled": false,
- "name": {
- "en": "promotion_2"
}, - "type": "item_discount"
}, - {
- "bonus": [
- {
- "item": {
- "description": null,
- "image_url": null,
- "inventory_options": {
- "consumable": {
- "usages_count": 1
}, - "expiration_period": null
}, - "name": {
- "en": "VG name",
- "ru": "Название VG"
}, - "sku": "com.xsolla.virtual_good_bonus_2",
- "type": "virtual_good"
}, - "quantity": 2
}
], - "condition": [
- {
- "item": {
- "external_id": "coupon_2",
- "is_enabled": true,
- "name": {
- "en": "Coupon name",
- "ru": "Название купона"
}, - "redeem_code_limit": 1,
- "redeem_total_limit": null,
- "redeem_user_limit": null
}
}
], - "date_end": "2030-01-01T00:00",
- "date_start": "2022-01-01T00:00",
- "discount": null,
- "id": 3,
- "is_enabled": true,
- "name": {
- "en": "promotion_3"
}, - "type": "coupon_bonus"
}, - {
- "bonus": [
- {
- "item": {
- "description": null,
- "image_url": null,
- "inventory_options": {
- "consumable": {
- "usages_count": 1
}, - "expiration_period": null
}, - "name": {
- "en": "VG name",
- "ru": "Название VG"
}, - "sku": "com.xsolla.virtual_good_bonus_2",
- "type": "virtual_good"
}, - "quantity": 2
}
], - "condition": [
- {
- "item": {
- "external_id": "coupon_3",
- "is_enabled": true,
- "name": {
- "en": "Coupon name",
- "ru": "Название купона"
}, - "redeem_code_limit": 1,
- "redeem_total_limit": null,
- "redeem_user_limit": null
}
}
], - "date_end": "2031-01-01T00:00",
- "date_start": "2018-01-01T00:00",
- "discount": {
- "percent": "12.99"
}, - "id": 4,
- "is_enabled": false,
- "name": {
- "en": "promotion_4"
}, - "type": "promocode_bonus_discount"
}, - {
- "bonus": [
- {
- "item": {
- "description": null,
- "image_url": null,
- "name": {
- "en": "VG name",
- "ru": "Название VG"
}, - "sku": "com.xsolla.virtual_good_bonus_4",
- "type": "virtual_good"
}, - "quantity": 1
}
], - "condition": null,
- "date_end": null,
- "date_start": "2020-01-01T00:00",
- "discount": null,
- "id": 5,
- "is_enabled": true,
- "name": {
- "en": "promotion_5"
}, - "type": "cart_bonus"
}
], - "total_promotions_count": 5
}