This API allows getting any kind of sellable items or specific item.
- Get list of virtual currency packages (admin)
Shop Builder 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
Shop Builder API provides a third-party solution for implementing the server side for your store interface. Use the endpoints to manage in-game items, in-game currencies, cart, player inventory, promotions, game library, etc.
Personalized catalog
This API allows to specify rules for user attributes. If the user meets all conditions for a concrete rule, personalized items will be shown.
For personalized promotions see Promotions section.
To pass attributes before a purchase, you can use Xsolla Login API or pass them into user.attributes property while generating token using Pay Station API.
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
- Mock serverhttps://xsolla.redocly.app/_mock/api/shop-builder/v2/project/{project_id}/admin/items/virtual_currency/sku/{virtual_currency_sku}
- https://store.xsolla.com/api/v2/project/{project_id}/admin/items/virtual_currency/sku/{virtual_currency_sku}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
-u <username>:<password> \
https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/admin/items/virtual_currency/sku/crystalProject ID. You can find this parameter in your Publisher Account next to the name of the project.
- Mock serverhttps://xsolla.redocly.app/_mock/api/shop-builder/v2/project/{project_id}/admin/items/virtual_currency/package
- https://store.xsolla.com/api/v2/project/{project_id}/admin/items/virtual_currency/package
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/admin/items/virtual_currency/package?limit=50&offset=0'{ "items": [ { … }, { … }, { … }, { … }, { … }, { … } ] }
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
Unique item ID. The SKU may contain only lowercase and uppercase Latin alphanumeric characters, periods, dashes, and underscores.
Object with localizations for item’s name. Accepts value in one of two formats: two-letter lowercase language codes (e.g., en) or five-character language codes (e.g., en-US). While both formats are accepted as input, responses return two-letter lowercase language codes. When both options for the same language are provided (e.g., en and en-US), the last provided value is stored. You can find the full list of supported languages in the documentation.
Object with localizations for item’s name. Accepts value in one of two formats: two-letter lowercase language codes (e.g., en) or five-character language codes (e.g., en-US). While both formats are accepted as input, responses return two-letter lowercase language codes. When both options for the same language are provided (e.g., en and en-US), the last provided value is stored. You can find the full list of supported languages in the documentation.
Object with localizations for item’s description. Accepts value in one of two formats: two-letter lowercase language codes (e.g., en) or five-character locale codes (e.g., en-US). While both formats are accepted as input, responses return two-letter lowercase language codes. When both options for the same language are provided (e.g., en and en-US), the last provided value is stored. You can find the full list of supported languages in the documentation.
Object with localizations for item’s description. Accepts value in one of two formats: two-letter lowercase language codes (e.g., en) or five-character locale codes (e.g., en-US). While both formats are accepted as input, responses return two-letter lowercase language codes. When both options for the same language are provided (e.g., en and en-US), the last provided value is stored. You can find the full list of supported languages in the documentation.
Object with localizations for long description of item. Accepts value in one of two formats: two-letter lowercase language codes (e.g., en) or five-character locale codes (e.g., en-US). While both formats are accepted as input, responses return two-letter lowercase language codes. When both variants for the same language are provided (e.g., en and en-US), the last provided value is stored. You can find the full list of supported languages in the documentation.
Object with localizations for long description of item. Accepts value in one of two formats: two-letter lowercase language codes (e.g., en) or five-character locale codes (e.g., en-US). While both formats are accepted as input, responses return two-letter lowercase language codes. When both variants for the same language are provided (e.g., en and en-US), the last provided value is stored. You can find the full list of supported languages in the documentation.
Item's additional assets such as screenshots, gameplay video and so on.
Groups the item belongs to.
List of attributes.
Item price currency. Three-letter code per ISO 4217. Check the documentation for detailed information about currencies supported by Xsolla.
Country where this price is available. Two-letter code per ISO 3166-1 alpha 2.
Virtual currency package should contain only 1 position of virtual currency.
A JSON object containing item attributes and values. Attributes allow you to add more info to items like the player's required level to use the item. Attributes enrich your game's internal logic and are accessible through dedicated GET methods and webhooks.
- Mock serverhttps://xsolla.redocly.app/_mock/api/shop-builder/v2/project/{project_id}/admin/items/virtual_currency/package
- https://store.xsolla.com/api/v2/project/{project_id}/admin/items/virtual_currency/package
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/admin/items/virtual_currency/package \
-H 'Content-Type: application/json' \
-d '{
"sku": "com.xsolla.novigrad_crown_500",
"name": {
"en-US": "500x Novigradian crown",
"ru-RU": "500x Новиградских крон"
},
"is_enabled": true,
"is_free": false,
"groups": [
"witcher"
],
"order": 1,
"long_description": {
"en-US": "Long Test new",
"ru-RU": "Длинное описание"
},
"description": {
"en-US": "The Crown (also known as the Novigradian crown) is a monetary unit which is used in some Northern Kingdoms",
"ru-RU": "Крона (Также известна как Новиградская крона) - платежная единица, используемая в северных королевствах"
},
"image_url": "https://vignette.wikia.nocookie.net/witcher/images/7/7c/Items_Orens.png/revision/latest?cb=20081113120917",
"media_list": [
{
"type": "image",
"url": "https://test.com/image0"
},
{
"type": "image",
"url": "https://test.com/image1"
}
],
"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"
}
}
]
}
],
"prices": [
{
"currency": "USD",
"amount": 99.99,
"is_default": true
},
{
"currency": "EUR",
"amount": 80.03,
"is_enabled": false
}
],
"vc_prices": null,
"content": [
{
"sku": "com.xsolla.novigrad_crown",
"quantity": 500
}
],
"limits": {
"per_user": null,
"per_item": null
},
"periods": [
{
"date_from": "2020-08-11T10:00:00+03:00",
"date_until": "2020-08-11T20:00:00+03:00"
}
],
"custom_attributes": {
"purchased": 0,
"attr": "value"
}
}'{ "sku": "com.xsolla.item_1" }