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属性。
操作
正文application/json
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/{project_id}/admin/user/attribute/rule/{rule_id}
- https://store.xsolla.com/api/v2/project/{project_id}/admin/user/attribute/rule/{rule_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PATCH \
-u <username>:<password> \
https://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/44056/admin/user/attribute/rule/1 \
-H 'Content-Type: application/json' \
-d '{
"is_enabled": false
}'正文application/json
attribute_conditionsArray of type = string (object) or type = number (object) or type = date (object)(personalized-catalog_user-attribute_conditions_model-post)[ 1 .. 100 ] items必需
用户属性验证条件。 根据用户属性是否满足所有指定条件来确定目录商品可用性。
One of:
attribute_conditions[].attributestring(user-attribute_conditions_properties_attribute)[ 1 .. 255 ] characters^[-_.\d\w]+$必需
用户属性代码。
表示即使用户属性中缺少属性仍满足条件。传递true可向不具有此属性的用户显示该项目。具有该属性但值与条件中指定的值不匹配的用户将看不到该商品。传递false则具有该属性但值与条件中指定的值不匹配或缺少该属性的用户将看不到该商品。
按条件执行的操作类型。用于string属性类型。
| 枚举 值 | 描述 |
|---|---|
| eq | 等于 |
| ne | 不等于 |
用户属性类型。
值"string"
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/{project_id}/admin/user/attribute/rule/{rule_id}
- https://store.xsolla.com/api/v2/project/{project_id}/admin/user/attribute/rule/{rule_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/zh/api/shop-builder/v2/project/44056/admin/user/attribute/rule/1 \
-H 'Content-Type: application/json' \
-d '{
"attribute_conditions": [
{
"attribute": "race",
"can_be_missing": false,
"operator": "eq",
"type": "string",
"value": "ork"
}
],
"is_enabled": true,
"is_satisfied_for_unauth": false,
"items": [
{
"item_id": 1
}
],
"name": "Ork race armor rule"
}'