OK.
Subscriptions API (2.0)
- Version : 2.0
- Serveurs :
https://api.xsolla.com/merchant/v2/
Cette référence API décrit les endpoints pour la gestion des abonnements, des coupons et des promotions. Pour plus d'informations sur les abonnements, consultez le guide du produit et le glossaire.
Télécharger la description d'OpenAPI
Langues
Serveurs
Mock server
https://xsolla.redocly.app/_mock/fr/api/subscriptions/
- Mock serverhttps://xsolla.redocly.app/_mock/fr/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/fr/api/subscriptions/merchants/{merchant_id}/promotions'Réponse
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/fr/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/fr/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"
}'Réponse
application/json
{ "id": 17890 }
- Mock serverhttps://xsolla.redocly.app/_mock/fr/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 DELETE \
-u <username>:<password> \
'https://xsolla.redocly.app/_mock/fr/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}'