跳转到内容

Overview

  • Version: 2.0.0
  • Servers: https://store.xsolla.com/api
  • Contact Us by Email
  • Contact URL: https://xsolla.com/
  • Required TLS version: 1.2

The Catalog API allows you to configure a catalog of in-game items on the Xsolla side and display the catalog to users in your store.

The API allows you to manage the following catalog entities:

  • Virtual items — in-game items such as weapons, skins, boosters.
  • Virtual currency — virtual money used to purchase virtual goods.
  • Virtual currency packages — predefined bundles of virtual currency.
  • Bundles — combined packages of virtual items, currency, or game keys sold as a single SKU.
  • Game keys — keys for games and DLCs distributed via platforms like Steam or other DRM providers.
  • Groups — logical groupings for organizing and sorting items within the catalog.

API calls

The API is divided into the following groups:

  • Admin — calls for creating, updating, deleting, and configuring catalog items and groups. Authenticated via basic access authentication with your merchant or project credentials. Not intended for storefront use.
  • Catalog — calls for retrieving items and building custom storefronts for end users. Designed to handle high-load scenarios. Support optional user JWT authorization to return personalized data such as user-specific limits and active promotions.

Authentication

API calls require authentication either on behalf of a user or on behalf of a project. The authentication scheme used is specified in the Security section in the description of each call.

Authentication using user's JWT

User's JWT authentication is used when a request is sent from a browser, mobile application, or game. In this case, a user's JWT is used. By default, the XsollaLoginUserJWT scheme is applied. For details on how to create a token, see the Xsolla Login API documentation.

The token is passed in the Authorization header in the following format: Authorization: Bearer <user_JWT>, where <user_JWT> is the user token. The token identifies the user and provides access to personalized data. You can try this call using the following test token:

eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE5NjIyMzQwNDgsImlzcyI6Imh0dHBzOi8vbG9naW4ueHNvbGxhLmNvbSIsImlhdCI6MTU2MjE0NzY0OCwidXNlcm5hbWUiOiJ4c29sbGEiLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6IjA2SWF2ZHpDeEVHbm5aMTlpLUc5TmMxVWFfTWFZOXhTR3ZEVEY4OFE3RnMiLCJzdWIiOiJkMzQyZGFkMi05ZDU5LTExZTktYTM4NC00MjAxMGFhODAwM2YiLCJlbWFpbCI6InN1cHBvcnRAeHNvbGxhLmNvbSIsInR5cGUiOiJ4c29sbGFfbG9naW4iLCJ4c29sbGFfbG9naW5fcHJvamVjdF9pZCI6ImU2ZGZhYWM2LTc4YTgtMTFlOS05MjQ0LTQyMDEwYWE4MDAwNCIsInB1Ymxpc2hlcl9pZCI6MTU5MjR9.GCrW42OguZbLZTaoixCZgAeNLGH2xCeJHxl8u8Xn2aI

Alternatively, you can use a token for opening the payment UI.

Basic HTTP authentication

Basic HTTP authentication is used for server-to-server interactions, when an API call is sent directly from your server rather than from a user's browser or mobile application. HTTP Basic authentication with an API key is typically used.

Note

The API key is confidential and must not be stored or used in client applications.

With basic server-side authentication, all API requests must include the following header:

  • for basicAuthAuthorization: Basic <your_authorization_basic_key>, where your_authorization_basic_key is the project_id:api_key pair encoded in Base64
  • for basicMerchantAuthAuthorization: Basic <your_authorization_basic_key>, where your_authorization_basic_key is the merchant_id:api_key pair encoded in Base64

You can find the parameter values in Publisher Account:

  • merchant_id is displayed:
    • In Company settings > Company.
    • In the URL in the browser address bar on any Publisher Account page. The URL has the following format: https://publisher.xsolla.com/<merchant_id>.
  • project_id is displayed:
    • Next to the project name in Publisher Account.
    • In the URL in the browser address bar when working on a project in Publisher Account. The URL has the following format: https://publisher.xsolla.com/<merchant_id>/projects/<project_id>.
  • api_key is shown in Publisher Account only at the time of creation and must be stored securely on your side. You can create an API key in the following sections:
Notice

