# 获取指定用户可购买的商品剩余数量

获取在已应用的数量限制内，指定用户仍可购买的商品剩余数量。

用户限制API允许您限量销售商品。如需配置购买限制，请前往所需商品类型模块的管理部分：
* 游戏Key
* 虚拟物品和货币
* 捆绑包

Endpoint: GET /v2/project/{project_id}/admin/user/limit/item/sku/{item_sku}
Version: 2.0.0
Security: basicAuth

## Path parameters:

  - `project_id` (integer, required)
    项目ID。您可以在发布商帐户的项目名称旁找到此参数；使用项目时，也可以在浏览器地址栏中找到此参数。URL格式如下：https://publisher.xsolla.com//projects/。
    Example: 44056

  - `item_sku` (string, required)
    商品SKU。
    Example: "booster_mega_1"

## Query parameters:

  - `user_external_id` (string, required)
    用户外部ID
    Example: "d342dad2-9d59-11e9-a384-42010aa8003f"

## Response 200 fields (application/json):

  - `per_user` (object)

  - `per_user.total` (integer)
    用户可以购买的最大商品数量。
    Example: 10

  - `per_user.available` (integer)
    用户可以购买的剩余商品数量。
    Example: 9

## Response 401 fields (application/json):

  - `statusCode` (integer)
    Example: 401

  - `errorCode` (integer)
    Example: 1020

  - `errorMessage` (string)
    Example: "[0401-1020]: Error in Authentication method occurred"

## Response 404 fields (application/json):

  - `statusCode` (integer)

  - `errorCode` (integer)

  - `errorMessage` (string)

  - `transactionId` (string)

## Response 422 fields (application/json):

  - `statusCode` (integer)

  - `errorCode` (integer)

  - `errorMessage` (string)

  - `errorMessageExtended` (array)

  - `transactionId` (string)


