Shop Builder API (2.0.0)
- Version: 2.0.0
- Servers:
https://store.xsolla.com/api - Contact Us by Email
- Contact URL: https://xsolla.com/
- Required TLS version: 1.2
Shop Builder API provides a third-party solution for implementing the server side for your store interface. Use the endpoints to manage in-game items, in-game currencies, cart, player inventory, promotions, game library, etc.
下载 OpenAPI 描述
语言
服务器
Mock server
https://xsolla.redocly.app/_mock/zh/api/shop-builder/
https://store.xsolla.com/api/
个性化目录
此API可让您针对用户属性指定规则。如果用户满足具体规则的所有条件,则会显示个性化商品。
有关个性化促销活动的信息,请参阅促销活动部分。
要在购买前传递属性,您可以使用艾克索拉Login API或在使Pay Station API生成令牌时将它们传入user.attributes属性。
操作
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/shop-builder/v3/project/{project_id}/admin/coupon
- https://store.xsolla.com/api/v3/project/{project_id}/admin/coupon
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://xsolla.redocly.app/_mock/zh/api/shop-builder/v3/project/44056/admin/coupon?limit=50&offset=0'响应
application/json
{ "active_promotions_count": 2, "inactive_promotions_count": 0, "items": [ { … }, { … } ], "total_promotions_count": 2 }
正文application/json
attribute_conditionsArray of type = string (object) or type = number (object) or type = date (object)(promotion_user-attribute_conditions_model-post)[ 1 .. 100 ] items
用户属性验证条件。 根据用户属性是否满足所有指定条件来确定促销活动可用性。
唯一促销活动ID。 external_id只能包含大小写英文字母和数字字符、句点、破折号和下划线。
默认值 "coupon_external_id"
示例: "coupon_external_id"
促销活动名称。应包含键/值对, 其中键是"^[a-z]{2}-[A-Z]{2}$"格式的区域设置,值是字符串。
默认值 {"de-DE":"Gutscheintitel","en-US":"Coupon title"}
示例: {"de-DE":"Gutscheintitel","en-US":"Coupon title"}
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/shop-builder/v3/project/{project_id}/admin/coupon
- https://store.xsolla.com/api/v3/project/{project_id}/admin/coupon
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://xsolla.redocly.app/_mock/zh/api/shop-builder/v3/project/44056/admin/coupon \
-H 'Content-Type: application/json' \
-d '{
"attribute_conditions": [
{
"attribute": "account_status",
"can_be_missing": false,
"operator": "eq",
"type": "string",
"value": "golden"
}
],
"bonus": [
{
"quantity": 1,
"sku": "com.xsolla.elven_sword_2"
}
],
"external_id": "coupon_external_id",
"name": {
"de-DE": "Neujahrsbonus",
"en-US": "New Year Bonus"
},
"promotion_periods": [
{
"date_from": "2020-04-15T18:16:00+05:00",
"date_until": "2020-04-25T18:16:00+05:00"
}
],
"redeem_code_limit": 1,
"redeem_total_limit": 100,
"redeem_user_limit": 1
}'响应
application/json
{ "external_id": "coupon_external_id" }
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/shop-builder/v3/project/{project_id}/admin/coupon/{external_id}
- https://store.xsolla.com/api/v3/project/{project_id}/admin/coupon/{external_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/zh/api/shop-builder/v3/project/44056/admin/coupon/coupon_44056_1