If a required API call doesn't include the project_id path parameter, use an API key that is valid across all company projects for authorization.

For more information about working with API keys, see the API references.

Authentication with guest access support

The AuthForCart authentication scheme is used for cart purchases and supports two modes:

  1. Authentication with a user's JWT. The token is passed in the Authorization header in the following format: Authorization: Bearer <user_JWT>, where <user_JWT> is the user token. The token identifies the user and provides access to personalized data. You can try this call using the following test token:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE5NjIyMzQwNDgsImlzcyI6Imh0dHBzOi8vbG9naW4ueHNvbGxhLmNvbSIsImlhdCI6MTU2MjE0NzY0OCwidXNlcm5hbWUiOiJ4c29sbGEiLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6IjA2SWF2ZHpDeEVHbm5aMTlpLUc5TmMxVWFfTWFZOXhTR3ZEVEY4OFE3RnMiLCJzdWIiOiJkMzQyZGFkMi05ZDU5LTExZTktYTM4NC00MjAxMGFhODAwM2YiLCJlbWFpbCI6InN1cHBvcnRAeHNvbGxhLmNvbSIsInR5cGUiOiJ4c29sbGFfbG9naW4iLCJ4c29sbGFfbG9naW5fcHJvamVjdF9pZCI6ImU2ZGZhYWM2LTc4YTgtMTFlOS05MjQ0LTQyMDEwYWE4MDAwNCIsInB1Ymxpc2hlcl9pZCI6MTU5MjR9.GCrW42OguZbLZTaoixCZgAeNLGH2xCeJHxl8u8Xn2aI

Alternatively, you can use a token for opening the payment UI.

  1. Simplified mode without Authorization header. This mode is used only for unauthorized users and can be applied only for game key sales. Instead of a token, the request must include the following headers:
    • x-unauthorized-id with a request ID
    • x-user with the user's email address encoded in Base64

Core entity structure

Items of all types (virtual items, bundles, virtual currency, and keys) use a similar data structure. Understanding the basic structure simplifies working with the API and helps you navigate the documentation more easily.

Note

Some calls may include additional fields but they don't change the basic structure.

Identification

  • merchant_id — company ID in Publisher Account
  • project_id — project ID in Publisher Account
  • sku — item SKU, unique within the project

Store display

  • name — item name
  • description — item description
  • image_url — image URL
  • is_enabled — item availability
  • is_show_in_store — whether the item is displayed in the catalog

For more information about managing item availability in the catalog, see the documentation.

Organization

  • type — item type, for example, a virtual item (virtual_item) or bundle (bundle)
  • groups — groups the item belongs to
  • order — display order in the catalog

Sale conditions

  • prices — prices in real or virtual currency
  • limits — purchase limits
  • periods — availability periods
  • regions — regional restrictions

Example of core entity structure:

{
  "attributes": [],
  "bundle_type": "virtual_currency_package",
  "content": [
    {
      "description": {
        "en": "Main in-game currency"
      },
      "image_url": "https://.../image.png",
      "name": {
        "en": "Crystals",
        "ru": "Crystals"
      },
      "quantity": 500,
      "sku": "com.xsolla.crystal_2",
      "type": "virtual_currency"
    }
  ],
  "description": {
    "en": "Crystals x500"
  },
  "groups": [],
  "image_url": "https://.../image.png",
  "is_enabled": true,
  "is_free": false,
  "is_show_in_store": true,
  "limits": {
    "per_item": null,
    "per_user": null,
    "recurrent_schedule": null
  },
  "long_description": null,
  "media_list": [],
  "name": {
    "en": "Medium crystal pack"
  },
  "order": 1,
  "periods": [
    {
      "date_from": null,
      "date_until": "2020-08-11T20:00:00+03:00"
    }
  ],
  "prices": [
    {
      "amount": 20,
      "country_iso": "US",
      "currency": "USD",
      "is_default": true,
      "is_enabled": true
    }
  ],
  "regions": [],
  "sku": "com.xsolla.crystal_pack_2",
  "type": "bundle",
  "vc_prices": []
}

Pagination

API calls that return large sets of records (for example, when building a catalog) return data in pages. Pagination is a mechanism that limits the number of items returned in a single API response and allows you to retrieve subsequent pages sequentially.

