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
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

Get list of virtual itemsServer-sideAdmin

Request

Gets the list of virtual items within a project for administration.

Note

Do not use this endpoint for building a store catalog.
Security
basicAuth
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
curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/admin/items/virtual_items?limit=50&offset=0'

Responses

The list of virtual items was successfully received.

Bodyapplication/json
itemsArray of objects(Virtual-Items-Currency_admin-virtual-item)
Response
application/json
{ "items": [ {}, {}, {}, {}, {} ] }

Create virtual itemServer-sideAdmin

Request

Creates a virtual item.

Security
basicAuth
Path
project_idintegerrequired

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

Example: 44056
Bodyapplication/json
skustring(Virtual-Items-Currency_sku)[ 1 .. 255 ] characters^[a-zA-Z0-9_\-–.]*$

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

Example: "booster_mega_1"
name(two-letter (object or null)) or (five-letter (object or null))(name-localization-object)

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.

One of:

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.

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

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.

One of:

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.

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

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.

Any of:

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.

image_urlstring(Virtual-Items-Currency_schemas-admin-image_url)

Image URL.

Example: "https://image.example.com"
media_listArray of objects(Virtual-Items-Currency_admin-media_list)

Item's additional assets such as screenshots, gameplay video and so on.

Example: [{"type":"image","url":"https://cdn3.xsolla.com/img/misc/images/71ab1e12126f2103e1868076f0acb21a.jpg"}]
groupsArray of strings(Virtual-Items-Currency_admin-groups-create)

Groups the item belongs to.

Note. The string value refers to group `external_id`.
attributesArray of objects(Virtual-Items-Currency_admin-post-put-attributes)<= 20 items

List of attributes.

Attention. You can't specify more than 20 attributes for the item. Any attempts to exceed the limit result in an error.
pricesArray of objects(Virtual-Items_admin-prices)
Example: [{"currency":"USD","amount":10.5,"is_default":true,"is_enabled":true}]
vc_pricesArray of objects(Virtual-Items-Currency_admin-create-vc_prices)
Example: [{"sku":"com.xsolla.gold_1","amount":10,"is_default":true,"is_enabled":true}]
is_enabledboolean(Virtual-Items-Currency_is_enabled)
is_deletedboolean(Virtual-Items-Currency_is_deleted)
is_show_in_storeboolean(Virtual-Items-Currency_is_show_in_store)
is_freeboolean(value-is_free)

If true, the item is free.

Default false
Example: false
orderinteger(Virtual-Items-Currency_order)

Defines arrangement order.

Example: 1
pre_orderobject(Virtual-Items-Currency_admin-pre_order)
regionsArray of objects(Virtual-Items-Currency_admin-regions)
limitsobject(Virtual-Item-item-limit)

Item limits.

periodsArray of objects or null(item-periods)

Item sales period.

custom_attributesobject(json)(item-custom-attributes)<= 500 characters

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.

curl -i -X POST \
  -u <username>:<password> \
  https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/admin/items/virtual_items \
  -H 'Content-Type: application/json' \
  -d '{
    "sku": "com.xsolla.sword_1",
    "name": {
      "en": "Sword",
      "de": "Schwert"
    },
    "is_enabled": true,
    "is_free": false,
    "groups": [
      "weapons"
    ],
    "order": 1,
    "description": {
      "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.",
      "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."
    },
    "prices": [
      {
        "amount": 100,
        "currency": "USD",
        "is_enabled": true,
        "is_default": true
      },
      {
        "amount": 200,
        "currency": "CZK",
        "country_iso": "CZ",
        "is_enabled": false,
        "is_default": true
      }
    ],
    "vc_prices": [],
    "is_show_in_store": true,
    "attributes": [
      {
        "external_id": "craft-materials",
        "name": {
          "en": "Craft materials"
        },
        "values": [
          {
            "external_id": "steel",
            "value": {
              "en-US": "5"
            }
          },
          {
            "external_id": "leather",
            "value": {
              "en-US": "1"
            }
          }
        ]
      }
    ],
    "limits": {
      "per_user": 5,
      "per_item": 100
    },
    "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"
    }
  }'

Responses

Virtual item was successfully created.

Bodyapplication/json
skustring
Example: "com.xsolla.item_1"
Response
application/json
{ "sku": "com.xsolla.item_1" }

Get list of virtual items by specified group external idServer-sideAdmin

Request

Gets the list of virtual items within a group for administration.

Note

Do not use this endpoint for building a store catalog.
Security
basicAuth
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
curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/admin/items/virtual_items/group/external_id/{external_id}?limit=50&offset=0'

Responses

The list of virtual items was successfully received.

Bodyapplication/json
itemsArray of objects(Virtual-Items-Currency_admin-virtual-item)
Response
application/json
{ "items": [ {}, {}, {}, {} ] }
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations