跳转到内容

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

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

目录

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

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

优惠券

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

操作

促销码

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

操作

特别目录优惠

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

操作

折扣

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

操作

奖励

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

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

获取当前用户的优惠链Client-side

请求

获取当前用户的优惠链。

注意

所有项目的单次响应中返回的商品数量都有上限。默认值和最大值为每次响应30个商品。如需更多数据,可通过limitoffset参数分页获取。
安全
XsollaLoginUserJWT
路径
project_idinteger必需

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

示例: 44056
查询
limitinteger>= 1

页面上元素数量的限制。

示例: limit=50
offsetinteger>= 0

元素编号,从该元素开始生成列表(从0开始数)。

示例: offset=0
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/44056/user/offer_chain?limit=50&offset=0' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

响应

优惠链列表接收成功。

正文application/json
has_moreboolean

是否有更多分页。

示例: true
itemsArray of objects(client-offer-chain-model)
total_items_countinteger

可用优惠链总数。

示例: 10
响应
application/json
{ "has_more": false, "items": [ {}, {}, {} ], "total_items_count": 3 }

根据ID获取当前用户的优惠链Client-side

请求

根据优惠链ID获取当前用户的优惠链。

安全
XsollaLoginUserJWT
路径
project_idinteger必需

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

示例: 44056
offer_chain_idinteger必需

优惠链ID。

示例: 101
curl -i -X GET \
  https://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/44056/user/offer_chain/101 \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

响应

成功获取用户的优惠链。

正文application/json
date_endstring or null(date-time)(offer_chain_date_end)

优惠链结束日期。可为null,若date_endnull则无时间限制。

示例: "2020-04-15T18:16:00+05:00"
date_startstring(date-time)(offer_chain_date_start)

优惠链开始日期。

示例: "2020-04-15T18:16:00+05:00"
descriptionstring or null

优惠链描述。

示例: "Major weekly quest"
idinteger

优惠链ID。

示例: 9
namestring

优惠链名称。

示例: "Weekly quest"
next_step_numberinteger or null

下一步优惠链步骤编号,若优惠链已完成则为null

示例: 1
orderinteger(order)

定义排列顺序。

示例: 1
recurrent_scheduleobject or null(offer_chain_recurrent_schedule_client_side)

优惠链的重置周期。

stepsArray of objects(client-offer-chain-step-model)
响应
application/json
{ "date_end": "2025-04-25T18:16:00+05:00", "date_start": "2010-04-15T18:16:00+05:00", "description": null, "id": 4, "name": "Offer chain with bundles", "next_step_number": 1, "order": 1, "recurrent_schedule": null, "steps": [ {}, {} ] }

领取免费优惠链步骤奖励Client-side

请求

完成当前用户的优惠链步骤进程,并发放相关奖励。

注意

仅对优惠链中的免费步骤使用此调用。 对于需要以真实货币支付的步骤,请改用为付费优惠链步骤创建订单调用。
安全
XsollaLoginUserJWT
路径
project_idinteger必需

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

示例: 44056
offer_chain_idinteger必需

优惠链ID。

示例: 101
step_numberinteger必需

优惠链步骤编号。

示例: 1
curl -i -X POST \
  https://xsolla.redocly.app/_mock/zh/api/shop-builder/v2/project/44056/user/offer_chain/101/step/number/1/claim \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

响应

成功领取了免费步骤且奖励发放成功。

正文application/json
order_idinteger

订单ID。

响应
application/json
{ "order_id": 641 }
操作
操作
操作
操作
操作