Use the following parameters to control the number of returned items:

  • limit — number of items per page
  • offset — index of the first item on the page (numbering starts from 0)
  • has_more — indicates whether another page is available
  • total_items_count — total number of items

Example request:

GET /items?limit=20&offset=40

Response example:

{
  "items": [...],
  "has_more": true,
  "total_items_count": 135
}

It is recommended to send subsequent requests until the response returns has_more = false.

Date and time format

Dates and time values are passed in the ISO 8601 format.

The following are supported:

  • UTC offset
  • null value when there is no time restriction for displaying an item
  • Unix timestamp (in seconds) used in some fields

Format: YYYY-MM-DDTHH:MM:SS±HH:MM

Example: 2026-03-16T10:00:00+03:00

Localization

Xsolla supports localization of user-facing fields such as item name and description. Localized values are passed as an object where the language code is used as the key. The full list of supported languages is available in the documentation.

Supported fields

Localization can be specified for the following parameters:

  • name
  • description
  • long_description

Locale format

The locale key can be specified in one of the following formats:

  • Two-letter language code: en, ru
  • Five-letter language code: en-US, ru-RU, de-DE

Examples

Example with a two-letter language code:

{
  "name": {
    "en": "Starter Pack",
    "ru": "Стартовый набор"
  }
}

Example with a five-letter language code:

{
  "description": {
    "en-US": "Premium bundle",
    "de-DE": "Premium-Paket"
  }
}

Error response format

If an error occurs, the API returns an HTTP status and a JSON response body. The full list of store-related errors is available in the documentation.

Response example:

{
  "errorCode": 1102,
  "errorMessage": "Validation error",
  "statusCode": 422,
  "transactionId": "c9e1a..."
}
  • errorCode — error code.
  • errorMessage — short error description.
  • statusCode — HTTP response status.
  • transactionId — request ID. Returned only in some cases.
  • errorMessageExtended — additional error details, such as request parameters. Returned only in some cases.

Extended response example:

{
  "errorCode": 7001,
  "errorMessage": "Chain not found",
  "errorMessageExtended": {
    "chain_id": "test_chain_id",
    "project_id": "test_project_id",
    "step_number": 2
  },
  "statusCode": 404
}

Common HTTP status codes

  • 400 — invalid request
  • 401 — authentication error
  • 403 — insufficient permissions
  • 404 — resource not found
  • 422 — validation error
  • 429 — rate limit exceeded

Recommendations

  • Handle the HTTP status and the response body together.
  • Use errorCode to process errors related to application logic.
  • Use transactionId to identify requests more quickly when analyzing errors.
下载 OpenAPI 描述
语言
服务器
https://store.xsolla.com/api/
Mock server
https://xsolla.redocly.app/_mock/zh/api/catalog/
操作

获取虚拟货币套餐Server-sideAdmin

请求

获取项目中的虚拟货币套餐以进行管理。

注意

不要使用此端点来构建商店目录。
安全
basicAuth
路径
project_idinteger必需

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

示例: 44056
item_skustring必需

商品SKU。

示例: booster_mega_1
curl -i -X GET \
  -u <username>:<password> \
  https://store.xsolla.com/api/v2/project/44056/admin/items/virtual_currency/package/sku/booster_mega_1

响应

指定的虚拟货币套餐已成功接收。

正文application/json
attributesArray of objects(Virtual-Items-Currency_admin-attributes)

属性列表。

示例: [{"external_id":"attribute_external_id","name":{"de":"Attributname","en":"Attribute name"},"values":[{"external_id":"value_1","name":{"de":"wert 1","en":"value 1"}},{"external_id":"value_2","name":{"de":"wert 2","en":"value 2"}}]}]
bundle_typestring
默认值 "virtual_currency_package"
示例: "virtual_currency_package"
contentArray of objects
custom_attributesobject(json)(item-custom-attributes)<= 500 characters

包含商品属性和值的JSON对象。属性允许您向商品添加更多信息,例如玩家使用该商品所需的等级。属性可丰富游戏的内部逻辑,并且可以通过专用的GET方法和webhook进行访问。

description(two-letter (object or null)) or (five-letter (object or null))(description-localization-object)

包含本地化商品描述的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的区域设置代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:enen-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。

