Xsolla-logoXsolla Developers
前往发布商帐户

按SKU获取虚拟货币Client-side

get/v2/project/{project_id}/items/virtual_currency/sku/{virtual_currency_sku}

Gets a virtual currency by SKU for building a catalog.

Note

This endpoint, accessible without authorization, returns generic data. However, authorization enriches the response with user-specific details for a personalized result, such as available user limits and promotions.
SecurityXsollaLoginUserJWT
Request
path Parameters
project_id
required
integer

项目ID。您可以在您的发布商帐户项目名称旁边找到。

Example: 44056
virtual_currency_sku
required
string

虚拟货币SKU。

Example: crystal
query Parameters
locale
string
Default: "en"

响应语言。按照ISO 639-1规定使用两个小写字母的语言代码。

country
string

Two-letter uppercase country code per ISO 3166-1 alpha-2. Check the documentation for detailed information about countries supported by Xsolla and the process of determining the country.

Example: country=US
show_inactive_time_limited_items
integer
Default: 0

显示用户不可用的时效性商品。此类商品的有效期尚未开始或已过期。

Example: show_inactive_time_limited_items=1
Responses
200

已成功收到虚拟货币。

Request samples
Response samples
application/json
{
  • "attributes": [
    ],
  • "can_be_bought": true,
  • "custom_attributes": {
    },
  • "description": "Crystals - short description",
  • "groups": [ ],
  • "inventory_options": {
    },
  • "is_free": false,
  • "item_id": 451414,
  • "limits": null,
  • "name": "Crystals",
  • "periods": [
    ],
  • "price": {
    },
  • "promotions": [ ],
  • "sku": "com.xsolla.crystal_1",
  • "type": "virtual_currency",
  • "virtual_prices": [ ]
}