components:
  examples:
    Player-Inventory_inventory_purchase_request_example:
      value:
        - purchase:
            amount: '3.5'
            comment: xsolla
            currency: USD
            custom_parameters:
              - user_device_info:
                  engine_version: Unity 2020.2.0b5
                  os: windows
                user_public_id:
                  nickname: player1
              - comment: xsolla
                custom_parameters:
                  content_creator_rewards:
                    - content_creator:
                        id: cc1
                      reward:
                        amount: '10.00'
                        currency: USD
                    - content_creator:
                        id: cc2
                      reward:
                        amount: '15.00'
                        currency: RUB
                items:
                  - quantity: 5
                    sku: com.xsolla.panda_sdk3
                  - quantity: 3
                    sku: com.xsolla.panda_sdk2
                platform: xsolla
                purchase:
                  amount: '3.5'
                  currency: USD
                  external_purchase_date: '2020-01-01T00:00:00+05:00'
                  external_purchase_id: '1000001'
                user:
                  id: 83857636-65b4-11e8-9ccb-42010a8a001c
            external_purchase_date: '2020-01-01T00:00:00+05:00'
            external_purchase_id: '1000000'
            items:
              - quantity: 5
                sku: com.xsolla.panda_sdk1
              - quantity: 3
                sku: com.xsolla.panda_sdk2
            platform: xsolla
            user:
              id: 672c91cd-65db-4b6e-ad68-6e93b21249d8
  parameters:
    limit-query-param:
      description: 页面上元素数量的限制。
      example: 50
      in: query
      name: limit
      required: false
      schema:
        example: 50
        minimum: 1
        type: integer
    offset-query-param:
      description: 元素编号，从该元素开始生成列表（从0开始数）。
      example: 0
      in: query
      name: offset
      required: false
      schema:
        example: 0
        minimum: 0
        type: integer
    project_id-path-param:
      description: 项目编号。您可以在您的[发布商帐户](https://publisher.xsolla.com/)项目名称旁边。
      in: path
      name: project_id
      required: true
      schema:
        example: 44056
        type: integer
  responses:
    Player-Inventory_401-invalid-basic-auth:
      content:
        application/json:
          examples:
            response:
              value:
                errorCode: 1020
                errorMessage: '[0401-1020]: Error in Authentication method occurred'
                statusCode: 401
          schema:
            properties:
              errorCode:
                example: 1020
                type: integer
              errorMessage:
                example: '[0401-1020]: Error in Authentication method occurred'
                type: string
              statusCode:
                example: 401
                type: integer
            type: object
      description: 基本认证未通过或错误。确保您使用了基本认证或正确的凭据。
  schemas:
    Player-Inventory_client-attributes:
      default: []
      description: 与商品对应的属性及其值的列表。可用于目录筛选。
      example:
        value:
          external_id: genre
          name: Жанр
          values:
            - external_id: genre_e3364991f92e751689a68b96598a5a5a84010b85
              value: Casual
            - external_id: genre_eba07bfd0f982940773cba3744d97264dd58acd7
              value: Strategy
            - external_id: genre_b8d0c6d8f0524c2b2d79ebb93aa3cd0e8b5199a8
              value: Mobile
      items:
        properties:
          external_id:
            $ref: '#/components/schemas/admin-attribute-external_id'
          name:
            description: 属性名称。
            example: Genre
            type: string
          values:
            items:
              properties:
                external_id:
                  $ref: '#/components/schemas/value-external_id'
                value:
                  description: 属性值。
                  example: Strategy
                  type: string
              type: object
            type: array
        type: object
      type: array
    Player-Inventory_custom_parameters:
      additionalProperties:
        oneOf:
          - type: array
          - type: object
          - type: string
          - type: integer
          - type: 'null'
          - type: number
          - type: boolean
      description: 项目特定参数。
      example:
        array_param:
          - user_device_info:
              engine_version: Unity 2020.2.0b5
              os: windows
            user_public_id:
              nickname: player1
          - user_device_info:
              engine_version: UE 4.25
              os: mac
            user_public_id:
              nickname: player1
        bool_param: true
        int_param: 100
        null_param: null
        object_param:
          key: value
      maxProperties: 200
      minProperties: 1
      type: object
    admin-attribute-external_id:
      description: 唯一属性ID。 `external_id`只能包含大小写英文字母和数字字符、破折号和下划线。
      example: attribute_1
      maxLength: 255
      minLength: 1
      pattern: ^[a-zA-Z0-9-_]+$
      type: string
    value-external_id:
      description: 属性的唯一值ID。 `external_id`只能包含小写英文字母和数字字符、破折号和下划线。
      example: attribute_value
      maxLength: 255
      minLength: 1
      pattern: ^[-_.\d\w]+$
      type: string
  securitySchemes:
    XsollaLoginUserJWT:
      bearerFormat: JWT
      description: >-
        默认情况下使用艾克索拉登录管理器用户JWT（持有者令牌）进行授权。您可以尝试使用艾克索拉登录管理器测试用户JWT令牌来调用此端点：`Bearer
        eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE5NjIyMzQwNDgsImlzcyI6Imh0dHBzOi8vbG9naW4ueHNvbGxhLmNvbSIsImlhdCI6MTU2MjE0NzY0OCwidXNlcm5hbWUiOiJ4c29sbGEiLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6IjA2SWF2ZHpDeEVHbm5aMTlpLUc5TmMxVWFfTWFZOXhTR3ZEVEY4OFE3RnMiLCJzdWIiOiJkMzQyZGFkMi05ZDU5LTExZTktYTM4NC00MjAxMGFhODAwM2YiLCJlbWFpbCI6InN1cHBvcnRAeHNvbGxhLmNvbSIsInR5cGUiOiJ4c29sbGFfbG9naW4iLCJ4c29sbGFfbG9naW5fcHJvamVjdF9pZCI6ImU2ZGZhYWM2LTc4YTgtMTFlOS05MjQ0LTQyMDEwYWE4MDAwNCIsInB1Ymxpc2hlcl9pZCI6MTU5MjR9.GCrW42OguZbLZTaoixCZgAeNLGH2xCeJHxl8u8Xn2aI`。


        您也可以用[支付中心访问令牌](https://developers.xsolla.com/zh/api/pay-station/operation/create-token/)作为替代。
      scheme: bearer
      type: http
    basicAuth:
      description: >
        Xsolla API 使用基本访问身份验证。所有对 API 的请求都必须包含`Authorization: Basic 

        <your_authorization_basic_key>`标题，其中`your_authorization_basic_key`是个`project_id:

        api_key`根据 Base64 标准进行编码。


        您可以使用`merchant_id` 而不是`project_id` 如果需要的话。它不会影响功能。


        去[发布商帐户](https://publisher.xsolla.com/)查找参数值：


        * `merchant_id` 显示为：
          * 在 **公司设置 > 公司** 部分
          * 在任何发布商帐户页面的浏览器地址栏中的 URL 中。URL 
            的格式如下：`https://publisher.xsolla.com/<merchant_id>`。
        * `api_key` 创建后仅在发布商帐户中显示一次，并且必须存储在您这边。您可以在以下部分创建新密钥：
          * **公司设置 > API 密钥**
          * **项目设置 > API 密钥**
        * `project_id` 显示为：
          * 在发布者帐户中，项目名称旁边。
          * 在发布者帐户中处理项目时，浏览器地址栏中的 URL。URL 
            格式如下：`https://publisher.xsolla.com/<merchant_id>/projects/<project_id>`。

        有关使用 API 密钥的更多信息，请参阅[API
        参考](https://developers.xsolla.com/zh/api/getting-started/#api_keys_overview)。
      scheme: basic
      type: http
info:
  description: >-
    # Overview


    * **Version:** 2.0.0

    * **Servers**: `https://store.xsolla.com/api`

    * **[Contact Us by Email](mailto:integration@xsolla.com)**

    * **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.
  title: Shop Builder API
  version: 2.0.0
openapi: 3.0.0
paths:
  /v2/project/{project_id}/inventory/account/link:
    post:
      description: 将用户游戏帐户与艾克索拉帐户关联起来。
      operationId: inventory-account-link
      parameters:
        - description: 项目ID。
          in: path
          name: project_id
          required: true
          schema:
            default: 44056
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              properties:
                linking_code:
                  description: 关联码。用户使用它准许其帐户与艾克索拉帐户的关联。
                  example: 53LRH2
                  type: string
                platform:
                  description: 用户玩游戏的发布平台。
                  enum:
                    - playstation_network
                    - xbox_live
                    - xsolla
                    - pc_standalone
                    - nintendo_shop
                    - google_play
                    - app_store_ios
                    - android_standalone
                    - ios_standalone
                    - android_other
                    - ios_other
                    - pc_other
                  example: xbox_live
                  type: string
                user_id:
                  description: 用户玩游戏的发布平台的用户ID。
                  example: platform_user_id
                  type: string
              required:
                - linking_code
                - platform
                - user_id
              type: object
        required: true
      responses:
        '204':
          description: 用户游戏帐户与艾克索拉帐户关联成功。
        '401':
          $ref: '#/components/responses/Player-Inventory_401-invalid-basic-auth'
        '422':
          content:
            application/json:
              examples:
                response:
                  value:
                    errorCode: 1102
                    errorMessage: >-
                      [0401-1102]: Unprocessable Entity. The property
                      publisher_project_id is required
                    statusCode: 422
              schema:
                properties:
                  errorCode:
                    example: 1102
                    type: integer
                  errorMessage:
                    example: >-
                      [0401-1102]: Unprocessable Entity. The property
                      publisher_project_id is required
                    type: string
                  statusCode:
                    example: 422
                    type: integer
                type: object
          description: 属性`linking_code`为必需。请确保在请求中传入它。
      security:
        - basicAuth: []
      summary: 将游戏帐户连接到艾克索拉
      tags:
        - cross-inventory
      x-badges:
        - color: '#95ff80'
          name: Server-side
  /v2/project/{project_id}/inventory/account/signin:
    post:
      description: 获取JWT，以便为您发布平台的用户操作Shop Builder API。
      operationId: inventory-account-signin
      parameters:
        - description: 项目ID。
          in: path
          name: project_id
          required: true
          schema:
            default: 44056
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              properties:
                platform:
                  description: 用户玩游戏的发布平台。
                  enum:
                    - playstation_network
                    - xbox_live
                    - xsolla
                    - pc_standalone
                    - nintendo_shop
                    - google_play
                    - app_store_ios
                    - android_standalone
                    - ios_standalone
                    - android_other
                    - ios_other
                    - pc_other
                  example: xbox_live
                  type: string
                user_id:
                  description: 用户玩游戏的发布平台上的用户ID。
                  example: platform_user_id
                  type: string
              required:
                - user_id
                - platform
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  token:
                    example: >-
                      eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE5NjIyMzQwNDgsImlzcyI6Imh0dHBzOi8vbG9naW4ueHNvbGxhLmNvbSIsImlhdCI6MTU2MjE0NzY0OCwidXNlcm5hbWUiOiJ4c29sbGEiLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6IjA2SWF2ZHpDeEVHbm5aMTlpLUc5TmMxVWFfTWFZOXhTR3ZEVEY4OFE3RnMiLCJzdWIiOiJkMzQyZGFkMi05ZDU5LTExZTktYTM4NC00MjAxMGFhODAwM2YiLCJlbWFpbCI6InN1cHBvcnRAeHNvbGxhLmNvbSIsInR5cGUiOiJ4c29sbGFfbG9naW4iLCJ4c29sbGFfbG9naW5fcHJvamVjdF9pZCI6ImU2ZGZhYWM2LTc4YTgtMTFlOS05MjQ0LTQyMDEwYWE4MDAwNCIsInB1Ymxpc2hlcl9pZCI6MTU5MjR9.GCrW42OguZbLZTaoixCZgAeNLGH2xCeJHxl8u8Xn2aI
                    type: string
                type: object
          description: 用户的游戏帐户已成功令牌化。
        '401':
          $ref: '#/components/responses/Player-Inventory_401-invalid-basic-auth'
        '422':
          content:
            application/json:
              examples:
                response:
                  value:
                    errorCode: 1102
                    errorMessage: >-
                      [0401-1102]: Unprocessable Entity. The property
                      publisher_project_id is required
                    statusCode: 422
              schema:
                properties:
                  errorCode:
                    example: 1102
                    type: integer
                  errorMessage:
                    example: >-
                      [0401-1102]: Unprocessable Entity. The property
                      publisher_project_id is required
                    type: string
                  statusCode:
                    example: 422
                    type: integer
                type: object
          description: 属性`user_id`为必需。请确保在请求中传入它。
      security:
        - basicAuth: []
      summary: 用户令牌化
      tags:
        - cross-inventory
      x-badges:
        - color: '#95ff80'
          name: Server-side
  /v2/project/{project_id}/inventory/purchase:
    post:
      description: >-
        按购买项将指定商品添加到指定的用户物品库中。


        <div class="notice"><strong>注意：</strong>
        <br><br><strong>一次只能处理50个操作</strong>。超出此限制的操作将被忽略。</div>
      operationId: grant-item-by-purchase
      parameters:
        - description: 项目ID。
          in: path
          name: project_id
          required: true
          schema:
            default: 44056
            type: integer
      requestBody:
        content:
          application/json:
            examples:
              example:
                $ref: >-
                  #/components/examples/Player-Inventory_inventory_purchase_request_example
            schema:
              items:
                properties:
                  comment:
                    default: Monthly challenge rewards
                    description: 操作说明。例如：“每月挑战奖励”。
                    maxLength: 255
                    minLength: 1
                    type: string
                  custom_parameters:
                    $ref: '#/components/schemas/Player-Inventory_custom_parameters'
                  items:
                    items:
                      properties:
                        quantity:
                          default: 1
                          description: 需要发放的此类商品数。
                          type: number
                        sku:
                          default: booster_mega_1
                          description: 商品类标识符。SKU只能包含小写英文字母、数字字符、句点、破折号和下划线。
                          type: string
                      required:
                        - sku
                        - platform
                        - quantity
                      type: object
                    minItems: 1
                    type: array
                  platform:
                    default: xsolla
                    description: 用户玩游戏的发布平台。
                    enum:
                      - playstation_network
                      - xbox_live
                      - xsolla
                      - pc_standalone
                      - nintendo_shop
                      - google_play
                      - app_store_ios
                      - android_standalone
                      - ios_standalone
                      - android_other
                      - ios_other
                      - pc_other
                    type: string
                  purchase:
                    properties:
                      amount:
                        default: '2.99'
                        description: 扣除任何减项前的购买金额。
                        type: string
                      currency:
                        default: USD
                        description: >-
                          符合[ISO
                          4217](https://en.wikipedia.org/wiki/ISO_4217)格式的购买货币。
                        type: string
                      external_purchase_date:
                        default: '2020-01-01T05:00:00+05:00'
                        description: 符合ISO 8601格式的购买日期。
                        type: string
                      external_purchase_id:
                        default: 10-534-35
                        description: 来自购买平台的购买发票标识符。
                        type: string
                    required:
                      - amount
                      - currency
                      - external_purchase_id
                      - external_purchase_date
                    type: object
                  user:
                    properties:
                      id:
                        default: d342dad2-9d59-11e9-a384-42010aa8003f
                        description: 平台上的唯一用户标识符。
                        type: string
                    type: object
                required:
                  - user
                  - items
                  - purchase
                type: object
              type: array
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    count: 2
                    operations:
                      - amount: '2.99'
                        comment: Quest completed
                        currency: USD
                        custom_parameters:
                          array_param:
                            - user_device_info:
                                engine_version: Unity 2020.2.0b5
                                os: windows
                              user_public_id:
                                nickname: player1
                            - user_device_info:
                                engine_version: UE 4.25
                                os: mac
                              user_public_id:
                                nickname: player2
                        external_purchase_date: '2020-01-01T05:00:00+05:00'
                        external_purchase_id: 10-534-35
                        items:
                          - quantity: 5
                            sku: com.xsolla.boots_1
                          - quantity: 3
                            sku: com.xsolla.crystal_pack_1
                        order_id: 123456
                        platform: xbox_live
                        user_id: 0125760a-6810-11e9-84c0-42010aa80029
                      - amount: '2.99'
                        comment: Daily reward
                        currency: USD
                        custom_parameters: null
                        external_purchase_date: '2020-01-01T05:00:00+05:00'
                        external_purchase_id: 10-534-35
                        items:
                          - quantity: 2
                            sku: com.xsolla.helmet_1
                          - quantity: 3
                            sku: com.xsolla.minigun_1
                        order_id: 123457
                        platform: xbox_live
                        user_id: a7d10a4e-3f68-43cc-a6b2-893d2c68fd14
              schema:
                properties:
                  count:
                    example: 10
                    type: integer
                  operations:
                    items:
                      properties:
                        amount:
                          description: 扣除任何减项前的购买金额。
                          example: '2.99'
                          type: string
                        comment:
                          description: 操作说明。例如：“每月挑战奖励”。
                          example: Montly challange rewards
                          type: string
                        currency:
                          description: >-
                            符合[ISO
                            4217](https://en.wikipedia.org/wiki/ISO_4217)格式的购买货币。
                          example: USD
                          type: string
                        custom_parameters:
                          $ref: >-
                            #/components/schemas/Player-Inventory_custom_parameters
                        external_purchase_date:
                          description: 符合ISO 8601格式的购买日期。
                          example: '2020-01-01T05:00:00+05:00'
                          type: string
                        external_purchase_id:
                          description: 来自购买平台的购买发票标识符。
                          example: 10-534-35
                          type: string
                        items:
                          items:
                            properties:
                              quantity:
                                description: 需要发放的此类商品数。
                                example: 1
                                type: integer
                              sku:
                                description: 商品类标识符。SKU只能包含小写英文字母、数字字符、句点、破折号和下划线。
                                example: com.xsolla.item_1
                                type: string
                            type: object
                          type: array
                        order_id:
                          description: 艾克索拉侧的操作说明。
                          example: 123456
                          type: number
                        platform:
                          description: 用户玩游戏的发布平台。
                          enum:
                            - playstation_network
                            - xbox_live
                            - xsolla
                            - pc_standalone
                            - nintendo_shop
                            - google_play
                            - app_store_ios
                            - android_standalone
                            - ios_standalone
                            - android_other
                            - ios_other
                            - pc_other
                          example: xbox_live
                          type: string
                        user_id:
                          description: 平台上的唯一用户标识符。
                          example: d.user
                          type: string
                      type: object
                    type: array
                type: object
          description: 用户购买成功。
        '422':
          content:
            application/json:
              schema:
                items:
                  properties:
                    errorCode:
                      description: 错误代码。
                      example: 1102
                      type: integer
                    errorMessage:
                      description: 错误消息。
                      example: >-
                        [0401-1102]: Unprocessable Entity. The property sku is
                        required
                      type: string
                    statusCode:
                      example: 422
                      type: integer
                  type: object
                type: array
            incorrect_format_input_data:
              examples:
                response:
                  value:
                    errorCode: 1102
                    errorMessage: >-
                      [0401-1102]: Unprocessable Entity. The property sku is
                      required
                    statusCode: 422
          description: 无法处理的项。
      security:
        - basicAuth: []
      summary: 按购买项向用户发放商品
      tags:
        - inventory-management
      x-badges:
        - color: '#95ff80'
          name: Server-side
        - color: '#d7dee0'
          name: Admin
  /v2/project/{project_id}/inventory/revoke:
    post:
      description: >-
        撤销对多个用户的商品访问权限。


        <div class="notice"><strong>注意：</strong><br><br>
        <strong>一次只能处理50个操作</strong>。超出此限制的操作将被忽略。</div>
      operationId: revoke-item
      parameters:
        - description: 项目ID。
          in: path
          name: project_id
          required: true
          schema:
            default: 44056
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              items:
                properties:
                  comment:
                    default: Item was transferred to another player
                    description: 操作说明。例如：“商品已转移给另一个玩家”。
                    maxLength: 255
                    minLength: 1
                    type: string
                  items:
                    items:
                      properties:
                        quantity:
                          default: 1
                          description: 需要撤销的此类商品数。
                          minimum: 1
                          type: integer
                        sku:
                          default: booster_mega_1
                          description: 唯一商品ID。 SKU只能包含大小写英文字母和数字字符、句点、破折号和下划线。
                          minLength: 1
                          type: string
                      required:
                        - sku
                        - quantity
                      type: object
                    minItems: 1
                    type: array
                  platform:
                    default: xsolla
                    description: 用户玩游戏的发布平台。
                    enum:
                      - playstation_network
                      - xbox_live
                      - xsolla
                      - pc_standalone
                      - nintendo_shop
                      - google_play
                      - app_store_ios
                      - android_standalone
                      - ios_standalone
                      - android_other
                      - ios_other
                      - pc_other
                    example: xsolla
                    type: string
                  user:
                    properties:
                      id:
                        default: d342dad2-9d59-11e9-a384-42010aa8003f
                        description: 平台上的唯一用户标识符。
                        type: string
                    type: object
                required:
                  - user
                  - items
                type: object
              type: array
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    count: 2
                    operations:
                      - comment: Remove from inventory
                        items:
                          - balance: 3
                            quantity: 5
                            sku: com.xsolla.boots_1
                          - balance: 5
                            quantity: 3
                            sku: com.xsolla.crystal_pack_1
                        platform: xsolla
                        user_id: 0125760a-6810-11e9-84c0-42010aa80029
                      - comment: Cheater
                        items:
                          - balance: 0
                            quantity: 2
                            sku: com.xsolla.helmet_1
                          - balance: 0
                            quantity: 3
                            sku: com.xsolla.minigun_1
                        platform: xsolla
                        user_id: a7d10a4e-3f68-43cc-a6b2-893d2c68fd14
              schema:
                properties:
                  count:
                    description: 成功撤回其商品的用户数量。
                    example: 10
                    type: integer
                  operations:
                    description: 操作说明。
                    items:
                      properties:
                        comment:
                          description: 操作说明。例如：“商品已转移给另一个玩家”。
                          example: Some comment for this operation
                          type: string
                        items:
                          description: 此操作中的商品。
                          items:
                            properties:
                              balance:
                                description: 用户拥有的此类商品总数。
                                example: 1
                                type: integer
                              quantity:
                                description: 已撤销的此类商品数。
                                example: 1
                                type: integer
                              sku:
                                description: 商品类标识符。SKU只能包含小写英文字母、数字字符、句点、破折号和下划线。
                                example: com.xsolla.item_1
                                type: string
                            type: object
                          type: array
                        platform:
                          default: xsolla
                          enum:
                            - playstation_network
                            - xbox_live
                            - xsolla
                            - pc_standalone
                            - nintendo_shop
                            - google_play
                            - app_store_ios
                            - android_standalone
                            - ios_standalone
                            - android_other
                            - ios_other
                            - pc_other
                          example: xbox_live
                          type: string
                        user_id:
                          description: 平台上的唯一用户标识符。
                          example: d.user
                          type: string
                      type: object
                    type: array
                type: object
          description: 用户商品撤回成功。
        '404':
          content:
            application/json:
              schema:
                items:
                  properties:
                    errorCode:
                      description: 错误代码。
                      example: 4001
                      type: integer
                    errorMessage:
                      description: 错误消息。
                      example: >-
                        [0401-5004]: Could not find instance in inventory: Could
                        not remove 10, user only has 1
                      type: string
                    statusCode:
                      example: 404
                      type: integer
                  type: object
                type: array
            incorrect_format_input_data:
              examples:
                response:
                  value:
                    errorCode: 1104
                    errorMessage: >-
                      [0401-1102]: Unprocessable Entity. The property sku is
                      required
                    statusCode: 404
            many_items:
              examples:
                response:
                  value:
                    errorCode: 5004
                    errorMessage: >-
                      [0401-4001]: Could not find item for project 44056 with id
                      armor_max ()
                    statusCode: 404
            not_found_user:
              examples:
                response:
                  value:
                    errorCode: 0
                    errorMessage: Could not find User
                    statusCode: 404
            remove_many:
              examples:
                response:
                  value:
                    errorCode: 4001
                    errorMessage: >-
                      [0401-5004]: Could not find instance in inventory: Could
                      not remove 10, user only has 1
                    statusCode: 404
          description: 无法删除此数量的商品。
      security:
        - basicAuth: []
      summary: 撤回物品库商品
      tags:
        - inventory-management
      x-badges:
        - color: '#95ff80'
          name: Server-side
        - color: '#d7dee0'
          name: Admin
  /v2/project/{project_id}/inventory/reward:
    post:
      description: >-
        将指定商品添加到指定的用户物品库中。


        <div class="notice"><strong>注意：</strong><br><br>
        <strong>一次只能处理50个操作</strong>。超出此限制的操作将被忽略。</div>
      operationId: add-item-to-inventory
      parameters:
        - description: 项目ID。
          in: path
          name: project_id
          required: true
          schema:
            default: 44056
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              items:
                properties:
                  comment:
                    default: Monthly challenge rewards
                    description: 操作说明。例如：“每月挑战奖励”。
                    maxLength: 255
                    minLength: 1
                    type: string
                  items:
                    items:
                      properties:
                        quantity:
                          default: 1
                          description: 需要发放的此类商品数。
                          type: number
                        sku:
                          default: booster_mega_1
                          description: 商品类标识符。SKU只能包含小写英文字母、数字字符、句点、破折号和下划线。
                          type: string
                      required:
                        - sku
                        - platform
                        - quantity
                      type: object
                    minItems: 1
                    type: array
                  platform:
                    default: xsolla
                    description: 用户玩游戏的发布平台。
                    enum:
                      - playstation_network
                      - xbox_live
                      - xsolla
                      - pc_standalone
                      - nintendo_shop
                      - google_play
                      - app_store_ios
                      - android_standalone
                      - ios_standalone
                      - android_other
                      - ios_other
                      - pc_other
                    type: string
                  user:
                    properties:
                      id:
                        default: d342dad2-9d59-11e9-a384-42010aa8003f
                        description: 平台上的唯一用户标识符。
                        type: string
                    type: object
                required:
                  - user
                  - items
                type: object
              type: array
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    count: 2
                    operations:
                      - comment: Quest completed
                        items:
                          - balance: 5
                            quantity: 5
                            sku: com.xsolla.boots_1
                          - balance: 3
                            quantity: 3
                            sku: com.xsolla.crystal_pack_1
                        platform: xsolla
                        user_id: 0125760a-6810-11e9-84c0-42010aa80029
                      - comment: Daily reward
                        items:
                          - balance: 5
                            quantity: 2
                            sku: com.xsolla.helmet_1
                          - balance: 5
                            quantity: 3
                            sku: com.xsolla.minigun_1
                        platform: xsolla
                        user_id: a7d10a4e-3f68-43cc-a6b2-893d2c68fd14
              schema:
                properties:
                  count:
                    example: 10
                    type: integer
                  operations:
                    items:
                      properties:
                        comment:
                          description: 操作说明。例如：“每月挑战奖励”。
                          example: Montly challange rewards
                          type: string
                        items:
                          items:
                            properties:
                              balance:
                                description: 用户拥有的此类商品总数。
                                example: 5
                                type: integer
                              quantity:
                                description: 需要发放的此类商品数。
                                example: 1
                                type: integer
                              sku:
                                description: 商品类标识符。SKU只能包含小写英文字母、数字字符、句点、破折号和下划线。
                                example: com.xsolla.item_1
                                type: string
                            type: object
                          type: array
                        platform:
                          description: 用户玩游戏的发布平台。
                          enum:
                            - null
                            - playstation_network
                            - xbox_live
                            - xsolla
                            - pc_standalone
                            - nintendo_shop
                            - google_play
                            - app_store_ios
                            - android_standalone
                            - ios_standalone
                            - android_other
                            - ios_other
                            - pc_other
                          example: xbox_live
                          nullable: true
                          type: string
                        user_id:
                          description: 平台上的唯一用户标识符。
                          example: d.user
                          type: string
                      type: object
                    type: array
                type: object
          description: 用户奖励成功。
        '404':
          content:
            application/json:
              schema:
                items:
                  properties:
                    errorCode:
                      description: 错误代码。
                      example: 4001
                      type: integer
                    errorMessage:
                      description: 错误消息。
                      example: >-
                        [0401-4001]: Could not find item for project 44056 with
                        id armor_max ()
                      type: string
                    statusCode:
                      example: 404
                      type: integer
                  type: object
                type: array
            incorrect_format_input_data:
              examples:
                response:
                  value:
                    errorCode: 1104
                    errorMessage: >-
                      [0401-1102]: Unprocessable Entity. The property sku is
                      required
                    statusCode: 404
            many_items:
              examples:
                response:
                  value:
                    errorCode: 5004
                    errorMessage: >-
                      [0401-4001]: Could not find item for project 44056 with id
                      armor_max ()
                    statusCode: 404
            not_found_user:
              examples:
                response:
                  value:
                    errorCode: 0
                    errorMessage: Could not find User
                    statusCode: 404
          description: 未找到项目的商品。
      security:
        - basicAuth: []
      summary: 向用户发放商品
      tags:
        - inventory-management
      x-badges:
        - color: '#95ff80'
          name: Server-side
        - color: '#d7dee0'
          name: Admin
  /v2/project/{project_id}/inventory/set:
    post:
      description: >-
        将指定商品设置到指定物品库。注意，新数据将替换旧数据。


        <div class="notice"><strong>注意：</strong><br><br>
        <strong>一次只能处理50个操作</strong>。超出此限制的操作将被忽略。</div>
      operationId: set-item-quantity
      parameters:
        - description: 项目ID。
          in: path
          name: project_id
          required: true
          schema:
            default: 44056
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              items:
                properties:
                  comment:
                    default: Monthly inventory syncing
                    description: 操作说明。例如：“每月物品库同步”。
                    maxLength: 255
                    minLength: 1
                    type: string
                  items:
                    items:
                      properties:
                        quantity:
                          default: 1
                          description: 需要发放的此类商品数。
                          type: number
                        sku:
                          default: booster_mega_1
                          description: 商品类标识符。SKU只能包含小写英文字母、数字字符、句点、破折号和下划线。
                          type: string
                      required:
                        - sku
                        - platform
                        - quantity
                      type: object
                    minItems: 1
                    type: array
                  platform:
                    default: xsolla
                    description: 用户玩游戏的发布平台。
                    enum:
                      - playstation_network
                      - xbox_live
                      - xsolla
                      - pc_standalone
                      - nintendo_shop
                      - google_play
                      - app_store_ios
                      - android_standalone
                      - ios_standalone
                      - android_other
                      - ios_other
                      - pc_other
                    type: string
                  user:
                    properties:
                      id:
                        default: d342dad2-9d59-11e9-a384-42010aa8003f
                        description: 平台上的唯一用户标识符。
                        type: string
                    type: object
                required:
                  - user
                  - items
                type: object
              type: array
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    count: 2
                    operations:
                      - comment: Monthly inventory syncing
                        items:
                          - balance: 5
                            quantity: 5
                            sku: com.xsolla.boots_1
                          - balance: 3
                            quantity: 3
                            sku: com.xsolla.crystal_pack_1
                        platform: xsolla
                        user_id: 0125760a-6810-11e9-84c0-42010aa80029
                      - comment: Monthly inventory syncing
                        items:
                          - balance: 2
                            quantity: 2
                            sku: com.xsolla.helmet_1
                          - balance: 3
                            quantity: 3
                            sku: com.xsolla.minigun_1
                        platform: xsolla
                        user_id: a7d10a4e-3f68-43cc-a6b2-893d2c68fd14
              schema:
                properties:
                  count:
                    example: 10
                    type: integer
                  operations:
                    items:
                      properties:
                        comment:
                          description: 操作说明。例如：“每日物品库同步”。
                          example: Daily inventory syncing
                          type: string
                        items:
                          items:
                            properties:
                              balance:
                                description: 用户拥有的此类商品总数。
                                example: 5
                                type: integer
                              quantity:
                                description: 需要发放的此类商品数。
                                example: 1
                                type: integer
                              sku:
                                description: 商品类标识符。SKU只能包含小写英文字母、数字字符、句点、破折号和下划线。
                                example: com.xsolla.item_1
                                type: string
                            type: object
                          type: array
                        platform:
                          description: 用户玩游戏的发布平台。
                          enum:
                            - playstation_network
                            - xbox_live
                            - xsolla
                            - pc_standalone
                            - nintendo_shop
                            - google_play
                            - app_store_ios
                            - android_standalone
                            - ios_standalone
                            - android_other
                            - ios_other
                            - pc_other
                          example: xbox_live
                          type: string
                        user_id:
                          description: 平台上的唯一用户标识符。
                          example: d.user
                          type: string
                      type: object
                    type: array
                type: object
          description: 响应成功。
        '404':
          content:
            application/json:
              schema:
                items:
                  properties:
                    errorCode:
                      description: 错误代码。
                      example: 4001
                      type: integer
                    errorMessage:
                      description: 错误消息。
                      example: >-
                        [0401-4001]: Could not find item for project 44056 with
                        id armor_max ()
                      type: string
                    statusCode:
                      example: 404
                      type: integer
                  type: object
                type: array
            incorrect_format_input_data:
              examples:
                response:
                  value:
                    errorCode: 1104
                    errorMessage: >-
                      [0401-1102]: Unprocessable Entity. The property sku is
                      required
                    statusCode: 404
            many_items:
              examples:
                response:
                  value:
                    errorCode: 5004
                    errorMessage: >-
                      [0401-4001]: Could not find item for project 44056 with id
                      armor_max ()
                    statusCode: 404
            not_found_user:
              examples:
                response:
                  value:
                    errorCode: 0
                    errorMessage: Could not find User
                    statusCode: 404
          description: 未找到项目的商品。
      security:
        - basicAuth: []
      summary: 将商品设置给用户
      tags:
        - inventory-management
      x-badges:
        - color: '#95ff80'
          name: Server-side
        - color: '#d7dee0'
          name: Admin
  /v2/project/{project_id}/user/inventory/item/consume:
    post:
      description: 客户端端点。从当前用户物品库中消耗一个商品。
      operationId: consume-item
      parameters:
        - description: 项目ID。
          in: path
          name: project_id
          required: true
          schema:
            default: 44056
            type: integer
        - description: 用户玩游戏的发布平台。
          in: query
          name: platform
          required: false
          schema:
            default: xsolla
            enum:
              - playstation_network
              - xbox_live
              - xsolla
              - pc_standalone
              - nintendo_shop
              - google_play
              - app_store_ios
              - android_standalone
              - ios_standalone
              - android_other
              - ios_other
              - pc_other
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                quantity:
                  default: 1
                  description: 商品数量。
                  example: 1
                  type: number
                sku:
                  default: booster_mega_1
                  description: 唯一商品ID。 SKU只能包含大小写英文字母和数字字符、句点、破折号和下划线。
                  example: booster_mega_1
                  type: string
              required:
                - sku
                - quantity
              type: object
      responses:
        '200':
          description: 用户物品库中的商品已被消耗。
        '404':
          content:
            application/json:
              schema:
                properties:
                  errorCode:
                    example: 4001
                    type: integer
                  errorMessage:
                    example: >-
                      [0401-4001]: Item with Project Id = 44056 and Sku = gun_5
                      not found
                    type: string
                  statusCode:
                    example: 404
                    type: integer
                type: object
            application/json 1:
              examples:
                response:
                  value:
                    errorCode: 4001
                    errorMessage: >-
                      [0401-4001]: Item with Project Id = 44056 and Sku = gun_5
                      not found
                    statusCode: 404
            application/json 2:
              examples:
                response:
                  value:
                    errorCode: 5004
                    errorMessage: >-
                      [0401-5004]: Could not find instance in inventory: Could
                      not remove 112299999344, user only has 12
                    statusCode: 404
          description: 完全找不到该商品，在物品库中找不到该商品，或者数量不够（尝试消耗的数量超过初始数量）。
        '422':
          content:
            application/json:
              examples:
                response:
                  value:
                    errorCode: 5002
                    errorMessage: '[0401-5002]: Quantity and item_id/sku must be specified'
                    statusCode: 422
              schema:
                properties:
                  errorCode:
                    example: 5002
                    type: integer
                  errorMessage:
                    example: '[0401-5002]: Quantity and item_id/sku must be specified'
                    type: string
                  statusCode:
                    example: 422
                    type: integer
                type: object
          description: 请确保传递了`quantity`和`sku`参数。
      security:
        - XsollaLoginUserJWT: []
      summary: 消耗商品
      tags:
        - inventory-client
      x-badges:
        - color: '#80eaff'
          name: Client-side
  /v2/project/{project_id}/user/inventory/items:
    get:
      description: >-
        客户端端点。检索当前用户物品库。


        <div
        class="notice"><strong>注意：</strong><br><br>所有项目对于可以在响应中获得的商品数量均都限制。默认值和最大值是<strong>每个响应50项。</strong>要逐页获取更多数据，请使用<b>limit</b>和<b>offset</b>字段。</div>
      operationId: get-user-inventory
      parameters:
        - $ref: '#/components/parameters/project_id-path-param'
        - $ref: '#/components/parameters/limit-query-param'
        - $ref: '#/components/parameters/offset-query-param'
        - description: 用户玩游戏的发布平台。
          in: query
          name: platform
          required: false
          schema:
            default: xsolla
            enum:
              - playstation_network
              - xbox_live
              - xsolla
              - pc_standalone
              - nintendo_shop
              - google_play
              - app_store_ios
              - android_standalone
              - ios_standalone
              - android_other
              - ios_other
              - pc_other
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    items:
                      - attributes: []
                        description: Big Rocket - short description
                        groups: []
                        image_url: https://picture.bigrocket.png
                        instance_id: null
                        name: Rocket
                        quantity: null
                        remaining_uses: 1
                        sku: com.xsolla.instanciated_item_1
                        type: virtual_good
                        virtual_item_type: non_consumable
                      - attributes: []
                        description: description
                        groups: []
                        image_url: http://image.png
                        instance_id: null
                        name: SHOTGUN FOR TRUE RAIDERS
                        quantity: 2
                        remaining_uses: 1
                        sku: com.xsolla.shotgun_raider_1
                        type: virtual_good
                        virtual_item_type: non_consumable
                      - attributes:
                          - external_id: stack_size
                            name: Stack size
                            values:
                              - external_id: >-
                                  stack_size_value_99c25352ab6e34a0e0755fc2a9daa7a76021dce2
                                value: 5
                          - external_id: licensed
                            name: Licensed
                            values:
                              - external_id: >-
                                  licensed_value_d75d8034dd2f82cb3d2789f5ec1837a6c350b505
                                value: true
                        description: null
                        groups: []
                        image_url: null
                        instance_id: null
                        name: HEADPHONES
                        quantity: 5
                        remaining_uses: 1
                        sku: com.xsolla.headphones_for_pro_1
                        type: virtual_good
                        virtual_item_type: non_consumable
                      - attributes: []
                        description: null
                        groups: []
                        image_url: null
                        instance_id: null
                        name: UNIQUE DIAMONDS
                        quantity: 100
                        remaining_uses: 1
                        sku: com.xsolla.platform_currency_1
                        type: virtual_currency
              schema:
                properties:
                  items:
                    example:
                      - attributes: []
                        description: Big Rocket - short description
                        groups: []
                        image_url: https://picture.bigrocket.png
                        instance_id: null
                        name: Rocket
                        quantity: null
                        remaining_uses: 1
                        sku: com.xsolla.instanciated_item_1
                        type: virtual_good
                        virtual_item_type: non_consumable
                      - attributes: []
                        description: description
                        groups: []
                        image_url: http://image.png
                        instance_id: null
                        name: SHOTGUN FOR TRUE RAIDERS
                        quantity: 2
                        remaining_uses: 1
                        sku: com.xsolla.shotgun_raider_1
                        type: virtual_good
                        virtual_item_type: non_consumable
                      - attributes:
                          - external_id: stack_size
                            name: Stack size
                            values:
                              - external_id: >-
                                  stack_size_value_99c25352ab6e34a0e0755fc2a9daa7a76021dce2
                                value: 5
                          - external_id: licensed
                            name: Licensed
                            values:
                              - external_id: >-
                                  licensed_value_d75d8034dd2f82cb3d2789f5ec1837a6c350b505
                                value: true
                        description: null
                        groups: []
                        image_url: null
                        instance_id: null
                        name: HEADPHONES
                        quantity: 5
                        remaining_uses: 1
                        sku: com.xsolla.headphones_for_pro_1
                        type: virtual_good
                        virtual_item_type: non_consumable
                      - attributes: []
                        description: null
                        groups: []
                        image_url: null
                        instance_id: null
                        name: UNIQUE DIAMONDS
                        quantity: 100
                        remaining_uses: 1
                        sku: com.xsolla.platform_currency_1
                        type: virtual_currency
                    items:
                      properties:
                        attributes:
                          $ref: >-
                            #/components/schemas/Player-Inventory_client-attributes
                        description:
                          description: 商品描述。
                          example: Big Rocket - short description
                          type: string
                        groups:
                          description: 商品所属分组。
                          example:
                            - external_id: accessory
                              name: Accessory
                          items:
                            properties:
                              external_id:
                                example: accessory
                                type: string
                              name:
                                example: Accessory
                                type: string
                            type: object
                          type: array
                        image_url:
                          description: 图像URL。
                          example: https://picture.bigrocket.png
                          type: string
                        instance_id:
                          deprecated: true
                          description: 淘汰的参数。始终为`null`。
                          type: 'null'
                        name:
                          description: 商品名称。
                          example: Rocket
                          type: string
                        quantity:
                          description: 商品数量。
                          example: null
                          nullable: true
                          type: integer
                        remaining_uses:
                          description: 定义消耗品属性：如果为消耗品，则为剩余使用次数，如果为非消耗品，则为`null`。
                          example: 1
                          nullable: true
                          type: integer
                        sku:
                          description: 唯一商品ID。 SKU只能包含大小写英文字母和数字字符、句点、破折号和下划线。
                          example: com.xsolla.instanciated_item_1
                          type: string
                        type:
                          description: >-
                            商品类型：`consumable`/`expiration`/`permanent`/`lootboxes`/`physical`。
                          example: virtual_good
                          type: string
                        virtual_item_type:
                          description: 虚拟物品的类型。
                          enum:
                            - consumable
                            - non_consumable
                            - non_renewing_subscription
                          example: non_consumable
                          nullable: true
                          type: string
                      type: object
                    type: array
                type: object
          description: 已成功检索用户物品库。
      security:
        - XsollaLoginUserJWT: []
      summary: 获取当前用户物品库
      tags:
        - inventory-client
      x-badges:
        - color: '#80eaff'
          name: Client-side
  /v2/project/{project_id}/user/time_limited_items:
    get:
      description: 客户端端点。检索当前用户的时效性商品。
      operationId: get-user-subscriptions
      parameters:
        - description: 项目ID。
          in: path
          name: project_id
          required: true
          schema:
            default: 44056
            type: integer
        - description: 用户玩游戏的发布平台。
          in: query
          name: platform
          required: false
          schema:
            default: xsolla
            enum:
              - playstation_network
              - xbox_live
              - xsolla
              - pc_standalone
              - nintendo_shop
              - google_play
              - app_store_ios
              - android_standalone
              - ios_standalone
              - android_other
              - ios_other
              - pc_other
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    items:
                      - description: >-
                          The PLEX or “30-day Pilot's License EXtension” is a
                          virtual item that represents 30 days of subscription
                          time and can be bought for cash and then sold to other
                          players for in-game ISK.
                        expired_at: 1746057600
                        image_url: https://picture.bigrocket.png
                        name: PLEX
                        sku: com.xsolla.plex_1
                        status: active
                        type: virtual_good
                        virtual_item_type: non_renewing_subscription
                      - description: >-
                          WoW token allows players to buy game time World of
                          Warcraft for money and sell it for game gold at
                          auction.
                        expired_at: 1546304461
                        image_url: https://picture.bigrocket.png
                        name: WoW Token
                        sku: com.xsolla.token_1
                        status: expired
                        type: virtual_good
                        virtual_item_type: non_renewing_subscription
                      - amount: 10
                        description: >-
                          Premium. Premium Status provides a character with
                          several benefits allowing faster overall progression.
                        expired_at: null
                        image_url: https://picture.bigrocket.png
                        name: Premium account
                        sku: com.xsolla.premium_item_1
                        status: none
                        type: virtual_good
                        virtual_item_type: non_renewing_subscription
              schema:
                properties:
                  items:
                    example:
                      - amount: 10
                        description: Ruble
                        image_url: https://picture.bigrocket.png
                        name: Ruble
                        sku: com.xsolla.VC_1
                        type: virtual_currency
                        virtual_item_type: non_renewing_subscription
                      - amount: 5000
                        description: Xsollar
                        image_url: http://image.png
                        name: Xsollar
                        sku: com.xsolla.VC_2
                        type: virtual_currency
                        virtual_item_type: non_renewing_subscription
                    items:
                      properties:
                        description:
                          description: 商品描述。
                          example: >-
                            Premium. Premium Status provides a character with
                            several benefits allowing faster overall
                            progression.
                          type: string
                        expired_at:
                          description: Unix时间戳。时效性商品的到期日。如果用户没有该类商品，则值为 `null`。
                          example: 1746057600
                          type: integer
                        image_url:
                          description: 图像URL。
                          example: https://picture.bigrocket.png
                          type: string
                        name:
                          description: 订阅名称。
                          example: Premium status
                          type: string
                        sku:
                          description: 唯一商品ID。 SKU只能包含大小写英文字母和数字字符、句点、破折号和下划线。
                          example: com.xsolla.premium_item_1
                          type: string
                        status:
                          description: |-
                            时效性商品的状态。
                            商品可以处于三种状态：
                            - `none` - 未购买。
                            - `active` - 商品处于活动状态。
                            - `expired` - 商品已购买，但已过期。
                          example: active
                          type: string
                        type:
                          description: 商品类型：`virtual_good`。
                          example: virtual_good
                          type: string
                        virtual_item_type:
                          description: 虚拟物品的类型。
                          enum:
                            - consumable
                            - non_consumable
                            - non_renewing_subscription
                          example: non_consumable
                          type: string
                          x-enumDescriptions:
                            consumable: 使用后从物品库中消失的物品（例如弹药）。
                            non_consumable: 无限期地留在物品库中的物品。
                            non_renewing_subscription: 时效性商品，代表在有限时间内对服务或内容的访问权限。
                      type: object
                    type: array
                type: object
          description: 已成功检索用户的时效性商品。
      security:
        - XsollaLoginUserJWT: []
      summary: 获取当前用户的时效性商品
      tags:
        - inventory-client
      x-badges:
        - color: '#80eaff'
          name: Client-side
  /v2/project/{project_id}/user/virtual_currency_balance:
    get:
      description: 客户端端点。检索当前用户的虚拟余额。
      operationId: get-user-virtual-balance
      parameters:
        - description: 项目ID。
          in: path
          name: project_id
          required: true
          schema:
            default: 44056
            type: integer
        - description: 用户玩游戏的发布平台。
          in: query
          name: platform
          required: false
          schema:
            default: xsolla
            enum:
              - playstation_network
              - xbox_live
              - xsolla
              - pc_standalone
              - nintendo_shop
              - google_play
              - app_store_ios
              - android_standalone
              - ios_standalone
              - android_other
              - ios_other
              - pc_other
            type: string
      responses:
        '200':
          content:
            application/json:
              examples:
                response:
                  value:
                    items:
                      - amount: 10
                        description: Ruble
                        image_url: https://picture.bigrocket.png
                        name: Ruble
                        sku: com.xsolla.VC_1
                        type: virtual_currency
                      - amount: 5000
                        description: Xsollar
                        image_url: http://image.png
                        name: Xsollar
                        sku: com.xsolla.VC_2
                        type: virtual_currency
              schema:
                properties:
                  items:
                    example:
                      - description: >-
                          The PLEX or “30-day Pilot's License EXtension” is a
                          virtual item that represents 30 days of subscription
                          time and can be bought for cash and then sold to other
                          players for in-game ISK.
                        expired_at: 1746057600
                        image_url: https://picture.bigrocket.png
                        name: PLEX
                        sku: com.xsolla.plex_1
                        status: active
                        type: virtual_good
                        virtual_item_type: non_renewing_subscription
                      - description: >-
                          WoW token allows players to buy game time World of
                          Warcraft for money and sell it for game gold at
                          auction.
                        expired_at: 1546304461
                        image_url: https://picture.bigrocket.png
                        name: WoW Token
                        sku: com.xsolla.token_1
                        status: expired
                        type: virtual_good
                        virtual_item_type: non_renewing_subscription
                    items:
                      properties:
                        amount:
                          description: 商品数量。
                          example: null
                          type: integer
                        description:
                          description: 商品描述。
                          example: Big Rocket - short description
                          type: string
                        image_url:
                          description: 图像URL。
                          example: https://picture.bigrocket.png
                          type: string
                        name:
                          description: 商品名称。
                          example: Rocket
                          type: string
                        sku:
                          description: 唯一商品ID。 SKU只能包含大小写英文字母和数字字符、句点、破折号和下划线。
                          example: com.xsolla.instanciated_item_1
                          type: string
                        type:
                          description: 商品类型：`virtual_good`/`virtual_currency`/`bundle`。
                          example: virtual_currency
                          type: string
                      type: object
                    type: array
                type: object
          description: 已成功检索用户的虚拟余额。
      security:
        - XsollaLoginUserJWT: []
      summary: 获取当前用户的虚拟余额
      tags:
        - inventory-client
      x-badges:
        - color: '#80eaff'
          name: Client-side
servers:
  - url: https://store.xsolla.com/api
tags:
  - name: inventory-client
    x-displayName: 客户端
  - name: inventory-management
    x-displayName: 管理
  - name: cross-inventory
    x-displayName: 跨平台物品库
