Catalog API (2.0.0)
- 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.
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.
- https://store.xsolla.com/api/v2/project/{project_id}/admin/items/virtual_items
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/catalog/v2/project/{project_id}/admin/items/virtual_items
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://store.xsolla.com/api/v2/project/44056/admin/items/virtual_items?limit=50&offset=0'{ "items": [ { … }, { … }, { … }, { … }, { … } ] }
属性列表。
包含商品属性和值的JSON对象。属性允许您向商品添加更多信息,例如玩家使用该商品所需的等级。属性可丰富游戏的内部逻辑,并且可以通过专用的GET方法和webhook进行访问。
包含本地化商品描述的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的区域设置代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:en和en-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。
包含本地化商品描述的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的区域设置代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:en和en-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。
图像URL。
该商品是否为随机付费奖励,例如宝箱。
包含商品详细本地化描述的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的区域设置代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:en和en-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。
包含商品详细本地化描述的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的区域设置代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:en和en-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。
商品的附加资源,例如屏幕截图、游戏视频等。
包含商品本地化名称的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的语言代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:en和en-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。
包含商品本地化名称的对象。值接受以下两种格式之一:两个小写字母的语言代码(例如,en)或五个字符的语言代码(例如,en-US)。虽然两种格式都可作为输入接受,但响应会返回两个小写字母的语言代码。当为同一种语言提供了两种输入时(例如:en和en-US),将存储最后提供的值。您可以在文档中找到支持语言的完整列表。
唯一商品ID。 SKU只能包含大小写英文字母和数字字符、句点、破折号和下划线。
- https://store.xsolla.com/api/v2/project/{project_id}/admin/items/virtual_items
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/catalog/v2/project/{project_id}/admin/items/virtual_items
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://store.xsolla.com/api/v2/project/44056/admin/items/virtual_items \
-H 'Content-Type: application/json' \
-d '{
"attributes": [
{
"external_id": "craft-materials",
"name": {
"en": "Craft materials"
},
"values": [
{
"external_id": "steel",
"value": {
"en-US": "5"
}
},
{
"external_id": "leather",
"value": {
"en-US": "1"
}
}
]
}
],
"custom_attributes": {
"attr": "value",
"purchased": 0
},
"description": {
"de": "Ein Schwert ist eine Nahkampfwaffe mit Klinge, die zum Schneiden oder Stechen bestimmt ist, länger als ein Messer oder Dolch ist und aus einer langen Klinge besteht, die an einem Griff befestigt ist.",
"en": "A sword is a bladed melee weapon intended for cutting or thrusting that is longer than a knife or dagger, consisting of a long blade attached to a hilt."
},
"groups": [
"weapons"
],
"is_enabled": true,
"is_free": false,
"is_paid_randomized_reward": true,
"is_show_in_store": true,
"limits": {
"per_item": 100,
"per_user": 5
},
"name": {
"de": "Schwert",
"en": "Sword"
},
"order": 1,
"periods": [
{
"date_from": "2020-08-11T10:00:00+03:00",
"date_until": "2020-08-11T20:00:00+03:00"
}
],
"prices": [
{
"amount": 100,
"currency": "USD",
"is_default": true,
"is_enabled": true
},
{
"amount": 200,
"country_iso": "CZ",
"currency": "CZK",
"is_default": true,
"is_enabled": false
}
],
"sku": "com.xsolla.sword_1",
"vc_prices": []
}'{ "sku": "com.xsolla.item_1" }
- https://store.xsolla.com/api/v2/project/{project_id}/admin/items/virtual_items/group/external_id/{external_id}
- Mock serverhttps://xsolla.redocly.app/_mock/zh/api/catalog/v2/project/{project_id}/admin/items/virtual_items/group/external_id/{external_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://store.xsolla.com/api/v2/project/44056/admin/items/virtual_items/group/external_id/{external_id}?limit=50&offset=0'{ "items": [ { … }, { … }, { … }, { … } ] }