This API allows getting any kind of sellable items or specific item.
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.
Request
Gets a virtual currency packages list for building a catalog.
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.
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.
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
Number of the element from which the list is generated (the count starts from 0).
The list of additional fields. These fields will be in the response if you send them in your request.
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.
Unique case sensitive code. Contains letters and numbers.
- Mock serverhttps://xsolla.redocly.app/_mock/api/shop-builder/v2/project/{project_id}/items/virtual_currency/package
- https://store.xsolla.com/api/v2/project/{project_id}/items/virtual_currency/package
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/items/virtual_currency/package?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>'{ "has_more": false, "items": [ { … }, { … } ] }
Request
Gets a virtual currency packages by SKU for building a catalog.
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.
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
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.
Shows time-limited items that are not available to the user. The validity period of such items has not started or has already expired.
- Mock serverhttps://xsolla.redocly.app/_mock/api/shop-builder/v2/project/{project_id}/items/virtual_currency/package/sku/{virtual_currency_package_sku}
- https://store.xsolla.com/api/v2/project/{project_id}/items/virtual_currency/package/sku/{virtual_currency_package_sku}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/items/virtual_currency/package/sku/crystal-pack?locale=en&country=US&show_inactive_time_limited_items=1&additional_fields%5B%5D=media_list' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'The virtual currency package was successfully received.
Unique item ID. The SKU may contain only lowercase and uppercase Latin alphanumeric characters, periods, dashes, and underscores.
Groups the item belongs to.
List of attributes and their values corresponding to the item. Can be used for catalog filtering.
Type of bundle: standard/virtual_currency_package.
Image URL.
Virtual currency package content.
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.
A JSON object containing item attributes and values.
{ "item_id": 488832, "sku": "com.xsolla.crystal_pack_1", "type": "bundle", "name": "Crystal Pack", "bundle_type": "virtual_currency_package", "description": "Crystal Pack Short Description", "image_url": "http://vc_package_image.png", "price": { "amount": "100", "amount_without_discount": "100", "currency": "USD" }, "virtual_prices": [], "can_be_bought": true, "promotions": [], "limits": { "per_user": { … }, "per_item": null }, "periods": [ { … } ], "attributes": [], "is_free": false, "groups": [], "content": [ { … } ], "vp_rewards": [], "custom_attributes": { "purchased": 0, "attr": "value" } }
Request
Gets an items list from the specified group for building a catalog.
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.
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.
Project ID. You can find this parameter in your Publisher Account next to the name of the project.
Number of the element from which the list is generated (the count starts from 0).
The list of additional fields. These fields will be in the response if you send them in your request.
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.
Unique case sensitive code. Contains letters and numbers.
- Mock serverhttps://xsolla.redocly.app/_mock/api/shop-builder/v2/project/{project_id}/items/virtual_items/group/{external_id}
- https://store.xsolla.com/api/v2/project/{project_id}/items/virtual_items/group/{external_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/items/virtual_items/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>'The list of items from the specified group was successfully received.
{ "has_more": false, "items": [ { … }, { … } ] }