Skip to content

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

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.

Download OpenAPI description
Languages
Servers
Mock server
https://xsolla.redocly.app/_mock/api/shop-builder/
https://store.xsolla.com/api/
Operations

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.

Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations

Catalog

This API allows getting any kind of sellable items or specific item.

Operations
Operations
Operations

Request

Gets a games list for building a catalog.

Attention

All projects have the limitation to the number of items that you can get in the response. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields.

Note

The use of the item catalog API calls is available without authorization, but to get a personalized catalog, you must pass the user JWT in the Authorization header.
Security
XsollaLoginUserJWT
Path
project_idintegerrequired

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

Example: 44056
Query
limitinteger>= 1

Limit for the number of elements on the page.

Example: limit=50
offsetinteger>= 0

Number of the element from which the list is generated (the count starts from 0).

Example: offset=0
localestring

Response language. Two-letter lowercase language code per ISO 639-1.

Default "en"
additional_fields[]Array of strings

The list of additional fields. These fields will be in the response if you send them in your request.

Items Enum"media_list""order""long_description""custom_attributes""item_order_in_group"
countrystring

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
promo_codestring[ 1 .. 128 ] characters

Unique case sensitive code. Contains letters and numbers.

Example: promo_code=WINTER2021
show_inactive_time_limited_itemsinteger

Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.

Default 0
Example: show_inactive_time_limited_items=1
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/items/game?limit=50&offset=0&locale=en&additional_fields%5B%5D=media_list&country=US&promo_code=WINTER2021&show_inactive_time_limited_items=1' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

The list of games was successfully received.

Bodyapplication/json
has_moreboolean(Pagination_has-more)

Used as an indicator that there are more pages.

Example: true
itemsArray of objects
Example: [{"sku":"com.xsolla.game_1","name":"Game name","groups":[{"external_id":"all","name":"All games"},{"external_id":"Xsolla","name":"Xsolla games"}],"type":"unit","unit_type":"game","description":"Game description","image_url":"https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png","attributes":[{"external_id":"genre","name":"Genre","values":[{"external_id":"23fda05111c125608af8f1fa0e99db45a10ea1cc","value":"Horror"}]}],"promotions":[],"unit_items":[{"sku":"com.xsolla.game_key_01","type":"game_key","is_free":false,"price":{"amount":"30.5","amount_without_discount":"30.5","currency":"USD"},"virtual_prices":[],"can_be_bought":true,"drm_name":"Steam","drm_sku":"steam_key_1","has_keys":true,"is_pre_order":true,"release_date":"2020-08-11T10:00:00+03:00","promotions":[],"periods":[{"date_from":"2020-08-11T10:00:00+03:00","date_until":"2020-08-11T20:00:00+03:00"}]},{"sku":"com.xsolla.game_key_02","type":"game_key","is_free":false,"price":{"amount":"30.5","amount_without_discount":"30.5","currency":"USD"},"virtual_prices":[],"can_be_bought":true,"drm_name":"Origin","drm_sku":"origin_key_1","has_keys":false,"is_pre_order":false,"release_date":null,"promotions":[],"periods":[]}]},{"sku":"com.xsolla.game_2","name":"Game name","groups":[{"external_id":"all","name":"All games"}],"type":"unit","unit_type":"game","description":"Game description","image_url":"https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png","attributes":[{"external_id":"OS","name":"OS","values":[{"external_id":"9d5c5efb7c0f00a00fe4e3583f1215b0050bc723","value":"Windows"}]}],"promotions":[],"unit_items":[{"sku":"com.xsolla.game_key_01","type":"game_key","is_free":false,"price":{"amount":"30.5","amount_without_discount":"30.5","currency":"USD"},"virtual_prices":[],"can_be_bought":true,"drm_name":"Steam","drm_sku":"steam_key_2","has_keys":false,"is_pre_order":false,"release_date":null,"promotions":[],"periods":[{"date_from":null,"date_until":"2020-08-11T20:00:00+03:00"}]}]}]
Response
application/json
{ "has_more": false, "items": [ {}, {} ] }

Get games list by specified groupClient-side

Request

Gets a games list from the specified group for building a catalog.

Attention

All projects have the limitation to the number of items that you can get in the response. The default and maximum value is 50 items per response. To get more data page by page, use limit and offset fields.

Note

The use of the item catalog API calls is available without authorization, but to get a personalized catalog, you must pass the user JWT in the Authorization header.
Security
XsollaLoginUserJWT
Path
project_idintegerrequired

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

Example: 44056
external_idstringrequired

Group external ID.

Default "all"
Query
limitinteger>= 1

Limit for the number of elements on the page.

Example: limit=50
offsetinteger>= 0

Number of the element from which the list is generated (the count starts from 0).

Example: offset=0
localestring

Response language. Two-letter lowercase language code per ISO 639-1.

Default "en"
additional_fields[]Array of strings

The list of additional fields. These fields will be in the response if you send them in your request.

Items Enum"media_list""order""long_description""custom_attributes""item_order_in_group"
countrystring

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
promo_codestring[ 1 .. 128 ] characters

Unique case sensitive code. Contains letters and numbers.

Example: promo_code=WINTER2021
show_inactive_time_limited_itemsinteger

Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.

Default 0
Example: show_inactive_time_limited_items=1
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/items/game/group/{external_id}?limit=50&offset=0&locale=en&additional_fields%5B%5D=media_list&country=US&promo_code=WINTER2021&show_inactive_time_limited_items=1' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

The list of games was successfully received.

Bodyapplication/json
has_moreboolean(Pagination_has-more)

Used as an indicator that there are more pages.

