Skip to content

Overview

  • 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/
Operations
Operations
Operations
Operations
Operations
Operations
Operations

Request

Add a coupon code to a coupon campaign.

Notice

This API call does not contain the project_id path-parameter, so you need to use the API key that is valid in all the company’s projects to set up authorization.

Security
basicAuth
Path
merchant_idintegerrequired

Merchant ID.

campaign_idintegerrequired

Campaign ID.

Bodyapplication/jsonrequired
coupon_codestringrequired

Coupon code.

Example: "34bryrb3"
curl -i -X POST \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/subscriptions/merchants/{merchant_id}/coupon_promotions/{campaign_id}/coupons' \
  -H 'Content-Type: application/json' \
  -d '{
    "coupon_code": "34bryrb3"
  }'

Responses

No content.

Request

Attach a coupon campaign to a specific promotion.

Notice

This API call does not contain the project_id path-parameter, so you need to use the API key that is valid in all the company’s projects to set up authorization.

Security
basicAuth
Path
merchant_idintegerrequired

Merchant ID.

promotion_idintegerrequired

Promotion ID.

Bodyapplication/jsonrequired
campaignsArray of integersrequired

Array of campaigns IDs.

Example: [9135]
curl -i -X PUT \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}/coupons' \
  -H 'Content-Type: application/json' \
  -d '{
    "campaigns": [
      9135
    ]
  }'

Responses

No content.

Operations