# 获取虚拟物品

获取项目中的虚拟物品以进行管理。
<div class="note"><b>注：</b><br><br>请勿使用此接口来构建商店商品目录。</div>

Endpoint: GET /v2/project/{project_id}/admin/items/virtual_items/sku/{item_sku}
Version: 2.0.0
Security: basicAuth

## Path parameters:

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

  - `item_sku` (string, required)
    商品SKU。

## Response 200 fields (application/json):

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

  - `attributes` (array)
    属性列表。

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

  - `attributes.values` (array, required)
    Example: [{"external_id":"strategy","value":{"en":"Strategy","de":"Strategie"}},{"external_id":"action","value":{"en":"Action","de":"Aktion"}}]

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

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

  - `name.en` (string | null)
    英语

  - `name.ar` (string | null)
    阿拉伯语

  - `name.bg` (string | null)
    保加利亚语

  - `name.cn` (string | null)
    中文（简体）

  - `name.cs` (string | null)
    捷克语

  - `name.de` (string | null)
    德语

  - `name.es` (string | null)
    西班牙语（西班牙）

  - `name.fr` (string | null)
    法语

  - `name.he` (string | null)
    希伯来语

  - `name.it` (string | null)
    意大利语

  - `name.ja` (string | null)
    日语

  - `name.ko` (string | null)
    韩语

  - `name.pl` (string | null)
    波兰语

  - `name.pt` (string | null)
    葡萄牙语

  - `name.ro` (string | null)
    罗马尼亚语

  - `name.ru` (string | null)
    俄语

  - `name.th` (string | null)
    泰语

  - `name.tr` (string | null)
    土耳其语

  - `name.tw` (string | null)
    中文（繁体）

  - `name.vi` (string | null)
    越南语

  - `name.km` (string | null)
    高棉语

  - `name.id` (string | null)
    印度尼西亚语

  - `name.lo` (string | null)
    老挝语

  - `name.my` (string | null)
    缅甸语

  - `name.ph` (string | null)
    菲律宾语

  - `name.ne` (string | null)
    尼泊尔语

  - `name.en-US` (string | null)
    英语

  - `name.ar-AE` (string | null)
    阿拉伯语

  - `name.bg-BG` (string | null)
    保加利亚语

  - `name.zh-CN` (string | null)
    中文（简体）

  - `name.cs-CZ` (string | null)
    捷克语

  - `name.de-DE` (string | null)
    德语

  - `name.es-ES` (string | null)
    西班牙语（西班牙）

  - `name.fr-FR` (string | null)
    法语

  - `name.he-IL` (string | null)
    希伯来语

  - `name.it-IT` (string | null)
    意大利语

  - `name.ja-JP` (string | null)
    日语

  - `name.ko-KR` (string | null)
    韩语

  - `name.pl-PL` (string | null)
    波兰语

  - `name.pt-BR` (string | null)
    葡萄牙语（巴西）

  - `name.ro-RO` (string | null)
    罗马尼亚语

  - `name.ru-RU` (string | null)
    俄语

  - `name.th-TH` (string | null)
    泰语

  - `name.tr-TR` (string | null)
    土耳其语

  - `name.zh-TW` (string | null)
    中文（繁体）

  - `name.vi-VN` (string | null)
    越南语

  - `name.km-KH` (string | null)
    高棉语

  - `name.id-ID` (string | null)
    印度尼西亚语

  - `name.lo-LA` (string | null)
    老挝语

  - `name.my-MM` (string | null)
    缅甸语

  - `name.ph-PH` (string | null)
    菲律宾语

  - `name.ne-NP` (string | null)
    尼泊尔语

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

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

  - `groups` (array)
    商品所属分组。
    Example: [{"external_id":"horror","name":{"en":"Horror"}}]

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

  - `media_list` (array)
    商品的附加资源，例如屏幕截图、游戏视频等。
    Example: [{"type":"image","url":"https://cdn3.xsolla.com/img/misc/images/71ab1e12126f2103e1868076f0acb21a.jpg"}]

  - `media_list.type` (string)
    媒体类型：`image`/`video`。
    Enum: "image", "video"

  - `media_list.url` (string)
    资源文件。
    Example: https://cdn3.xsolla.com/img/misc/images/71ab1e12126f2103e1868076f0acb21a.jpg

  - `type` (string)
    商品类型：`virtual_good`/`virtual_currency`/`bundle`/`physical_good`/`unit`。

  - `prices` (array)

  - `prices.amount` (number, required)
    金额。

  - `prices.currency` (string, required)
    商品价格币种。符合[ISO 4217](https://en.wikipedia.org/wiki/ISO_4217)标准的三字母代码。关于[艾克索拉支持的币种](https://developers.xsolla.com/zh/doc/pay-station/references/supported-currencies/)的详细信息，请参阅文档。
    Example: USD

  - `prices.country_iso` (string)
    符合[ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)标准的两位大写国家/地区代码。关于[艾克索拉支持的国家/地区](https://developers.xsolla.com/zh/doc/shop-builder/references/supported-countries/)的详细信息，请参阅文档。示例：`country=US`
    Example: US

  - `prices.is_default` (boolean)

  - `prices.is_enabled` (boolean)

  - `vc_prices` (array)

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

  - `vc_prices.amount` (number, required)
    金额。

  - `vc_prices.is_default` (boolean)

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

  - `is_free` (boolean)
    该商品是否免费。
    Example: false

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

  - `order` (integer)
    商品在商品目录中的显示顺序。值越大，商品在列表中的位置越靠下。
如果值相同，则按创建日期排序，较新的商品显示位置更靠上。
    Example: 1

  - `is_enabled` (boolean)
    商品是否可购。如果为`false`，则无法在商店中购买该商品，也无法通过捆绑包或营销活动获得该商品。关于商品可购性的详细信息，请参阅我们的[文档](https://developers.xsolla.com/zh/items-catalog/catalog-features/items-availability/)。
    Example: true

  - `is_show_in_store` (boolean)
    商品是否显示在商品目录中。如果为`false`且`is_enabled: true`，则该商品在商品目录中不可见，但可通过捆绑包或营销活动获得。关于商品可购性的详细信息，请参阅我们的[文档](https://developers.xsolla.com/zh/items-catalog/catalog-features/items-availability/)。
    Example: true

  - `regions` (array)
    商品可购区域的数组。如果数组为空或未传递，则该商品在所有区域均可购。

  - `regions.id` (integer)
    项目内的区域ID。
详细信息请参阅[区域销售限制文档](https://developers.xsolla.com/zh/items-catalog/catalog-features/regional-restrictions/)和[区域管理API调用](https://developers.xsolla.com/zh/api/catalog/common-regions)。
    Example: 1

  - `limits` (object | null)
    商品限制数。

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

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

  - `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"

  - `limits.per_item` (object | null)
    全局商品限制数。

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

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

  - `limits.per_item.reserved` (integer)

  - `limits.per_item.sold` (integer)

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

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

  - `limits.recurrent_schedule.per_user.interval_type` (string)
    循环刷新周期类型。
    Enum: "daily"

  - `limits.recurrent_schedule.per_user.time` (string)
    所需时区中的限制数刷新时间（四舍五入到小时）。
    Example: 11:00:00+03:00

  - `limits.recurrent_schedule.per_user.reset_next_date` (integer)
    限制数刷新的日期和时间（Unix时间戳）。
    Example: 1677553200

  - `limits.recurrent_schedule.per_user.displayable_reset_start_date` (string)
    第一次限制数刷新的日期和时间 (ISO 8601)。
    Example: 2023-02-28T11:00:00+08:00

  - `limits.recurrent_schedule.per_user.displayable_reset_next_date` (string)
    应重置限制数的日期和时间(ISO 8601)。
    Example: 2023-02-28T11:00:00+08:00

  - `limits.recurrent_schedule.per_user.day_of_week` (integer | null)
    在一周中的哪一天刷新限制数。其中1是星期一，7是星期日。仅当限制刷新周期类型为`weekly`时不为`null`。

  - `limits.recurrent_schedule.per_user.day_of_month` (integer | null)
    在一个月中的哪一天刷新限制数。如果某个月没有所选日期，则会在该月最后一天刷新。仅当限制刷新周期类型为`monthly`时不为`null`。

  - `limits.recurrent_schedule.per_user.hours_interval` (integer)
    间隔小时数，经过该时间后限制数将更新。倒计时从商品首次在商店中显示的时间开始，该时间由date_from参数指定。例如，如果`date_from = "2025-11-15T18:15:00+05:00"` 且`hours_interval = 2`，则该商品的购买次数限制将从`"2025-11-15T20:15:00+05:00"`开始每2小时刷新一次。

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

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

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

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

## Response 401 fields (application/json):

  - `statusCode` (integer)
    Example: 401

  - `errorCode` (integer)
    Example: 1020

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

