跳转到内容

概览

  • Version: 2.0
  • 服务器https://api.xsolla.com/merchant/v2/

本API参考介绍管理订阅、优惠券和促销活动的端点。 如需了解关于订阅的详细信息,请参考产品指南词汇表

下载 OpenAPI 描述
语言
服务器
Mock server
https://xsolla.redocly.app/_mock/zh/api/subscriptions/
操作
操作
操作
操作
操作
操作

请求

创建一个新的推广。

注意

此API调用不包含project_id路径参数,因此您需要使用在您公司的所有项目中都有效的API密钥来设置授权。

安全
basicAuth
路径
merchant_idinteger必需

商户ID。

正文application/json必需
descriptionobject

本地化促销描述数组。

description.​arstring

阿拉伯语。

description.​bgstring

保加利亚语。

description.​cnstring

中文(简体)。

description.​csstring

捷克语。

description.​destring

德语。

description.​enstring

英语。

description.​esstring

西班牙语。

description.​frstring

法语。

description.​hestring

希伯来语。

description.​itstring

意大利语。

description.​jastring

日语。

description.​kostring

韩语。

description.​plstring

波兰语。

description.​ptstring

葡萄牙语。

description.​rostring

罗马尼亚语。

description.​rustring

俄语。

description.​thstring

泰语。

description.​trstring

土耳其语。

description.​twstring

中文(繁体)。

description.​vistring

越南语。

labelobject

本地化标签数组,显示在支付 UI 中。

label.​arstring

阿拉伯语。

label.​bgstring

保加利亚语。

label.​cnstring

中文(简体)。

label.​csstring

捷克语。

label.​destring

德语。

label.​enstring

英语。

label.​esstring

西班牙语。

label.​frstring

法语。

label.​hestring

希伯来语。

label.​itstring

意大利语。

label.​jastring

日语。

label.​kostring

韩语。

label.​plstring

波兰语。

label.​ptstring

葡萄牙语。

label.​rostring

罗马尼亚语。

label.​rustring

俄语。

label.​thstring

泰语。

label.​trstring

土耳其语。

label.​twstring

中文(繁体)。

label.​vistring

越南语。

nameobject

本地化促销名称数组。

name.​arstring

阿拉伯语。

name.​bgstring

保加利亚语。

name.​cnstring

中文(简体)。

name.​csstring

捷克语。

name.​destring

德语。

name.​enstring

英语。

name.​esstring

西班牙语。

name.​frstring

法语。

name.​hestring

希伯来语。

name.​itstring

意大利语。

name.​jastring

日语。

name.​kostring

韩语。

name.​plstring

波兰语。

name.​ptstring

葡萄牙语。

name.​rostring

罗马尼亚语。

name.​rustring

俄语。

name.​thstring

泰语。

name.​trstring

土耳其语。

name.​twstring

中文(繁体)。

name.​vistring

越南语。

project_idinteger必需

项目ID。

technical_namestring必需

促销活动的技术名称。

enabledboolean
idinteger
read_onlyboolean
show_bannerboolean
curl -i -X POST \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/zh/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"
  }'

响应

Created.

正文application/json
idinteger

促销活动 ID。

响应
application/json
{ "id": 17890 }

请求

删除提升。 您只能使用enabled=false删除促销活动。

注意

此API调用不包含project_id路径参数,因此您需要使用在您公司的所有项目中都有效的API密钥来设置授权。

安全
basicAuth
路径
merchant_idinteger必需

商户ID。

promotion_idinteger必需

促销活动 ID。

curl -i -X DELETE \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/zh/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}'

响应

No content.

请求

检索促销。

注意

此API调用不包含project_id路径参数,因此您需要使用在您公司的所有项目中都有效的API密钥来设置授权。

安全
basicAuth
路径
merchant_idinteger必需

商户ID。

promotion_idinteger必需

促销活动 ID。

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/zh/api/subscriptions/merchants/{merchant_id}/promotions/{promotion_id}'

响应

OK.

正文application/json
descriptionobject

本地化促销描述数组。

description.​arstring

阿拉伯语。

description.​bgstring

保加利亚语。

description.​cnstring

中文(简体)。

description.​csstring

捷克语。

description.​destring

德语。

description.​enstring

英语。

description.​esstring

西班牙语。

description.​frstring

法语。

description.​hestring

希伯来语。

description.​itstring

意大利语。

description.​jastring

日语。

description.​kostring

韩语。

description.​plstring

波兰语。

description.​ptstring

葡萄牙语。

description.​rostring

罗马尼亚语。

description.​rustring

俄语。

description.​thstring

泰语。

description.​trstring

土耳其语。

description.​twstring

中文(繁体)。

description.​vistring

越南语。

labelobject

本地化标签数组,显示在支付 UI 中。

label.​arstring

阿拉伯语。

label.​bgstring

保加利亚语。

label.​cnstring

中文(简体)。

label.​csstring

捷克语。

label.​destring

德语。

label.​enstring

英语。

label.​esstring

西班牙语。

label.​frstring

法语。

label.​hestring

希伯来语。

label.​itstring

意大利语。

label.​jastring

日语。

label.​kostring

韩语。

label.​plstring

波兰语。

label.​ptstring

葡萄牙语。

label.​rostring

罗马尼亚语。

label.​rustring

俄语。

label.​thstring

泰语。

label.​trstring

土耳其语。

label.​twstring

中文(繁体)。

label.​vistring

越南语。

nameobject

本地化促销名称数组。

name.​arstring

阿拉伯语。

name.​bgstring

保加利亚语。

name.​cnstring

中文(简体)。

name.​csstring

捷克语。

name.​destring

德语。

name.​enstring

英语。

name.​esstring

西班牙语。

name.​frstring

法语。

name.​hestring

希伯来语。

name.​itstring

意大利语。

name.​jastring

日语。

name.​kostring

韩语。

name.​plstring

波兰语。

name.​ptstring

葡萄牙语。

name.​rostring

罗马尼亚语。

name.​rustring

俄语。

name.​thstring

泰语。

name.​trstring

土耳其语。

name.​twstring

中文(繁体)。

name.​vistring

越南语。

project_idinteger

项目ID。

technical_namestring

促销活动的技术名称。

enabledboolean
idinteger
read_onlyboolean
show_bannerboolean
响应
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" }
操作
操作