# 获取项目中追加销售商品的列表

如果项目中已设置追加销售商品，则获取这些商品的列表。


  注：
    此API调用使用用户JWT进行授权。
    请在Authorization请求头中按以下格式传入令牌：Bearer &lt;user_JWT&gt;。关于用户JWT的更多信息，请参阅此调用的安全性部分。

Endpoint: GET /v2/project/{project_id}/items/upsell
Version: 2.0.0
Security: XsollaLoginUserJWT

## Path parameters:

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

## Response 200 fields (application/json):

  - `has_more` (boolean)
    用作指示还有更多页面。

  - `items` (array)

  - `items.sku` (string)
    唯一商品ID。SKU只能包含大小写英文字母、数字、句点、短横线和下划线。
    Example: "big_rocket"

  - `items.name` (string)
    商品名称。
    Example: "Big Rocket"

  - `items.groups` (array)
    商品所属分组。

  - `items.groups.external_id` (string)
    Example: "horror"

  - `items.groups.name` (object)
    商品名称。应包含键/值对，
其中键是"^[a-z]{2}"格式的区域设置，值是字符串。
    Example: {"en":"Horror","de":"Horror"}

  - `items.attributes` (array)
    与商品对应的属性及其值的列表。可用于商品目录筛选。

  - `items.attributes.external_id` (string)
    唯一属性ID。 external_id只能包含大小写英文字母、数字、短横线和下划线。

  - `items.attributes.name` (object)
    属性名称。
    Example: "Genre"

  - `items.attributes.values` (array)

  - `items.attributes.values.external_id` (string)
    属性的唯一值ID。 external_id只能包含小写英文字母、数字、短横线和下划线。

  - `items.attributes.values.value` (string)
    属性值。
    Example: "Strategy"

  - `items.type` (string)
    商品类型：virtual_good/virtual_currency/bundle。
    Example: "virtual_good"

  - `items.description` (string)
    商品描述。
    Example: "Big Rocket - description"

  - `items.image_url` (string)
    图片URL。
    Example: "https://popmedia.blob.core.windows.net/popyourself/male/outfit/male_armor_white_a-01.png"

  - `items.is_free` (boolean)
    该商品是否免费。

  - `items.price` (object,null)
    商品价格。

  - `items.price.amount` (string)
    商品折后价格。
    Example: "100.99"

  - `items.price.amount_without_discount` (string)
    商品价格。
    Example: "100.99"

  - `items.price.currency` (string)
    商品价格币种。符合[ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)标准的三字母代码。
    Example: "USD"

  - `items.virtual_prices` (array)
    虚拟价格。

  - `items.virtual_prices.amount` (integer)
    以虚拟货币表示的商品价格。
    Example: 100

  - `items.virtual_prices.amount_without_discount` (integer)
    商品折扣前的虚拟货币价格。由于折扣不适用于虚拟货币价格，因此该值始终等于amount。
    Example: 200

  - `items.virtual_prices.sku` (string)
    虚拟货币SKU。
    Example: "vc_gold"

  - `items.virtual_prices.is_default` (boolean)
    是否为默认虚拟货币价格。
    Example: true

  - `items.virtual_prices.image_url` (string,null)
    虚拟货币图片URL。
    Example: "http://image.png"

  - `items.virtual_prices.name` (string)
    虚拟货币名称。
    Example: "Gold"

  - `items.virtual_prices.type` (string)
    商品类型。对于虚拟货币，该值为virtual_currency。
    Example: "virtual_currency"

  - `items.virtual_prices.description` (string,null)
    虚拟货币说明。
    Example: "In-game currency used to purchase weapons and upgrades"

  - `items.can_be_bought` (boolean)
    如为true，则用户可以购买商品。

  - `items.virtual_item_type` (string)
    虚拟物品的类型。

可能值：
- consumable — 使用后会从物品库中消失的商品（例如弹药）。
- non_consumable — 可无限期保留在物品库中的商品。
- non_renewing_subscription — 时效性商品，可表示在限定时间内对服务或内容的访问权限。"
    Enum: "consumable", "non_consumable", "non_renewing_subscription"

  - `items.promotions` (array)
    应用于购物车中指定商品的促销活动。仅在以下情况下返回该数组：

