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

Get list of catalog filter rulesServer-sideAdmin

Request

Gets all rules applying to user attributes.

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
is_enabledinteger

Filter elements by is_enabled flag.

curl -i -X GET \
  -u <username>:<password> \
  'https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/admin/user/attribute/rule?limit=50&offset=0&is_enabled=0'

Responses

Rules were successfully received.

Bodyapplication/json
itemsArray of objects(user-attribute_personalized-catalog)
total_items_countnumber

Total number of rules.

has_moreboolean

If another page with rules exists.

Response
application/json
{ "items": [ {} ], "total_items_count": 20, "has_more": true }

Create catalog filter ruleServer-sideAdmin

Request

Create rule for user attributes.

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
namestring[ 1 .. 255 ] characters^\Srequired

Readable name of a rule. Used to display a rule in Publisher Account.

is_enabledbooleanrequired

If rule is enabled.

is_satisfied_for_unauthboolean

Whether the item is displayed to unauthorized users. If true, the item is displayed to the unauthorized user regardless of catalog display rules. false by default.

attribute_conditionsArray of type = string (object) or type = number (object) or type = date (object)(personalized-catalog_user-attribute_conditions_model-post)[ 1 .. 100 ] itemsrequired

Conditions for validating user attributes. Determine item availability in the catalog based on whether user attributes match all specified conditions.

One of:
attribute_conditions[].​attributestring(user-attribute_conditions_properties_attribute)[ 1 .. 255 ] characters^[-_.\d\w]+$required

User attribute code.

attribute_conditions[].​typestring(user-attribute_conditions_properties_type-string)required

User attribute type.

Value"string"
attribute_conditions[].​operatorstring(user-attribute_conditions_properties_operator_string)required

Type of operation performed by condition. For string attribute type.

Enum ValueDescription
eq

Equals

ne

Not equals

attribute_conditions[].​valuestring(user-attribute_conditions_properties_value)<= 255 charactersrequired

Condition value which user attribute value will be compared to. Type depends on attribute type.

attribute_conditions[].​can_be_missingboolean(user-attribute_conditions_properties_can_be_missing)

Indicates that the condition is met even if attribute is missing from user attributes. Pass true to show the item to users who don't have this attribute. Users who have the attribute, but the value does not match that specified in the condition, will not see the item. false — users who have the attribute, but the value does not match that specified in the condition, or the attribute is missing, will not see the item.

itemsArray of objects[ 1 .. 100 ] itemsrequired
One of:

Items which are shown to a user if their attribute values meet conditions.

items[].​item_idnumberrequired

Item ID.

curl -i -X POST \
  -u <username>:<password> \
  https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/admin/user/attribute/rule \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Ork race armor rule",
    "is_enabled": true,
    "attribute_conditions": [
      {
        "attribute": "race",
        "operator": "eq",
        "value": "ork",
        "type": "string",
        "can_be_missing": false
      }
    ],
    "items": [
      {
        "item_id": 1
      }
    ],
    "is_satisfied_for_unauth": false
  }'

Responses

Rule was successfully created.

Bodyapplication/json
rule_idnumber

Rule ID.

Response
application/json
{ "rule_id": 1 }

Get all catalog rules for searching on client-sideServer-sideAdmin

Request

Gets a list of all catalog rules for searching on the client-side.

Attention

Returns only rule id, name and is_enabled
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
curl -i -X GET \
  -u <username>:<password> \
  https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/admin/user/attribute/rule/all

Responses

Rules were successfully received.

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