Merchant ID.
Subscriptions API (2.0)
- Version: 2.0
- Servers:
https://api.xsolla.com/merchant/v2/
This API reference describes endpoints for managing subscriptions, coupons, and promotions. To get more information about Subscriptions, see the product guide and the glossary.
Download OpenAPI description
Languages
Servers
Mock server
https://xsolla.redocly.app/_mock/api/subscriptions/
- Mock serverhttps://xsolla.redocly.app/_mock/api/subscriptions/merchants/{merchant_id}/promotions
- https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/promotions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://xsolla.redocly.app/_mock/api/subscriptions/merchants/{merchant_id}/promotions' \
-H 'Content-Type: application/json' \
-d '{
"description": {
"en": "Promotion with 30% discount",
"ru": "Акция со скидкой 30%"
},
"label": {
"en": "30%",
"ru": "30%"
},
"name": {
"en": "30% discount",
"ru": "скидка 30%"
},
"project_id": 12345,
"technical_name": "Sale promotion"
}'- Mock serverhttps://xsolla.redocly.app/_mock/api/subscriptions/merchants/{merchant_id}/promotions
- https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/promotions
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://xsolla.redocly.app/_mock/api/subscriptions/merchants/{merchant_id}/promotions'Response
application/json
[ { "datetime": { … }, "enabled": true, "id": 17840, "is_active": true, "is_infinite": false, "project": { … }, "read_only": false, "technical_name": "christmas" }, { "datetime": null, "enabled": false, "id": 17891, "is_active": false, "is_infinite": true, "project": { … }, "read_only": false, "technical_name": "Sale promotion" } ]
- Mock serverhttps://xsolla.redocly.app/_mock/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}
- https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/promotions/{promotion_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://xsolla.redocly.app/_mock/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}'Response
application/json
{ "description": { "en": "Promotion with 30% discount", "ru": "Акция со скидкой 30%" }, "enabled": false, "id": 17890, "label": { "en": "30%", "ru": "30%" }, "name": { "en": "30% discount", "ru": "Скидка 30%" }, "project_id": 40544, "read_only": false, "show_banner": true, "technical_name": "Sale promotion" }