* 为某商品配置了折扣促销活动。

* 应用了具有对所选商品提供折扣设置的兑换码。

如果未应用任何商品级促销活动，则返回空数组。

  - `items.promotions.name` (string)

  - `items.promotions.date_start` (string,null)

  - `items.promotions.date_end` (string,null)

  - `items.promotions.discount` (object,null)

  - `items.promotions.discount.percent` (string,null)

  - `items.promotions.discount.value` (string,null)

  - `items.promotions.bonus` (array)

  - `items.promotions.bonus.sku` (string)

  - `items.promotions.bonus.quantity` (integer)

  - `items.promotions.bonus.type` (string)
    赠品类型。
    Enum: "virtual_good", "virtual_currency", "bundle", "physical_good", "game_key", "nft"

  - `items.promotions.bonus.name` (string)
    赠品名称。不适用于physical_good赠品类型。

  - `items.promotions.bonus.image_url` (string)
    赠品图片URL。不适用于physical_good赠品类型。

  - `items.promotions.bonus.bundle_type` (string)
    赠品捆绑包商品类型。仅适用于bundle赠品类型。
    Enum: "standard", "virtual_currency_package"

  - `items.promotions.limits` (object)

  - `items.promotions.limits.per_user` (object)

  - `items.promotions.limits.per_user.available` (integer)

  - `items.promotions.limits.per_user.total` (integer)

  - `items.limits` (object,null)
    商品限制数。

  - `items.limits.per_user` (object,null)
    单个用户的商品购买数量限制。

  - `items.limits.per_user.total` (integer)
    单个用户可购买的最大商品数量。
    Example: 5

  - `items.limits.per_user.available` (integer)
    当前用户可购买的剩余商品数量。
    Example: 3

  - `items.limits.per_user.recurrent_schedule` (any)

  - `items.limits.per_user.limit_exceeded_visibility` (string)
    设定商品在达到购买限制后、下次限制重置前在商品目录中的可见性。

适用于在recurrent_schedule数组中配置了周期性重置数量限制的商品。

如果未配置重置限制，则达到购买限制后，无论limit_exceeded_visibility的值如何，该商品都不会显示在商品目录中。

可能值：
- show — 达到购买限制后，商品目录检索API调用仍会返回该商品。在客户端侧
商品目录检索API调用中，达到限制后返回的商品会带有can_be_bought: false 标志。下一次重置日期
将在reset_next_date中返回。
- hide — 达到购买限制后，在限制
重置之前，商品目录检索API调用不会返回该商品。
    Enum: "show", "hide"

  - `items.limits.per_item` (object,null)
    单个商品的购买数量限制。

  - `items.limits.per_item.total` (integer)
    所有用户可购买的最大商品数量。
    Example: 5

  - `items.limits.per_item.available` (integer)
    所有用户还可购买的剩余商品数量。
    Example: 3

  - `items.periods` (array)
    商品销售期。

  - `items.periods.date_from` (string,null)
    指定商品开始可购的日期。
    Example: "2020-08-11T10:00:00+03:00"

  - `items.periods.date_until` (string,null)
    指定商品停止可购的日期。可为null。
    Example: "2020-08-11T20:00:00+03:00"

  - `items.custom_attributes` (object)
    包含商品属性和值的JSON对象。

  - `items.vp_rewards` (array)
    该商品的累充积分奖励列表。

  - `items.vp_rewards.item_id` (integer)
    内部唯一商品ID。

  - `items.vp_rewards.sku` (string)
    唯一累充积分ID。

  - `items.vp_rewards.amount` (integer)
    累充积分数量。

  - `items.vp_rewards.name` (string)
    累充积分名称。

  - `items.vp_rewards.image_url` (string)
    图片URL。

  - `items.vp_rewards.is_clan` (boolean)
    累充积分是否用于公会累充奖励链。

## Response 401 fields (application/json):

  - `statusCode` (integer)
    Example: 401

  - `errorCode` (integer)
    Example: 1501

  - `errorMessage` (string)
    Example: "[0401-1501]: Authorization failed: Provide authorization"


