跳转到内容

Overview

  • 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属性

操作

获取所有目录规则以供在客户端搜索Server-sideAdmin

请求

获取所有目录规则列表以供在客户端搜索。

注意:

仅返回规则ID、名称和is_enabled
安全
basicAuth
路径
project_idinteger必需

项目ID。您可以在您的发布商帐户项目名称旁边找到。

示例: 44056
curl -i -X GET \
  -u <username>:<password> \
  https://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/44056/admin/user/attribute/rule/all

响应

规则已成功接收。

正文application/json
itemsArray of objects(user-attribute_personalized-catalog_all)
响应
application/json
{ "items": [ {}, {} ] }

删除目录筛选规则Server-sideAdmin

请求

删除指定规则。

安全
basicAuth
路径
project_idinteger必需

项目ID。您可以在您的发布商帐户项目名称旁边找到。

示例: 44056
rule_idnumber必需

规则ID。

示例: 1
curl -i -X DELETE \
  -u <username>:<password> \
  https://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/44056/admin/user/attribute/rule/1

响应

删除成功。

响应
无内容

获取目录筛选规则Server-sideAdmin

请求

获取应用于用户属性的指定规则。

安全
basicAuth
路径
project_idinteger必需

项目ID。您可以在您的发布商帐户项目名称旁边找到。

示例: 44056
rule_idnumber必需

规则ID。

示例: 1
curl -i -X GET \
  -u <username>:<password> \
  https://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/44056/admin/user/attribute/rule/1

响应

规则已成功接收。

正文application/json
attribute_conditionsArray of type = string (object) or type = number (object) or type = date (object)(personalized-catalog_user-attribute_conditions_model-get)[ 1 .. 100 ] items必需

用户属性验证条件。 根据用户属性是否满足所有指定条件来确定目录商品可用性。

One of:
attribute_conditions[].​attributestring(user-attribute_conditions_properties_attribute)[ 1 .. 255 ] characters^[-_.\d\w]+$

用户属性代码。

attribute_conditions[].​can_be_missingboolean(user-attribute_conditions_properties_can_be_missing)

表示即使用户属性中缺少属性仍满足条件。传递true可向不具有此属性的用户显示该项目。具有该属性但值与条件中指定的值不匹配的用户将看不到该商品。传递false则具有该属性但值与条件中指定的值不匹配或缺少该属性的用户将看不到该商品。

attribute_conditions[].​operatorstring(user-attribute_conditions_properties_operator_string)

按条件执行的操作类型。用于string属性类型。

枚举 值描述
eq

等于

ne

不等于

attribute_conditions[].​typestring(user-attribute_conditions_properties_type-string)

用户属性类型。

"string"
attribute_conditions[].​valuestring(user-attribute_conditions_properties_value)<= 255 characters

与用户属性值进行比较的条件值。类型取决于属性类型。

is_enabledboolean必需

如果已启用规则。

is_satisfied_for_unauthboolean

是否向未经授权的用户显示该商品。如为true,无论目录显示规则如何,该商品都会向未经授权的用户显示。默认为false

itemsArray of objects必需
items[].​bundle_typestring

捆绑类型。商品类型是捆绑包时返回。

枚举"standard""virtual_currency_package"
items[].​item_idnumber

物品ID。

items[].​namestring

商品名称。

items[].​skustring

物品 SKU。

items[].​typestring

商品类型。

枚举"virtual_good""virtual_currency""bundle""physical_good""unit"
namestring必需

规则的可读名称。用于在发布商帐户中显示规则。

rule_idnumber必需

规则ID。

响应
application/json
{ "attribute_conditions": [ {} ], "is_enabled": true, "is_satisfied_for_unauth": true, "items": [ {} ], "name": "Ork race armor rule", "rule_id": 1 }
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作

目录

本API允许获取任意类型的可售商品或指定商品。

操作
操作
操作
操作
操作
操作

优惠券

此API让您可以管理优惠券。

操作

促销码

此API让您可以管理促销码。

操作

特别目录优惠

此API让您可以管理特别目录优惠活动。

操作

折扣

此API让您可以管理折扣促销活动。

操作

奖励

此API让您可以管理奖励促销活动。

操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作