One of:

包含本地化商品描述的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的区域设置代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:enen-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。

groupsArray of objects(Virtual-Items-Currency_admin-groups-response)

商品所属分组。

默认值 []
示例: [{"external_id":"horror","name":{"en":"Horror"}}]
image_urlstring(Virtual-Items-Currency_admin-image_url)
is_enabledboolean(Virtual-Items-Currency_is_enabled)
is_freeboolean(value-is_free)

如果为true,则该商品为免费。

默认值 false
示例: false
is_paid_randomized_rewardboolean(value-is_paid_randomized_reward)

该商品是否为随机付费奖励,例如宝箱。

默认值 false
示例: false
is_show_in_storeboolean(Virtual-Items-Currency_is_show_in_store)
limitsobject or null(admin-item-limit-response)

商品限制。

long_description(two-letter (object or null)) or (five-letter (object or null))(long-description-localization-object)

包含商品详细本地化描述的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的区域设置代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:enen-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。

Any of:

包含商品详细本地化描述的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的区域设置代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:enen-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。

media_listArray of objects(Virtual-Items-Currency_admin-media_list)

商品的附加资源,例如屏幕截图、游戏视频等。

示例: [{"type":"image","url":"https://cdn3.xsolla.com/img/misc/images/71ab1e12126f2103e1868076f0acb21a.jpg"}]
name(two-letter (object or null)) or (five-letter (object or null))(name-localization-object)

包含商品本地化名称的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的语言代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:enen-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。

One of:

包含商品本地化名称的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的语言代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:enen-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。

orderinteger(Virtual-Items-Currency_order)

定义排列顺序。

示例: 1
periodsArray of objects(item-periods-response)

商品促销时间段。

pricesArray of objects(Virtual-Items-Currency_admin-prices)
示例: [{"amount":10.5,"country_iso":"US","currency":"USD","is_default":true,"is_enabled":true}]
regionsArray of objects(Virtual-Items-Currency_admin-regions)
skustring(Virtual-Items-Currency_sku)[ 1 .. 255 ] characters^[a-zA-Z0-9_\-–.]*$

唯一商品ID。 SKU只能包含大小写英文字母和数字字符、句点、破折号和下划线。

示例: "booster_mega_1"
typestring(Virtual-Items-Currency_type)

商品类型:virtual_good/virtual_currency/bundle/physical_good/unit

vc_pricesArray of objects(Virtual-Items-Currency_admin-get-vc_prices)
示例: [{"amount":10,"is_default":true,"sku":"com.xsolla.gold_1"}]
响应
application/json
{ "attributes": [ {} ], "bundle_type": "virtual_currency_package", "content": [ {} ], "custom_attributes": { "attr": "value", "purchased": 0 }, "description": { "en": "Crystals x100" }, "groups": [], "image_url": "https://cdn3.xsolla.com/img/misc/images/a8682cea328afda0bd127d59eb5b9077.png", "is_enabled": true, "is_free": false, "is_paid_randomized_reward": true, "is_show_in_store": true, "limits": { "per_item": null, "per_user": null, "recurrent_schedule": null }, "long_description": null, "media_list": [], "name": { "en": "Small crystal pack" }, "order": 1, "periods": [], "prices": [ {} ], "regions": [], "sku": "com.xsolla.crystal_pack_1", "type": "bundle", "vc_prices": [] }

更新虚拟货币套餐Server-sideAdmin

请求

更新虚拟货币套餐。

安全
basicAuth
路径
project_idinteger必需

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

示例: 44056
item_skustring必需

商品SKU。

示例: booster_mega_1
正文application/json
Any of:
attributesArray of objects(Virtual-Items-Currency_admin-post-put-attributes)<= 20 items

属性列表。

注意:为每个商品指定的属性不能超过20个。任何超出限制的尝试都会导致错误。
contentArray of objects= 1 characters必需

虚拟货币套餐应仅包含1个对象,即虚拟货币。

content[].​quantityinteger
content[].​skustring(Virtual-Items-Currency_sku)[ 1 .. 255 ] characters^[a-zA-Z0-9_\-–.]*$

唯一商品ID。 SKU只能包含大小写英文字母和数字字符、句点、破折号和下划线。