Example: true
itemsArray of objects
Example: [{"sku":"com.xsolla.game_1","name":"Game name","groups":[{"external_id":"all","name":"All games"},{"external_id":"Xsolla","name":"Xsolla games"}],"type":"unit","unit_type":"game","description":"Game description","image_url":"https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png","attributes":[{"external_id":"genre","name":"Genre","values":[{"external_id":"23fda05111c125608af8f1fa0e99db45a10ea1cc","value":"Horror"}]}],"promotions":[],"unit_items":[{"sku":"com.xsolla.game_key_01","type":"game_key","is_free":false,"price":{"amount":"30.5","amount_without_discount":"30.5","currency":"USD"},"virtual_prices":[],"can_be_bought":true,"drm_name":"Steam","drm_sku":"steam_key_1","has_keys":true,"is_pre_order":true,"release_date":"2020-08-11T10:00:00+03:00","promotions":[],"periods":[{"date_from":"2020-08-11T10:00:00+03:00","date_until":"2020-08-11T20:00:00+03:00"}]},{"sku":"com.xsolla.game_key_02","type":"game_key","is_free":false,"price":{"amount":"30.5","amount_without_discount":"30.5","currency":"USD"},"virtual_prices":[],"can_be_bought":true,"drm_name":"Origin","drm_sku":"origin_key_1","has_keys":false,"is_pre_order":false,"release_date":null,"promotions":[],"periods":[]}]},{"sku":"com.xsolla.game_2","name":"Game name","groups":[{"external_id":"all","name":"All games"}],"type":"unit","unit_type":"game","description":"Game description","image_url":"https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png","attributes":[{"external_id":"OS","name":"OS","values":[{"external_id":"9d5c5efb7c0f00a00fe4e3583f1215b0050bc723","value":"Windows"}]}],"promotions":[],"unit_items":[{"sku":"com.xsolla.game_key_01","type":"game_key","is_free":false,"price":{"amount":"30.5","amount_without_discount":"30.5","currency":"USD"},"virtual_prices":[],"can_be_bought":true,"drm_name":"Steam","drm_sku":"steam_key_2","has_keys":false,"is_pre_order":false,"release_date":null,"promotions":[],"periods":[{"date_from":null,"date_until":"2020-08-11T20:00:00+03:00"}]}]}]
Response
application/json
{ "has_more": false, "items": [ {}, {} ] }

Request

Gets a game for the 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.
Security
XsollaLoginUserJWT
Path
project_idintegerrequired

Project ID. You can find this parameter in your Publisher Account next to the name of the project.

Example: 44056
item_skustringrequired

Item SKU.

Default "full_game_1"
Query
localestring

Response language. Two-letter lowercase language code per ISO 639-1.

Default "en"
additional_fields[]Array of strings

The list of additional fields. These fields will be in the response if you send them in your request.

Items Enum"media_list""order""long_description""custom_attributes""item_order_in_group"
countrystring

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
promo_codestring[ 1 .. 128 ] characters

Unique case sensitive code. Contains letters and numbers.

Example: promo_code=WINTER2021
show_inactive_time_limited_itemsinteger

Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.

Default 0
Example: show_inactive_time_limited_items=1
curl -i -X GET \
  'https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/items/game/sku/{item_sku}?locale=en&additional_fields%5B%5D=media_list&country=US&promo_code=WINTER2021&show_inactive_time_limited_items=1' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Game was successfully received.

Bodyapplication/json
skustring

Unique item ID. The SKU may contain only lowercase and uppercase Latin alphanumeric characters, periods, dashes, and underscores.

Example: "game_01"
namestring

Item name.

Example: "Game name"
groupsArray of objects(items_client_groups_response)

Groups the item belongs to.

Default []
Example: [{"external_id":"exclusive","name":"Exclusive"}]
attributesArray of objects(Game-Keys_schemas-client-attributes)

List of attributes and their values corresponding to the item. Can be used for catalog filtering.

Default []
Example: {"value":{"external_id":"genre","name":"Жанр","values":[{"external_id":"genre_e3364991f92e751689a68b96598a5a5a84010b85","value":"Casual"},{"external_id":"genre_eba07bfd0f982940773cba3744d97264dd58acd7","value":"Strategy"},{"external_id":"genre_b8d0c6d8f0524c2b2d79ebb93aa3cd0e8b5199a8","value":"Mobile"}]}}
typestring

Type of item: virtual_good/virtual_currency/bundle/physical_good/unit.

Example: "unit"
unit_typestring

Type of unit: game.

Example: "game"
descriptionstring

Item description.

Example: "Game description"
image_urlstring

Image URL.

Example: "https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png"
promotionsArray of objects(Catalog_item_promotions)

Applied promotions for specific items in the cart. The array is returned in the following cases:

  • A discount promotion is configured for a specific item.

  • A promo code with the Discount on selected items setting is applied.

If no item-level promotions are applied, an empty array is returned.

unit_itemsArray of objects
Response
application/json
{ "sku": "com.xsolla.game_1", "name": "Game name", "groups": [ {}, {} ], "type": "unit", "unit_type": "game", "description": "Game description", "image_url": "https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png", "attributes": [ {}, {} ], "promotions": [], "unit_items": [ {}, {} ] }
Operations
Operations
Operations

Coupons

This API allows to you to manage coupons.

Operations

Promo codes

This API allows to manage promo codes.

Operations

Unique catalog offers

This API allows to you to manage unique catalog offers.

Operations

Discounts

This API allows to you to manage discount promotions.

Operations

Bonuses

This API allows to manage bonus promotions.

Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations