# 获取捆绑包列表

获取项目中的捆绑包列表以进行管理。

注：请勿使用此接口来构建商店商品目录。

Endpoint: GET /v2/project/{project_id}/admin/items/bundle
Version: 2.0.0
Security: basicAuth

## Path parameters:

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

## Query parameters:

  - `limit` (integer)
    页面上元素数量的限制。
    Example: 50

  - `offset` (integer)
    生成列表时作为起始位置的元素编号（从0开始计数）。

## Response 200 fields (application/json):

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

  - `total_items_count` (integer)
    系统中的商品总数。

  - `items` (array)

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

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

  - `items.name` (object,null)
    包含商品本地化名称的对象。值接受以下两种格式之一：两个小写字母的语言代码（例如，en）或五个字符的语言代码（例如，en-US）。虽然两种格式都可作为输入接受，但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时（例如：en和en-US），将存储最后提供的值。您可以在[文档](/zh/doc/shop-builder/references/supported-languages/)中找到支持语言的完整列表。

  - `items.attributes` (array)
    属性列表。
    Example: [{"external_id":"attribute_external_id","name":{"en":"Attribute name","de":"Attributname"},"values":[{"external_id":"value_1","name":{"en":"value 1","de":"wert 1"}},{"external_id":"value_2","name":{"en":"value 2","de":"wert 2"}}]}]

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

  - `items.attributes.name` (object)
    包含属性本地化名称的对象。编码按照ISO 3166-1的规定。
    Example: {"en":"Attribute name","de":"Attributname"}

  - `items.attributes.values` (array, required)
    Example: [{"external_id":"value_1","name":{"en":"value 1","de":"wert 1"}},{"external_id":"value_2","name":{"en":"value 2","de":"wert 2"}}]

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

  - `items.attributes.values.value` (object, required)
    包含值本地化名称的对象。编码按照ISO 3166-1的规定。

  - `items.type` (string)
    商品类型。

  - `items.bundle_type` (string)
    捆绑包类型。当商品类型为捆绑包时返回。
    Enum: "standard", "virtual_currency_package", "partner_side_content"

  - `items.description` (object,null)
    包含本地化商品描述的对象。值接受以下两种格式之一：两个小写字母的语言代码（例如，en）或五个字符的区域设置代码（例如，en-US）。虽然两种格式都可作为输入接受，但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时（例如：en和en-US），将存储最后提供的值。您可以在[文档](/zh/doc/shop-builder/references/supported-languages/)中找到支持语言的完整列表。

  - `items.long_description` (object,null)
    包含商品详细本地化描述的对象。值接受以下两种格式之一：两个小写字母的语言代码（例如，en）或五个字符的区域设置代码（例如，en-US）。虽然两种格式都可作为输入接受，但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时（例如：en和en-US），将存储最后提供的值。您可以在[文档](/zh/doc/shop-builder/references/supported-languages/)中找到支持语言的完整列表。

  - `items.image_url` (string,null)
    图片URL。为确保图片能在支付UI中正确显示并快速加载，请查看我们的图片和URL指南：支持的格式：WebP（推荐）、PNG、JPG。文件大小：≤50 KB（WebP）或≤150 KB（PNG和JPG）。图片尺寸：280 x 280 px。色彩空间：sRGB。协议：HTTPS，并对版本化URL使用长期缓存。

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

  - `items.is_paid_randomized_reward` (boolean)
    该商品是否为随机付费奖励，例如宝箱。

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

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

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

  - `items.prices` (array)
    以真实货币表示的价格。

  - `items.prices.amount` (string, required)
    商品价格。

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

  - `items.prices.is_default` (boolean, required)
    如果未指定用户币种的价格，则使用默认价格生成商品目录。

  - `items.prices.is_enabled` (boolean, required)
    价格已启用。

  - `items.prices.country_iso` (string,null)
    适用此价格的国家/地区。符合[ISO 3166-1 alpha 2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)的两字母代码。
    Example: "US"

  - `items.virtual_prices` (array)

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

  - `items.virtual_prices.name` (object,null)
    包含商品本地化名称的对象。值接受以下两种格式之一：两个小写字母的语言代码（例如，en）或五个字符的语言代码（例如，en-US）。虽然两种格式都可作为输入接受，但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时（例如：en和en-US），将存储最后提供的值。您可以在[文档](/zh/doc/shop-builder/references/supported-languages/)中找到支持语言的完整列表。

  - `items.virtual_prices.type` (string)
    虚拟货币类型。

  - `items.virtual_prices.description` (object,null)
    包含本地化商品描述的对象。值接受以下两种格式之一：两个小写字母的语言代码（例如，en）或五个字符的区域设置代码（例如，en-US）。虽然两种格式都可作为输入接受，但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时（例如：en和en-US），将存储最后提供的值。您可以在[文档](/zh/doc/shop-builder/references/supported-languages/)中找到支持语言的完整列表。

  - `items.virtual_prices.image_url` (string,null)
    图片URL。为确保图片能在支付UI中正确显示并快速加载，请查看我们的图片和URL指南：支持的格式：WebP（推荐）、PNG、JPG。文件大小：≤50 KB（WebP）或≤150 KB（PNG和JPG）。图片尺寸：280 x 280 px。色彩空间：sRGB。协议：HTTPS，并对版本化URL使用长期缓存。

  - `items.virtual_prices.amount` (string)
    商品折后价格。

  - `items.virtual_prices.is_default` (boolean)
    价格是否为商品的默认价格。

  - `items.media_list` (any)

  - `items.order` (integer)
    捆绑包在列表中的排序优先级。

  - `items.is_enabled` (boolean)
    如果禁用，则无法找到和购买该商品。

  - `items.is_show_in_store` (boolean)
    商品可供购买。

  - `items.regions` (array)

  - `items.regions.id` (integer)
    Example: 1

  - `items.content` (array)

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

  - `items.content.name` (object,null)
    包含商品本地化名称的对象。值接受以下两种格式之一：两个小写字母的语言代码（例如，en）或五个字符的语言代码（例如，en-US）。虽然两种格式都可作为输入接受，但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时（例如：en和en-US），将存储最后提供的值。您可以在[文档](/zh/doc/shop-builder/references/supported-languages/)中找到支持语言的完整列表。

  - `items.content.type` (string)
    商品类型。

  - `items.content.description` (object,null)
    包含本地化商品描述的对象。值接受以下两种格式之一：两个小写字母的语言代码（例如，en）或五个字符的区域设置代码（例如，en-US）。虽然两种格式都可作为输入接受，但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时（例如：en和en-US），将存储最后提供的值。您可以在[文档](/zh/doc/shop-builder/references/supported-languages/)中找到支持语言的完整列表。

  - `items.content.image_url` (string,null)
    图片URL。为确保图片能在支付UI中正确显示并快速加载，请查看我们的图片和URL指南：支持的格式：WebP（推荐）、PNG、JPG。文件大小：≤50 KB（WebP）或≤150 KB（PNG和JPG）。图片尺寸：280 x 280 px。色彩空间：sRGB。协议：HTTPS，并对版本化URL使用长期缓存。

  - `items.content.quantity` (integer)
    捆绑包中该商品类型的数量。

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

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

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

  - `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)
    所有用户可购买的最大商品数量。

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

  - `items.limits.per_item.reserved` (integer)

  - `items.limits.per_item.sold` (integer)

  - `items.limits.recurrent_schedule` (object,null)
    限制数刷新周期。

  - `items.limits.recurrent_schedule.per_user` (any)
    用户的限制数刷新周期。

  - `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.total_content_price` (object,null)
    捆绑包内容价格总和。

  - `items.total_content_price.amount` (string)
    捆绑包内容折后价格总和。
    Example: "100.99"

  - `items.total_content_price.amount_without_discount` (string)
    捆绑包内容价格总和。
    Example: "100.99"

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

## Response 401 fields (application/json):

  - `statusCode` (integer)
    Example: 401

  - `errorCode` (integer)
    Example: 1020

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