示例: "booster_mega_1"
custom_attributesobject(json)(item-custom-attributes)<= 500 characters

包含商品属性和值的JSON对象。属性允许您向商品添加更多信息,例如玩家使用该商品所需的等级。属性可丰富游戏的内部逻辑,并且可以通过专用的GET方法和webhook进行访问。

description(two-letter (object or null)) or (five-letter (object or null))(description-localization-object)必需

包含本地化商品描述的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的区域设置代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:enen-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。

One of:

包含本地化商品描述的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的区域设置代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:enen-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。

description.​arstring or null

阿拉伯语

description.​bgstring or null

保加利亚语

description.​cnstring or null

中文(简体)

description.​csstring or null

捷克语

description.​destring or null

德语

description.​enstring or null

英语

description.​esstring or null

西班牙语(西班牙)

description.​frstring or null

法语

description.​hestring or null

希伯来语

description.​idstring or null

印度尼西亚语

description.​itstring or null

意大利语

description.​jastring or null

日语

description.​kmstring or null

高棉语

description.​kostring or null

韩语

description.​lostring or null

老挝语

description.​mystring or null

缅甸语

description.​nestring or null

尼泊尔语

description.​phstring or null

菲律宾语

description.​plstring or null

波兰语

description.​ptstring or null

葡萄牙语

description.​rostring or null

罗马尼亚语

description.​rustring or null

俄语

description.​thstring or null

泰语

description.​trstring or null

土耳其语

description.​twstring or null

中文(繁体)

description.​vistring or null

越南语

groupsArray of strings(Virtual-Items-Currency_admin-groups-create)

商品所属的组。

注:字符串值引用组`external_id`。
image_urlstring(Virtual-Items-Currency_admin-image_url)
is_deletedboolean(Virtual-Items-Currency_is_deleted)
is_enabledboolean(Virtual-Items-Currency_is_enabled)
is_freeboolean(value-is_free)

如果为true,则该商品为免费。

默认值 false
示例: false
is_paid_randomized_rewardboolean(value-is_paid_randomized_reward)

该商品是否为随机付费奖励,例如宝箱。

默认值 false
示例: false
is_show_in_storeboolean(Virtual-Items-Currency_is_show_in_store)
limitsobject(Virtual-Currency-Package-item-limit)

商品限制。

long_description(two-letter (object or null)) or (five-letter (object or null))(long-description-localization-object)

包含商品详细本地化描述的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的区域设置代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:enen-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。

Any of:

包含商品详细本地化描述的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的区域设置代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:enen-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。

media_listArray of objects(Virtual-Items-Currency_admin-media_list)

商品的附加资源,例如屏幕截图、游戏视频等。

示例: [{"type":"image","url":"https://cdn3.xsolla.com/img/misc/images/71ab1e12126f2103e1868076f0acb21a.jpg"}]
name(two-letter (object or null)) or (five-letter (object or null))(name-localization-object)必需

包含商品本地化名称的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的语言代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:enen-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。

One of:

包含商品本地化名称的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的语言代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:enen-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。

name.​arstring or null

阿拉伯语

name.​bgstring or null

保加利亚语

name.​cnstring or null

中文(简体)

name.​csstring or null

捷克语

name.​destring or null

德语

name.​enstring or null

英语

name.​esstring or null

西班牙语(西班牙)

name.​frstring or null

法语

name.​hestring or null

希伯来语

name.​idstring or null

印度尼西亚语

name.​itstring or null

意大利语

name.​jastring or null

日语

name.​kmstring or null

高棉语

name.​kostring or null

韩语

name.​lostring or null

老挝语

name.​mystring or null

缅甸语

name.​nestring or null

尼泊尔语

name.​phstring or null

菲律宾语

name.​plstring or null

波兰语

name.​ptstring or null

葡萄牙语

name.​rostring or null

罗马尼亚语

name.​rustring or null

俄语

name.​thstring or null

泰语

name.​trstring or null

土耳其语

name.​twstring or null

中文(繁体)

name.​vistring or null

越南语

orderinteger(Virtual-Items-Currency_order)

定义排列顺序。

示例: 1
periodsArray of objects or null(item-periods)

商品促销时间段。

