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

Import items via JSON fileServer-sideAdmin

Request

Imports items into the store from a JSON file via the specified URL. Refer to the documentation for more information about import from a JSON file.

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
connector_external_idstringrequired

A fixed value that specifies the type of operation for importing items.

Value"import_items"
file_urlstringrequired

The URL of a file with data in JSON format. The file should be hosted on a storage service with public access. You can download the file template in Publisher Account in the Store > Virtual Items > Catalog Management > Import Items (JSON) section.

Example: "https://my-bucket.s3.amazonaws.com/items.json"
modestring

Import actions:

Default "create_and_update"
Enum ValueDescription
create

Add new items.

create_and_update

Add new items and update existing ones.

sync

Add new, update existing, and disable missing items.

curl -i -X POST \
  -u <username>:<password> \
  https://xsolla.redocly.app/_mock/api/shop-builder/v1/projects/44056/import/from_external_file \
  -H 'Content-Type: application/json' \
  -d '{
    "connector_external_id": "import_items",
    "file_url": "https://my-bucket.s3.amazonaws.com/items.json",
    "mode": "create"
  }'

Responses

The file has been successfully imported and is being processed.

Bodyapplication/json
import_idstring

Import operation ID. If you encounter difficulties importing the JSON file, report this ID to your Customer Success Manager or send an email to csm@xsolla.com.

Example: "af9f3638a16e11ef880da2cd677d2d24"
Response
application/json
{ "import_id": "af9f3638a16e11ef880da2cd677d2d24" }

Get status of items importServer-sideAdmin

Request

Retrieves information about the progress of importing items into the project. This API call retrieves data on the last import carried out through the API or Publisher Account.

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/v1/admin/projects/44056/connectors/import_items/import/status

Responses

The import status has been successfully retrieved.

Bodyapplication/json
statusstring

Import status.

Enum ValueDescription
initialized

Import has been initiated.

process

Import is in progress.

done

Import was successfull.

error

Due to errors, the import was not completed or only partially completed.

Example: "error"
date_createdstring

The timestamp of the import creation operation in GMT+3 timezone.

Example: "2024-11-19T14:27:31+03:00"
date_updatedstring

The timestamp when the import was interrupted due to an error in GMT+3 timezone.

Example: "2024-11-19T15:27:31+03:00"
date_completedstring

The timestamp of completion of the import operation in GMT+3 timezone. If the import was interrupted due to an error and no items were imported, an empty string will be returned.

Example: "2024-11-19T15:27:31+03:00"
progressinteger

The progress of the import execution in percent.

Example: 100
errorstring

Description of the general import error.

error_codestring

The code of the general import error.

resultobject

An object with data on the import results and import errors for specific items SKU.

Example: {"errors_count":2,"total_entities_count":10,"errors_by_sku":[{"sku":"com.xsolla.sword_1","type":"virtual_items","error_code":4055,"error_message":"[0401-4055]: Item default price not set"},{"sku":"","type":null,"error_code":1817,"error_message":"[0410-1817]: SKU can't be empty"}]}
Response
application/json
{ "status": "error", "date_created": "2024-11-19T14:27:31+03:00", "date_updated": "2024-11-19T15:27:31+03:00", "date_completed": "2024-11-19T15:27:31+03:00", "progress": 100, "error": null, "error_code": null, "result": { "errors_count": 2, "total_entities_count": 10, "errors_by_sku": [] } }