ID de promotion.
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/
- https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/promotions/{promotion_id}
- Mock serverhttps://xsolla.redocly.app/_mock/fr/api/subscriptions/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}'- https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/promotions/{promotion_id}
- Mock serverhttps://xsolla.redocly.app/_mock/fr/api/subscriptions/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/fr/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}'Réponse
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" }
Requête
Met à jour une promotion. Si la promotion est en lecture seule (read_only = true), vous n'êtes pas autorisé à modifier le paramètre project_id.
Remarque
Cet appel API ne contient pas le paramètre de cheminproject_id, vous devez donc utiliser la clé API valide dans tous les projets de l'entreprise pour l'autorisation.
Sécurité
basicAuth
Tableau des descriptions localisées de la promotion.
Tableau des étiquettes localisées à afficher dans l'interface de paiement.
Tableau des noms localisés de la promotion.
- https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/promotions/{promotion_id}
- Mock serverhttps://xsolla.redocly.app/_mock/fr/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
-u <username>:<password> \
'https://xsolla.redocly.app/_mock/fr/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}' \
-H 'Content-Type: application/json' \
-d '{
"description": {
"en": "Promotion with 5% discount",
"ru": "Акция со скидкой 5%"
},
"label": {
"en": "5%",
"ru": "5%"
},
"name": {
"en": "5% discount",
"ru": "скидка 5%"
},
"project_id": 40544,
"technical_name": "Sale promotion"
}'