pre_orderobject(Virtual-Items-Currency_admin-pre_order)
pricesArray of objects(Virtual-Items-Currency_admin-prices)必需
示例: [{"amount":10.5,"country_iso":"US","currency":"USD","is_default":true,"is_enabled":true}]
prices[].​amountnumber> 0必需

金额。

示例: 10.5
prices[].​country_isostring or null

适用此价格的国家/地区。符合ISO 3166-1 alpha 2的两字母代码。

示例: "US"
prices[].​currencystring必需

商品价格货币。每ISO 4217。请查看文档以获取有关Xsolla 支持的货币

示例: "USD"
prices[].​is_defaultboolean
默认值 false
示例: true
prices[].​is_enabledboolean
默认值 true
示例: true
regionsArray of objects(Virtual-Items-Currency_admin-regions)
skustring(Virtual-Items-Currency_sku)[ 1 .. 255 ] characters^[a-zA-Z0-9_\-–.]*$必需

唯一商品ID。 SKU只能包含大小写英文字母和数字字符、句点、破折号和下划线。

示例: "booster_mega_1"
vc_pricesArray of objects(Virtual-Items-Currency_admin-create-vc_prices)
示例: [{"amount":10,"is_default":true,"is_enabled":true,"sku":"com.xsolla.gold_1"}]
curl -i -X PUT \
  -u <username>:<password> \
  https://store.xsolla.com/api/v2/project/44056/admin/items/virtual_currency/package/sku/booster_mega_1 \
  -H 'Content-Type: application/json' \
  -d '{
    "attributes": [
      {
        "external_id": "event",
        "name": {
          "en-US": "Event"
        },
        "values": [
          {
            "external_id": "10-anniversary",
            "value": {
              "en-US": "10th anniversary"
            }
          },
          {
            "external_id": "christmas",
            "value": {
              "en-US": "Christmas"
            }
          }
        ]
      }
    ],
    "content": [
      {
        "quantity": 500,
        "sku": "com.xsolla.novigrad_crown"
      }
    ],
    "custom_attributes": {
      "attr": "value",
      "purchased": 0
    },
    "description": {
      "en-US": "The Crown (also known as the Novigradian crown) is a monetary unit which is used in some Northern Kingdoms",
      "ru-RU": "Крона (Также известна как Новиградская крона) - платежная единица, используемая в северных королевствах"
    },
    "groups": [
      "witcher"
    ],
    "image_url": "https://vignette.wikia.nocookie.net/witcher/images/7/7c/Items_Orens.png/revision/latest?cb=20081113120917",
    "is_enabled": true,
    "is_free": false,
    "is_paid_randomized_reward": true,
    "limits": {
      "per_item": null,
      "per_user": null
    },
    "long_description": {
      "en-US": "Long Test new",
      "ru-RU": "Длинное описание"
    },
    "media_list": [
      {
        "type": "image",
        "url": "https://test.com/image0"
      },
      {
        "type": "image",
        "url": "https://test.com/image1"
      }
    ],
    "name": {
      "en-US": "500x Novigradian crown",
      "ru-RU": "500x Новиградских крон"
    },
    "order": 1,
    "periods": [
      {
        "date_from": "2020-08-11T10:00:00+03:00",
        "date_until": "2020-08-11T20:00:00+03:00"
      }
    ],
    "prices": [
      {
        "amount": 99.99,
        "currency": "USD",
        "is_default": true
      },
      {
        "amount": 80.03,
        "currency": "EUR",
        "is_enabled": false
      }
    ],
    "sku": "com.xsolla.novigrad_crown_500",
    "vc_prices": null
  }'

响应

虚拟物品已成功更新。

响应
无内容

删除虚拟货币Server-sideAdmin

请求

删除虚拟货币。

安全
basicAuth
路径
project_idinteger必需

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

示例: 44056
virtual_currency_skustring必需

虚拟货币SKU。

示例: crystal
curl -i -X DELETE \
  -u <username>:<password> \
  https://store.xsolla.com/api/v2/project/44056/admin/items/virtual_currency/sku/crystal

响应

虚拟货币已成功删除。

正文
响应
无内容
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作
操作

目录

本API允许获取任意类型的可售商品或指定商品。

操作
操作
操作