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

Request

Creates a bundle.

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

Object with bundle data.

skustring(Bundles_sku)[ 1 .. 255 ] characters^[a-zA-Z0-9_\-–.]*$required

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

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

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.

name.​enstring or null

English

name.​arstring or null

Arabic

name.​bgstring or null

Bulgarian

name.​cnstring or null

Chinese (Simplified)

name.​csstring or null

Czech

name.​destring or null

German

name.​esstring or null

Spanish (Spain)

name.​frstring or null

French

name.​hestring or null

Hebrew

name.​itstring or null

Italian

name.​jastring or null

Japanese

name.​kostring or null

Korean

name.​plstring or null

Polish

name.​ptstring or null

Portuguese

name.​rostring or null

Romanian

name.​rustring or null

Russian

name.​thstring or null

Thai

name.​trstring or null

Turkish

name.​twstring or null

Chinese (Traditional)

name.​vistring or null

Vietnamese

name.​kmstring or null

Khmer

name.​idstring or null

Indonesian

name.​lostring or null

Lao

name.​mystring or null

Burmese

name.​phstring or null

Filipino

name.​nestring or null

Nepali

groupsArray of strings(Bundles_groups_request)

Groups the item belongs to.

Note. The string value refers to group `external_id`.
Default []
Example: ["honor"]
attributesArray of objects(Bundles_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.
description(two-letter (object or null)) or (five-letter (object or null))(description-localization-object)required

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.

description.​enstring or null

English

description.​arstring or null

Arabic

description.​bgstring or null

Bulgarian

description.​cnstring or null

Chinese (Simplified)

description.​csstring or null

Czech

description.​destring or null

German

description.​esstring or null

Spanish (Spain)

description.​frstring or null

French

description.​hestring or null

Hebrew

description.​itstring or null

Italian

description.​jastring or null

Japanese

description.​kostring or null

Korean

description.​plstring or null

Polish

description.​ptstring or null

Portuguese

description.​rostring or null

Romanian

description.​rustring or null

Russian

description.​thstring or null

Thai

description.​trstring or null

Turkish

description.​twstring or null

Chinese (Traditional)

description.​vistring or null

Vietnamese

description.​kmstring or null

Khmer

description.​idstring or null

Indonesian

description.​lostring or null

Lao

description.​mystring or null

Burmese

description.​phstring or null

Filipino

description.​nestring or null

Nepali

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 or null(Bundles_image_url)

Image URL.

Example: "https://image.example.com"
pricesArray of objects(Bundles_prices)

Prices in real currencies.

vc_pricesArray of objects or null
bundle_typestring(Bundles_bundle_type)

Bundle type. Use standard to create a bundle with items and specify the SKUs of the items included in the bundle. Use partner_side_content to create an empty bundle and add items on your side using a webhook. This type is used only for Catalog personalization on partner side.

Default "standard"
Enum"standard""partner_side_content"
Example: "standard"
contentArray of objects(Bundles_admin_content_request)non-empty
Example: [{"sku":"com.xsolla.kg_1","quantity":1}]
is_freeboolean(value-is_free)

If true, the item is free.

Default false
Example: false
is_enabledboolean(Bundles_is_enabled)

If disabled, the item can't be found and purchased.

Default true
Example: true
is_show_in_storeboolean(Bundles_is_show_in_store)

Item is available for purchase.

Default false
Example: true
media_listArray of objects or null

Bundle's additional assets.

Example: [{"type":"image","url":"https://cdn3.xsolla.com/img/misc/images/71ab1e12126f2103e1868076f0acb21a.jpg"}]
orderinteger(Bundles_order)

Bundle's order priority in the list.

Default 1
Example: 1
regionsArray of objects(Bundles_admin-regions)
limitsobject(bundle-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/bundle \
  -H 'Content-Type: application/json' \
  -d '{
    "sku": "com.xsolla.armour_chest_1",
    "name": {
      "en": "Chest of armour",
      "de": "Brustpanzer"
    },
    "is_enabled": true,
    "is_free": true,
    "order": 1,
    "long_description": {
      "en": "Chest of armour for soldiers",
      "de": "Brustpanzer für Soldaten"
    },
    "description": {
      "en": "Chest of armour for soldiers",
      "de": "Brustpanzer für Soldaten"
    },
    "image_url": "https://picture.bundle-with-many-stuff.png",
    "media_list": [
      {
        "type": "image",
        "url": "https://test.com/image0"
      },
      {
        "type": "image",
        "url": "https://test.com/image1"
      }
    ],
    "groups": [
      "chests"
    ],
    "attributes": [
      {
        "external_id": "class",
        "name": {
          "en": "Class"
        },
        "values": [
          {
            "external_id": "soldier",
            "value": {
              "en": "Soldier"
            }
          },
          {
            "external_id": "officer",
            "value": {
              "en": "Officer"
            }
          }
        ]
      }
    ],
    "prices": [
      {
        "currency": "USD",
        "amount": "9.99",
        "is_default": true,
        "is_enabled": true
      },
      {
        "currency": "EUR",
        "amount": "9.99",
        "is_default": false,
        "is_enabled": true
      }
    ],
    "vc_prices": [],
    "content": [
      {
        "sku": "com.xsolla.iron_gloves_1",
        "quantity": 1
      },
      {
        "sku": "com.xsolla.iron_boots_1",
        "quantity": 1
      },
      {
        "sku": "com.xsolla.iron_shield_1",
        "quantity": 1
      },
      {
        "sku": "com.xsolla.iron_armour_1",
        "quantity": 1
      },
      {
        "sku": "com.xsolla.iron_helmet_1",
        "quantity": 1
      }
    ],
    "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": {
      "type": "lootbox",
      "purchased": 0
    }
  }'

Responses

Bundle was successfully created.

Bodyapplication/json
skustring(Bundles_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: "bundle_1"
Response
application/json
{ "sku": "com.xsolla.kg_1" }

Get list of bundles by specified group idServer-sideAdmin

Request

Gets the list of bundles 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
group_idintegerrequired

Group ID.

Example: 10
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/bundle/group/id/10?limit=50&offset=0'

Responses

The list of bundles was successfully received.

Bodyapplication/json
itemsArray of objects(Bundles_admin_bundle_response)
Response
application/json
{ "items": [ {}, {} ] }

Get list of bundles by specified group external idServer-sideAdmin

Request

Gets the list of bundles 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/bundle/group/external_id/{external_id}?limit=50&offset=0'

Responses

The list of bundles was successfully received.

Bodyapplication/json
itemsArray of objects(Bundles_admin_bundle_response)
Response
application/json
{ "items": [ {}, {} ] }
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
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations