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

Get redeemable promotion by codeServer-sideAdmin

Request

Gets the promotion by a promo code or coupon code.

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
codestring[ 1 .. 128 ] charactersrequired

Unique case-sensitive code. Contains letters and numbers.

Example: WINTER2021
curl -i -X GET \
  -u <username>:<password> \
  https://xsolla.redocly.app/_mock/api/shop-builder/v3/project/44056/admin/promotion/redeemable/code/WINTER2021

Responses

Promotion was successfully received.

Bodyapplication/json
external_idstring(Promotions_coupon-external_id)

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

Default "coupon_external_id"
Example: "coupon_external_id"
promotion_periodsArray of objects(promotion_periods)

Promotion validity periods. If multiple periods are specified, both date_from and date_until are required.

nameobject(Promotions_coupon_name)

Name of promotion. Should contain key/value pairs where key is a locale with "^[a-z]{2}-[A-Z]{2}$" format, value is string.

Default {"en-US":"Coupon title","de-DE":"Gutscheintitel"}
Example: {"en-US":"Coupon title","de-DE":"Gutscheintitel"}
bonusArray of objects or null(Promotions_coupon_bonus)
is_enabledboolean(Promotions_coupon-is_enabled)
Default true
redeem_total_limitinteger or null(Promotions_coupon-redeem_total_limit)

Limits total numbers of coupons.

Default 10
Example: 10
redeem_user_limitinteger or null(Promotions_coupon-redeem_user_limit)

Limits total numbers of coupons redeemed by single user.

Default 10
Example: 10
redeem_code_limitinteger or null(Promotions_redeem_code_limit)

Number of redemptions per code.

Default 10
Example: 10
total_limit_stateobject or null(Promotions_coupon_total_limit_state)

Limits for each unique coupon code.

discountobject or null

Only for promo codes.

Example: {"discount":{"percent":"10.99"}}
discounted_itemsArray of objects or null

List of items that are discounted by a promo code. Only for promo codes.

Response
application/json
{ "promotion_periods": [ {}, {} ], "bonus": [], "is_enabled": true, "external_id": "falls2023", "name": { "ru": "Скидка по промокоду на Epic Fall Hammer", "en": "Promo Code discount for Epic Fall Hammer" }, "redeem_total_limit": 2, "redeem_user_limit": 3, "redeem_code_limit": null, "total_limit_state": { "available": 1, "reserved": 1, "used": 0 }, "discount": { "percent": null }, "discounted_items": [ {} ] }

Request

Determines if the code is a promo code or coupon code and if the user can apply it.

Security
XsollaLoginUserJWT
Path
project_idintegerrequired

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

Example: 44056
codestring[ 1 .. 128 ] charactersrequired

Unique case-sensitive code. Contains letters and numbers.

Example: WINTER2021
curl -i -X GET \
  https://xsolla.redocly.app/_mock/api/shop-builder/v2/project/44056/promotion/code/WINTER2021/verify \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Information about the code.

Bodyapplication/json
typestring

Type of code: promocode/coupon.

codestring(Promotions_coupon_code)[ 1 .. 128 ] characters^[a-zA-Z0-9]+$

Unique case sensitive code. Contains letters and numbers.

Default "WINTER2021"
Example: "WINTER2021"
rewardsCoupon_rewards (object) or Promo_code_rewards_verify (object)
One of:
Response
application/json
{ "type": "coupon", "code": "WINTER2023", "rewards": { "bonus": [], "is_selectable": true } }

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