Passer au contenu

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

LiveOps is a toolkit for driving ongoing player engagement through promotions and personalized offers.

Use the API to manage the following features:

  • Promotions — create and manage coupons, promo codes, discounts, and bonus campaigns.
  • Personalization — specify the conditions for displaying the item catalog and applying promotions only for certain authorized users.
  • Promotion limits — set a limit on how many times a promotion can be used by a user and configure scheduled resets for these limits.
  • Reward chains & Value points — configure reward progressions tied to value point accumulation.
  • Daily chains — set up recurring daily rewards to motivate regular logins.
  • Offer chains — build sequential purchase offers with per-step pricing and free reward options.
  • Upsell — a sales method in which the user is offered to buy an item with additional value.

API calls

The API is divided into the following groups:

  • Admin — calls for creating, updating, activating, and deleting campaigns and chain configurations. Authenticated via basic access authentication with your merchant or project credentials.
  • Client — calls for retrieving available promotions, getting active chains, redeeming codes, and claiming rewards on behalf of authenticated end users. Authenticated via user JWT.

Authentication

API calls require authentication either on behalf of a user or on behalf of a project. The authentication scheme used is specified in the Security section in the description of each call.

Authentication using user's JWT

User's JWT authentication is used when a request is sent from a browser, mobile application, or game. By default, the XsollaLoginUserJWT scheme is applied. For details on how to create a token, see the Xsolla Login API documentation.

The token is passed in the Authorization header in the following format: Authorization: Bearer <user_JWT>, where <user_JWT> is the user token. The token identifies the user and provides access to personalized data. You can try this call using the following test token:

eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE5NjIyMzQwNDgsImlzcyI6Imh0dHBzOi8vbG9naW4ueHNvbGxhLmNvbSIsImlhdCI6MTU2MjE0NzY0OCwidXNlcm5hbWUiOiJ4c29sbGEiLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6IjA2SWF2ZHpDeEVHbm5aMTlpLUc5TmMxVWFfTWFZOXhTR3ZEVEY4OFE3RnMiLCJzdWIiOiJkMzQyZGFkMi05ZDU5LTExZTktYTM4NC00MjAxMGFhODAwM2YiLCJlbWFpbCI6InN1cHBvcnRAeHNvbGxhLmNvbSIsInR5cGUiOiJ4c29sbGFfbG9naW4iLCJ4c29sbGFfbG9naW5fcHJvamVjdF9pZCI6ImU2ZGZhYWM2LTc4YTgtMTFlOS05MjQ0LTQyMDEwYWE4MDAwNCIsInB1Ymxpc2hlcl9pZCI6MTU5MjR9.GCrW42OguZbLZTaoixCZgAeNLGH2xCeJHxl8u8Xn2aI

Alternatively, you can use a token for opening the payment UI.

Basic HTTP authentication

Basic HTTP authentication is used for server-to-server interactions, when an API call is sent directly from your server rather than from a user's browser or mobile application. HTTP Basic authentication with an API key is typically used.

Note

The API key is confidential and must not be stored or used in client applications.

With basic server-side authentication, all API requests must include the following header:

  • for basicAuthAuthorization: Basic <your_authorization_basic_key>, where your_authorization_basic_key is the project_id:api_key pair encoded in Base64
  • for basicMerchantAuthAuthorization: Basic <your_authorization_basic_key>, where your_authorization_basic_key is the merchant_id:api_key pair encoded in Base64

You can find the parameter values in Publisher Account:

  • merchant_id is displayed:
    • In Company settings > Company.
    • In the URL in the browser address bar on any Publisher Account page. The URL has the following format: https://publisher.xsolla.com/<merchant_id>.
  • project_id is displayed:
    • Next to the project name in Publisher Account.
    • In the URL in the browser address bar when working on a project in Publisher Account. The URL has the following format: https://publisher.xsolla.com/<merchant_id>/projects/<project_id>.
  • api_key is shown in Publisher Account only at the time of creation and must be stored securely on your side. You can create an API key in the following sections:
Notice

If a required API call doesn't include the project_id path parameter, use an API key that is valid across all company projects for authorization.

For more information about working with API keys, see the API references.

Authentication with guest access support

The AuthForCart authentication scheme is used for cart purchases and supports two modes:

  1. Authentication with a user's JWT. The token is passed in the Authorization header in the following format: Authorization: Bearer <user_JWT>, where <user_JWT> is the user token. The token identifies the user and provides access to personalized data. You can try this call using the following test token:
eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE5NjIyMzQwNDgsImlzcyI6Imh0dHBzOi8vbG9naW4ueHNvbGxhLmNvbSIsImlhdCI6MTU2MjE0NzY0OCwidXNlcm5hbWUiOiJ4c29sbGEiLCJ4c29sbGFfbG9naW5fYWNjZXNzX2tleSI6IjA2SWF2ZHpDeEVHbm5aMTlpLUc5TmMxVWFfTWFZOXhTR3ZEVEY4OFE3RnMiLCJzdWIiOiJkMzQyZGFkMi05ZDU5LTExZTktYTM4NC00MjAxMGFhODAwM2YiLCJlbWFpbCI6InN1cHBvcnRAeHNvbGxhLmNvbSIsInR5cGUiOiJ4c29sbGFfbG9naW4iLCJ4c29sbGFfbG9naW5fcHJvamVjdF9pZCI6ImU2ZGZhYWM2LTc4YTgtMTFlOS05MjQ0LTQyMDEwYWE4MDAwNCIsInB1Ymxpc2hlcl9pZCI6MTU5MjR9.GCrW42OguZbLZTaoixCZgAeNLGH2xCeJHxl8u8Xn2aI

Alternatively, you can use a token for opening the payment UI.

  1. Simplified mode without Authorization header. This mode is used only for unauthorized users and can be applied only for game key sales. Instead of a token, the request must include the following headers:
    • x-unauthorized-id with a request ID
    • x-user with the user's email address encoded in Base64

Core entity structure

Items of all types (virtual items, bundles, virtual currency, and keys) use a similar data structure. Understanding the basic structure simplifies working with the API and helps you navigate the documentation more easily.

Note

Some calls may include additional fields but they don't change the basic structure.

Identification

  • merchant_id — company ID in Publisher Account
  • project_id — project ID in Publisher Account
  • sku — item SKU, unique within the project

Store display

  • name — item name
  • description — item description
  • image_url — image URL
  • is_enabled — item availability
  • is_show_in_store — whether the item is displayed in the catalog

For more information about managing item availability in the catalog, see the documentation.

Organization

  • type — item type, for example, a virtual item (virtual_item) or bundle (bundle)
  • groups — groups the item belongs to
  • order — display order in the catalog

Sale conditions

  • prices — prices in real or virtual currency
  • limits — purchase limits
  • periods — availability periods
  • regions — regional restrictions

Example of core entity structure:

{
  "attributes": [],
  "bundle_type": "virtual_currency_package",
  "content": [
    {
      "description": {
        "en": "Main in-game currency"
      },
      "image_url": "https://.../image.png",
      "name": {
        "en": "Crystals",
        "de": "Kristalle"
      },
      "quantity": 500,
      "sku": "com.xsolla.crystal_2",
      "type": "virtual_currency"
    }
  ],
  "description": {
    "en": "Crystals x500"
  },
  "groups": [],
  "image_url": "https://.../image.png",
  "is_enabled": true,
  "is_free": false,
  "is_show_in_store": true,
  "limits": {
    "per_item": null,
    "per_user": null,
    "recurrent_schedule": null
  },
  "long_description": null,
  "media_list": [],
  "name": {
    "en": "Medium crystal pack"
  },
  "order": 1,
  "periods": [
    {
      "date_from": null,
      "date_until": "2020-08-11T20:00:00+03:00"
    }
  ],
  "prices": [
    {
      "amount": 20,
      "country_iso": "US",
      "currency": "USD",
      "is_default": true,
      "is_enabled": true
    }
  ],
  "regions": [],
  "sku": "com.xsolla.crystal_pack_2",
  "type": "bundle",
  "vc_prices": []
}

Basic purchase flow

The Xsolla API allows you to implement in-game store logic, including retrieving the item catalog, managing the cart, creating orders, and tracking their status. Depending on the integration scenario, API calls are divided into Admin and Catalog subsections, which use different authentication schemes.

The following example shows a basic flow for setting up and operating a store, from item creation to purchase.

Create items and groups (Admin)

Create an item catalog for your store, such as virtual items, bundles, or virtual currency.

Example API calls:

Set up promotions, chains, and limits (Admin)

Configure user acquisition and monetization tools, such as discounts, bonuses, daily rewards, or offer chains.

Example API calls:

Get item information (Client)

Configure item display in your application.

Notice

Do not use API calls from the Admin subsection to build a user catalog. These API calls have rate limits and aren't intended for user traffic.

Example API calls:

Note

By default, catalog API calls return items that are currently available in the store at the time of the request. To retrieve items that are not yet available or are no longer available, include the parameter "show_inactive_time_limited_items": 1 in the catalog request.

Sell items

You can sell items using the following methods:

  • Fast purchase — sell one SKU multiple times.
  • Cart purchase — the user adds items to the cart, removes items, and updates quantities within a single order.

If an item is purchased using virtual currency instead of real money, use the Create order with specified item purchased by virtual currency API call. The payment UI is not required, as the charge is processed when the API call is executed.

For free item purchase, use the Create order with specified free item API call or the Create order with free cart API call. The payment UI is not required — the order is immediately set to the done status.

Fast purchase

Use the client-side API call to create an order with a specified item. The call returns a token used to open the payment UI.

Note

Discount information is available to the user only in the payment UI. Promo codes are not supported.

Cart purchase

Cart setup and purchase can be performed on the client or on the server side.

Set up and purchase a cart on the client

Implement the logic of adding and removing items by yourself. Before calling the API for setting up a cart, you will not have information about which promotions will be applied to the purchase. This means that the total cost and details of the added bonus items will not be known.

Implement the following cart logic:

  1. After the player has filled a cart, use the Fill cart with items API call. The call returns the current information about the selected items (prices before and after discounts, bonus items).
  2. Update the cart contents based on user actions:
Note

To get the current status of the cart, use the Get current user's cart API call.
  1. Use the Create order with all items from current cart API call. The call returns the order ID and payment token. The newly created order is set to new status by default.

Set up and purchase a cart on the server

This setup option may take longer for setting the cart up, since each change to the cart must be accompanied by API calls.

Implement the following cart logic:

  1. After the player has filled a cart, use the Fill cart with items API call. The call returns current information about the selected items (prices before and after discounts, bonus items).
  2. Use the Create order with all items from current cart API call. The call returns the order ID and payment token. The newly created order is set to new status by default.

Open payment UI

Use the returned token to open the payment UI in a new window. Other ways to open the payment UI are described in the documentation.

ActionEndpoint
Open in production environment.https://secure.xsolla.com/paystation4/?token={token}
Open in sandbox mode.https://sandbox-secure.xsolla.com/paystation4/?token={token}
Note

Use sandbox mode during development and testing. Test purchases don't charge real accounts. You can use test bank cards.

After the first real payment is made, a strict sandbox payment policy takes effect. A payment in sandbox mode is available only to users specified in Publisher Account > Company settings > Users.

Buying virtual currency and items for real currency is possible only after signing a license agreement with Xsolla. To do this, in Publisher Account, go to Agreements & Taxes > Agreements, complete the agreement form, and wait for confirmation. It may take up to 3 business days to review the agreement.

To enable or disable sandbox mode, change the value of the sandbox parameter in the request for fast purchase and cart purchase. Sandbox mode is off by default.

Possible order statuses:

  • new — order created
  • paid — payment received
  • done — item delivered
  • canceled — order canceled
  • expired — payment expired

Track order status using one of the following methods:

Pagination

API calls that return large sets of records (for example, when building a catalog) return data in pages. Pagination is a mechanism that limits the number of items returned in a single API response and allows you to retrieve subsequent pages sequentially.

Use the following parameters to control the number of returned items:

  • limit — number of items per page
  • offset — index of the first item on the page (numbering starts from 0)
  • has_more — indicates whether another page is available
  • total_items_count — total number of items

Example request:

GET /items?limit=20&offset=40

Response example:

{
  "items": [...],
  "has_more": true,
  "total_items_count": 135
}

It is recommended to send subsequent requests until the response returns has_more = false.

Date and time format

Dates and time values are passed in the ISO 8601 format.

The following are supported:

  • UTC offset
  • null value when there is no time restriction for displaying an item
  • Unix timestamp (in seconds) used in some fields

Format: YYYY-MM-DDTHH:MM:SS±HH:MM

Example: 2026-03-16T10:00:00+03:00

Localization

Xsolla supports localization of user-facing fields such as item name and description. Localized values are passed as an object where the language code is used as the key. The full list of supported languages is available in the documentation.

Supported fields

Localization can be specified for the following parameters:

  • name
  • description
  • long_description

Locale format

The locale key can be specified in one of the following formats:

  • Two-letter language code: en, ru
  • Five-letter language code: en-US, ru-RU, de-DE

Examples

Example with a two-letter language code:

{
  "name": {
    "en": "Starter Pack",
    "ru": "Стартовый набор"
  }
}

Example with a five-letter language code:

{
  "description": {
    "en-US": "Premium bundle",
    "de-DE": "Premium-Paket"
  }
}

Error response format

If an error occurs, the API returns an HTTP status and a JSON response body. The full list of store-related errors is available in the documentation.

Response example:

{
  "errorCode": 1102,
  "errorMessage": "Validation error",
  "statusCode": 422,
  "transactionId": "c9e1a..."
}
  • errorCode — error code.
  • errorMessage — short error description.
  • statusCode — HTTP response status.
  • transactionId — request ID. Returned only in some cases.
  • errorMessageExtended — additional error details, such as request parameters. Returned only in some cases.

Extended response example:

{
  "errorCode": 7001,
  "errorMessage": "Chain not found",
  "errorMessageExtended": {
    "chain_id": "test_chain_id",
    "project_id": "test_project_id",
    "step_number": 2
  },
  "statusCode": 404
}

Common HTTP status codes

  • 400 — invalid request
  • 401 — authentication error
  • 403 — insufficient permissions
  • 404 — resource not found
  • 422 — validation error
  • 429 — rate limit exceeded

Recommendations

  • Handle the HTTP status and the response body together.
  • Use errorCode to process errors related to application logic.
  • Use transactionId to identify requests more quickly when analyzing errors.
Télécharger la description d'OpenAPI
Langues
Serveurs
https://store.xsolla.com/api/
Mock server
https://xsolla.redocly.app/_mock/fr/api/liveops/

Overview

Promotions are marketing tools designed to attract new users and increase sales. Using Xsolla API, you can configure the following promotions:

  • Discounts — reduced prices on selected items.
  • Bonuses — items granted to users along with their purchase.
  • Coupons — codes that allow users to receive one or more bonus items when redeeming.
  • Promo codes — codes that allow users to receive bonus items, a discount on a specific item, or a discount on the entire cart. Unlike coupons that are redeemed after the user enters them, promo codes are redeemed during a purchase (at checkout).
  • Unique offers — hidden items displayed in the catalog to users who have entered a unique offer code. If the code is not entered, the items are not displayed.

Example flow for configuring a discount promotion:

  1. Create items using the calls from the Admin subsection of the Virtual items and currency, Bundles, or Game keys groups.
  2. Create a promotion using the Create discount promotion for item call. In the items array, pass the necessary item SKUs.
  3. Set up promotion validity periods. To do this, call the Create discount promotion for item or Update item promotion methods, and pass the promotion_periods field as an array of objects where date_from defines the start, and date_until defines the end date of the validity period.
  4. Activate a promotion using the Update item promotion call. Pass the "is_enabled": true parameter.
  5. To get information about item prices, including discounted prices, call the client API methods for getting an item catalog from the Common > Catalog, Virtual Items and Currency > Catalog, and Bundles > Catalog subsections.

Promotion configuration example

Refer to our documentation for detailed information about configuring promotions:

Common API calls

You can call API methods from this subsection to manage different types of promotions.

Opérations

Coupons

Call API methods from this subsection to configure and manage coupon promotions.

Note

Refer to our documentation for detailed information about coupons.

Opérations

Codes promo

Call API methods from this subsection to configure and manage promo code promotions.

Note

Refer to our documentation for detailed information about promo codes.

Opérations

Offres uniques du catalogue

Call API methods from this subsection to configure and manage unique catalog offers.

Note

Refer to our documentation for detailed information about unique offers.

Opérations

Remises

Call API methods from this subsection to configure and manage discount promotions.

Note

Refer to our documentation for detailed information about discounts.

Opérations

Bonus

Call API methods from this subsection to configure and manage bonus promotions.

Note

Refer to our documentation for detailed information about bonuses.

Opérations

Catalogue personnalisé

Personalization allows you to specify the conditions for displaying the item catalog and applying promotions only for specific authorized users. Conditions are defined based on user attributes and allow you to offer items and promotions that are most relevant to particular users.

The following personalization types are available:

  • Xsolla-side personalization. Personalization rules and logic are configured and stored on the Xsolla side. You pass user attributes, and Xsolla uses them to generate a personalized catalog.
  • Partner-side personalization. You configure personalization rules and logic on your side and send a final catalog payload for a specific user to Xsolla.
Note

You can use only one personalization type. To change it, follow the instructions.

To configure personalization on the Xsolla side using the Xsolla API:

  1. Create items using the API calls from the Admin subsection of the Virtual items and currency, Bundles or Game keys groups.

  2. Set up user attributes using the Xsolla Login API and keep them synchronized by updating data in Xsolla whenever changes occur in your game.

  3. Configure personalization for items or promotions:

  4. Pass the user JWT with user attributes to the catalog retrieval API calls to receive a personalized catalog.

Sequence for configuring and applying Xsolla-side personalization for item catalog:

Personalization for item catalog

Sequence for configuring and applying Xsolla-side personalization for promotions:

Personalization for promotions

Opérations
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations

Créer une chaîne d'offresServer-sideAdmin

Requête

Crée une chaîne d'offres

Sécurité
basicAuth
Chemin
project_idintegerobligatoire

Project ID. You can find this parameter in your Publisher Account next to the project name and in the browser address bar when working with a project. The URL has the following format: https://publisher.xsolla.com/<merchant_id>/projects/<project_id>.

Exemple: 44056
Corpsapplication/json
attribute_conditionsArray of type = string (object) or type = number (object) or type = date (object)(chain_user-attribute_conditions_model-post)[ 1 .. 100 ] items

Conditions de validation des attributs utilisateur. Déterminez la disponibilité de la chaîne selon la correspondance des attributs utilisateur avec l'ensemble des conditions définies.

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

Code d'attribut utilisateur.

attribute_conditions[].​can_be_missingboolean(user-attribute_conditions_properties_can_be_missing)

Indique que la condition est remplie même si l'attribut est absent des attributs de l'utilisateur. Passez true pour afficher l'objet pour les utilisateurs ne possédant pas cet attribut. Les utilisateurs ayant l'attribut, mais dont la valeur ne correspond pas à celle définie dans la condition ne verront pas l'objet. Si vous passez false, les utilisateurs dont l'attribut est manquant ou dont la valeur ne correspond pas à celle spécifiée dans la condition ne verront pas l'objet.

attribute_conditions[].​operatorstring(user-attribute_conditions_properties_operator_string)obligatoire

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

Possible values:

  • eq — Equals
  • ne — Not equals
Enum"eq""ne"
attribute_conditions[].​typestring(user-attribute_conditions_properties_type-string)obligatoire

Type d'attribut utilisateur.

Valeur"string"
attribute_conditions[].​valuestring(user-attribute_conditions_properties_value)<= 255 charactersobligatoire

Valeur de la condition à laquelle la valeur de l'attribut utilisateur sera comparée. Le type dépend du type d'attribut.

date_endstring or null(date-time)(offer_chain_date_end)

Date de fin de la chaîne d’offres. Peut être null. Si date_end est null, la chaîne d'offres n'a pas de limite de temps.

date_startstring(date-time)(offer_chain_date_start)obligatoire

Date de début de la chaîne d'offres.

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

Conteneur objet contenant les localisations de la description de l'objet (item). Il accepte deux formats de codes de langue : les codes à deux lettres minuscules (comme en) et les codes régionaux à cinq caractères (comme en-US). Les deux formats sont valides en entrée, mais les réponses utilisent toujours le format à deux lettres. Si les deux variantes sont fournies pour une même langue (par exemple, en et en-US), seule la dernière est conservée. Consultez la documentation pour la liste complète des langues prises en charge.

Any of:

Codes de langue à deux lettres minuscules.

description.​arstring or null

Arabe

description.​bgstring or null

Bulgare

description.​cnstring or null

Chinois (simplifié)

description.​csstring or null

Tchèque

description.​destring or null

Allemand

description.​enstring or null

Anglais

description.​esstring or null

Espagnol (Espagne)

description.​frstring or null

Français

description.​hestring or null

Hébreu

description.​idstring or null

Indonésien

description.​itstring or null

Italien

description.​jastring or null

Japonais

description.​kmstring or null

Khmer

description.​kostring or null

Coréen

description.​lostring or null

Laotien

description.​mystring or null

Birman

description.​nestring or null

Népalais

description.​phstring or null

Philippin

description.​plstring or null

Polonais

description.​ptstring or null

Portugais

description.​rostring or null

Roumain

description.​rustring or null

Russe

description.​thstring or null

Thaï

description.​trstring or null

Turc

description.​twstring or null

Chinois (traditionnel)

description.​vistring or null

Vietnamien

is_always_visibleboolean(chain_is_always_visible)

Whether the chain is visible to all users. If true, the chain is always displayed, regardless of the user's authentication status or attributes.

To configure personalization, you need to pass false. The logic of the chain display will be the following:

  • If false is passed and the visibility conditions are specified in the attribute_conditions array, the chain is considered personalized and is displayed only to authorized users who meet the specified conditions.
  • If false is passed and the attribute_conditions array isn’t passed or is empty, the chain is displayed to unauthorized users, as well as in cases when no matching chain is found for the authorized user.
is_enabledboolean(is_enabled)obligatoire
name(two-letter (object or null)) or (five-letter (object or null))(name-localization-object)obligatoire

Conteneur objet contenant les localisations du nom de l'objet (item). Il accepte deux formats de codes de langue : les codes à deux lettres minuscules (comme en) et les codes régionaux à cinq caractères (comme en-US). Les deux formats sont valides en entrée, mais les réponses utilisent toujours le format à deux lettres. Si les deux variantes sont fournies pour une même langue (par exemple, en et en-US), seule la dernière est conservée. Consultez la documentation pour la liste complète des langues prises en charge.

Any of:

Codes de langue à deux lettres minuscules.

name.​arstring or null

Arabe

name.​bgstring or null

Bulgare

name.​cnstring or null

Chinois (simplifié)

name.​csstring or null

Tchèque

name.​destring or null

Allemand

name.​enstring or null

Anglais

name.​esstring or null

Espagnol (Espagne)

name.​frstring or null

Français

name.​hestring or null

Hébreu

name.​idstring or null

Indonésien

name.​itstring or null

Italien

name.​jastring or null

Japonais

name.​kmstring or null

Khmer

name.​kostring or null

Coréen

name.​lostring or null

Laotien

name.​mystring or null

Birman

name.​nestring or null

Népalais

name.​phstring or null

Philippin

name.​plstring or null

Polonais

name.​ptstring or null

Portugais

name.​rostring or null

Roumain

name.​rustring or null

Russe

name.​thstring or null

Thaï

name.​trstring or null

Turc

name.​twstring or null

Chinois (traditionnel)

name.​vistring or null

Vietnamien

orderinteger(order)

Définit l'ordre d'empilement.

recurrent_schedule(object or null)(offer_chain_recurrent_schedule_create_update)
One of:

Période de réinitialisation de la chaîne d'offres.

object or null
stepsArray of objects(create-offer-chain-step-model)obligatoire
steps[].​is_freeboolean(offer_chain_is_free)obligatoire

Indique si l'étape de la chaîne d'offres est gratuite :

steps[].​itemsArray of objects(modify-offer-chain-item-model)non-emptyobligatoire
steps[].​items[].​orderinteger or null>= 0

Ordre des récompenses pour l'étape de la chaîne d'offres.

steps[].​items[].​quantityinteger>= 1obligatoire

Quantité d'objets de récompense pour cette étape de la chaîne.

steps[].​items[].​skustring(sku)[ 1 .. 255 ] characters^[a-zA-Z0-9_\-–.]*$obligatoire

ID unique de l'objet. L'UGS ne peut comprendre que des caractères alphanumériques latins minuscules et majuscules, des points, des tirets et des traits bas.

steps[].​step_numberinteger(offer_chain_step_number)>= 1obligatoire

Numéro de l'étape.

curl -i -X POST \
  -u <username>:<password> \
  https://store.xsolla.com/api/v2/project/44056/admin/offer_chain \
  -H 'Content-Type: application/json' \
  -d '{
    "date_end": null,
    "date_start": "2023-04-15T18:16:00+05:00",
    "description": {
      "de": "Eine kurze Beschreibung einer regulären Angebotskette",
      "en": "A short description of a regular offer chain",
      "fr": "Une brève description d'\''une chaîne d'\''offres régulière",
      "it": "Una breve descrizione di una catena di offerte regolare",
      "ru": "Краткое описание обычной цепочки предложений"
    },
    "is_always_visible": true,
    "is_enabled": true,
    "name": {
      "de": "Neue Angebotskette",
      "en": "New offer chain",
      "fr": "Nouvelle chaîne d'\''offres",
      "it": "Nuova catena di offerte",
      "ru": "Новая цепочка предложений"
    },
    "order": 4,
    "recurrent_schedule": null,
    "steps": [
      {
        "is_free": false,
        "items": [
          {
            "quantity": 2,
            "sku": "chain_step_1_paid_bundle_sku"
          }
        ],
        "step_number": 1
      },
      {
        "is_free": true,
        "items": [
          {
            "quantity": 1,
            "sku": "chain_step_2_free_virtual_good_sku"
          }
        ],
        "step_number": 2
      },
      {
        "is_free": false,
        "items": [
          {
            "quantity": 5,
            "sku": "chain_step_3_paid_virtual_currency_package_sku"
          }
        ],
        "step_number": 3
      },
      {
        "is_free": true,
        "items": [
          {
            "quantity": 1,
            "sku": "chain_step_4_free_bundle_sku"
          }
        ],
        "step_number": 4
      }
    ]
  }'

Réponses

Chaîne d'offres créée avec succès.

Corpsapplication/json
offer_chain_idinteger
Exemple: 10
Réponse
application/json
{ "offer_chain_id": 10 }

Supprimer une chaîne d'offresServer-sideAdmin

Requête

Supprime une chaîne d'offres spécifique.

Après la suppression :

  • Toutes les récompenses déjà reçues par les utilisateurs sont conservées.
  • Les étapes non achevées deviennent indisponibles et les récompenses correspondantes ne peuvent plus être obtenues.

Contrairement à la désactivation de la chaîne d'offres via l'appel Activer/désactiver une chaîne d'offres, la suppression est irréversible et la progression de l'utilisateur n'est pas préservée.

Sécurité
basicAuth
Chemin
project_idintegerobligatoire

Project ID. You can find this parameter in your Publisher Account next to the project name and in the browser address bar when working with a project. The URL has the following format: https://publisher.xsolla.com/<merchant_id>/projects/<project_id>.

Exemple: 44056
offer_chain_idintegerobligatoire

ID de la chaîne d'offres.

Exemple: 101
curl -i -X DELETE \
  -u <username>:<password> \
  https://store.xsolla.com/api/v2/project/44056/admin/offer_chain/id/101

Réponses

Chaîne d'offres supprimée avec succès.

Corps
Réponse
Aucun contenu

Requête

Récupère une chaîne d'offres spécifique à des fin d'administration.

Sécurité
basicAuth
Chemin
project_idintegerobligatoire

Project ID. You can find this parameter in your Publisher Account next to the project name and in the browser address bar when working with a project. The URL has the following format: https://publisher.xsolla.com/<merchant_id>/projects/<project_id>.

Exemple: 44056
offer_chain_idintegerobligatoire

ID de la chaîne d'offres.

Exemple: 101
curl -i -X GET \
  -u <username>:<password> \
  https://store.xsolla.com/api/v2/project/44056/admin/offer_chain/id/101

Réponses

Données de la chaîne d'offres récupérées avec succès.

Corpsapplication/json
attribute_conditionsArray of type = string (object) or type = number (object) or type = date (object)(chain_user-attribute_conditions_model-get)[ 1 .. 100 ] items

Conditions de validation des attributs utilisateur. Déterminez la disponibilité de la chaîne selon la correspondance des attributs utilisateur avec l'ensemble des conditions définies.

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

Code d'attribut utilisateur.

attribute_conditions[].​can_be_missingboolean(user-attribute_conditions_properties_can_be_missing)

Indique que la condition est remplie même si l'attribut est absent des attributs de l'utilisateur. Passez true pour afficher l'objet pour les utilisateurs ne possédant pas cet attribut. Les utilisateurs ayant l'attribut, mais dont la valeur ne correspond pas à celle définie dans la condition ne verront pas l'objet. Si vous passez false, les utilisateurs dont l'attribut est manquant ou dont la valeur ne correspond pas à celle spécifiée dans la condition ne verront pas l'objet.

attribute_conditions[].​operatorstring(user-attribute_conditions_properties_operator_string)

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

Possible values:

  • eq — Equals
  • ne — Not equals
Enum"eq""ne"
attribute_conditions[].​typestring(user-attribute_conditions_properties_type-string)

Type d'attribut utilisateur.

Valeur"string"
attribute_conditions[].​valuestring(user-attribute_conditions_properties_value)<= 255 characters

Valeur de la condition à laquelle la valeur de l'attribut utilisateur sera comparée. Le type dépend du type d'attribut.

date_endstring or null(date-time)(offer_chain_date_end)

Date de fin de la chaîne d’offres. Peut être null. Si date_end est null, la chaîne d'offres n'a pas de limite de temps.

date_startstring(date-time)(offer_chain_date_start)

Date de début de la chaîne d'offres.

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

Conteneur objet contenant les localisations de la description de l'objet (item). Il accepte deux formats de codes de langue : les codes à deux lettres minuscules (comme en) et les codes régionaux à cinq caractères (comme en-US). Les deux formats sont valides en entrée, mais les réponses utilisent toujours le format à deux lettres. Si les deux variantes sont fournies pour une même langue (par exemple, en et en-US), seule la dernière est conservée. Consultez la documentation pour la liste complète des langues prises en charge.

Any of:

Codes de langue à deux lettres minuscules.

description.​arstring or null

Arabe

description.​bgstring or null

Bulgare

description.​cnstring or null

Chinois (simplifié)

description.​csstring or null

Tchèque

description.​destring or null

Allemand

description.​enstring or null

Anglais

description.​esstring or null

Espagnol (Espagne)

description.​frstring or null

Français

description.​hestring or null

Hébreu

description.​idstring or null

Indonésien

description.​itstring or null

Italien

description.​jastring or null

Japonais

description.​kmstring or null

Khmer

description.​kostring or null

Coréen

description.​lostring or null

Laotien

description.​mystring or null

Birman

description.​nestring or null

Népalais

description.​phstring or null

Philippin

description.​plstring or null

Polonais

description.​ptstring or null

Portugais

description.​rostring or null

Roumain

description.​rustring or null

Russe

description.​thstring or null

Thaï

description.​trstring or null

Turc

description.​twstring or null

Chinois (traditionnel)

description.​vistring or null

Vietnamien

idinteger(offer_chain_id)

ID unique de la chaîne d'offres.

is_always_visibleboolean(chain_is_always_visible)

Whether the chain is visible to all users. If true, the chain is always displayed, regardless of the user's authentication status or attributes.

To configure personalization, you need to pass false. The logic of the chain display will be the following:

  • If false is passed and the visibility conditions are specified in the attribute_conditions array, the chain is considered personalized and is displayed only to authorized users who meet the specified conditions.
  • If false is passed and the attribute_conditions array isn’t passed or is empty, the chain is displayed to unauthorized users, as well as in cases when no matching chain is found for the authorized user.
is_enabledboolean(is_enabled)
name(two-letter (object or null)) or (five-letter (object or null))(name-localization-object)

Conteneur objet contenant les localisations du nom de l'objet (item). Il accepte deux formats de codes de langue : les codes à deux lettres minuscules (comme en) et les codes régionaux à cinq caractères (comme en-US). Les deux formats sont valides en entrée, mais les réponses utilisent toujours le format à deux lettres. Si les deux variantes sont fournies pour une même langue (par exemple, en et en-US), seule la dernière est conservée. Consultez la documentation pour la liste complète des langues prises en charge.

Any of:

Codes de langue à deux lettres minuscules.

name.​arstring or null

Arabe

name.​bgstring or null

Bulgare

name.​cnstring or null

Chinois (simplifié)

name.​csstring or null

Tchèque

name.​destring or null

Allemand

name.​enstring or null

Anglais

name.​esstring or null

Espagnol (Espagne)

name.​frstring or null

Français

name.​hestring or null

Hébreu

name.​idstring or null

Indonésien

name.​itstring or null

Italien

name.​jastring or null

Japonais

name.​kmstring or null

Khmer

name.​kostring or null

Coréen

name.​lostring or null

Laotien

name.​mystring or null

Birman

name.​nestring or null

Népalais

name.​phstring or null

Philippin

name.​plstring or null

Polonais

name.​ptstring or null

Portugais

name.​rostring or null

Roumain

name.​rustring or null

Russe

name.​thstring or null

Thaï

name.​trstring or null

Turc

name.​twstring or null

Chinois (traditionnel)

name.​vistring or null

Vietnamien

orderinteger(order)

Définit l'ordre d'empilement.

recurrent_schedule(object or null)(offer_chain_recurrent_schedule)
One of:

Période de réinitialisation récurrente de la chaîne d'offres.

object or null
stepsArray of objects(admin-offer-chain-step-model)
steps[].​is_freeboolean(offer_chain_is_free)

Indique si l'étape de la chaîne d'offres est gratuite :

steps[].​itemsArray of objects(admin-offer-chain-item-model)
steps[].​items[].​description(two-letter (object or null)) or (five-letter (object or null))(description-localization-object)

Conteneur objet contenant les localisations de la description de l'objet (item). Il accepte deux formats de codes de langue : les codes à deux lettres minuscules (comme en) et les codes régionaux à cinq caractères (comme en-US). Les deux formats sont valides en entrée, mais les réponses utilisent toujours le format à deux lettres. Si les deux variantes sont fournies pour une même langue (par exemple, en et en-US), seule la dernière est conservée. Consultez la documentation pour la liste complète des langues prises en charge.

Any of:

Codes de langue à deux lettres minuscules.

steps[].​items[].​description.​arstring or null

Arabe

steps[].​items[].​description.​bgstring or null

Bulgare

steps[].​items[].​description.​cnstring or null

Chinois (simplifié)

steps[].​items[].​description.​csstring or null

Tchèque

steps[].​items[].​description.​destring or null

Allemand

steps[].​items[].​description.​enstring or null

Anglais

steps[].​items[].​description.​esstring or null

Espagnol (Espagne)

steps[].​items[].​description.​frstring or null

Français

steps[].​items[].​description.​hestring or null

Hébreu

steps[].​items[].​description.​idstring or null

Indonésien

steps[].​items[].​description.​itstring or null

Italien

steps[].​items[].​description.​jastring or null

Japonais

steps[].​items[].​description.​kmstring or null

Khmer

steps[].​items[].​description.​kostring or null

Coréen

steps[].​items[].​description.​lostring or null

Laotien

steps[].​items[].​description.​mystring or null

Birman

steps[].​items[].​description.​nestring or null

Népalais

steps[].​items[].​description.​phstring or null

Philippin

steps[].​items[].​description.​plstring or null

Polonais

steps[].​items[].​description.​ptstring or null

Portugais

steps[].​items[].​description.​rostring or null

Roumain

steps[].​items[].​description.​rustring or null

Russe

steps[].​items[].​description.​thstring or null

Thaï

steps[].​items[].​description.​trstring or null

Turc

steps[].​items[].​description.​twstring or null

Chinois (traditionnel)

steps[].​items[].​description.​vistring or null

Vietnamien

steps[].​items[].​image_urlstring or null(image_url)

URL de l'image.

steps[].​items[].​is_freeboolean(value-is_free)

Détermine la gratuité de l'objet.

steps[].​items[].​item_idinteger(item_id)

Internal ID unique de l'objet.

steps[].​items[].​name(two-letter (object or null)) or (five-letter (object or null))(name-localization-object)

Conteneur objet contenant les localisations du nom de l'objet (item). Il accepte deux formats de codes de langue : les codes à deux lettres minuscules (comme en) et les codes régionaux à cinq caractères (comme en-US). Les deux formats sont valides en entrée, mais les réponses utilisent toujours le format à deux lettres. Si les deux variantes sont fournies pour une même langue (par exemple, en et en-US), seule la dernière est conservée. Consultez la documentation pour la liste complète des langues prises en charge.

Any of:

Codes de langue à deux lettres minuscules.

steps[].​items[].​name.​arstring or null

Arabe

steps[].​items[].​name.​bgstring or null

Bulgare

steps[].​items[].​name.​cnstring or null

Chinois (simplifié)

steps[].​items[].​name.​csstring or null

Tchèque

steps[].​items[].​name.​destring or null

Allemand

steps[].​items[].​name.​enstring or null

Anglais

steps[].​items[].​name.​esstring or null

Espagnol (Espagne)

steps[].​items[].​name.​frstring or null

Français

steps[].​items[].​name.​hestring or null

Hébreu

steps[].​items[].​name.​idstring or null

Indonésien

steps[].​items[].​name.​itstring or null

Italien

steps[].​items[].​name.​jastring or null

Japonais

steps[].​items[].​name.​kmstring or null

Khmer

steps[].​items[].​name.​kostring or null

Coréen

steps[].​items[].​name.​lostring or null

Laotien

steps[].​items[].​name.​mystring or null

Birman

steps[].​items[].​name.​nestring or null

Népalais

steps[].​items[].​name.​phstring or null

Philippin

steps[].​items[].​name.​plstring or null

Polonais

steps[].​items[].​name.​ptstring or null

Portugais

steps[].​items[].​name.​rostring or null

Roumain

steps[].​items[].​name.​rustring or null

Russe

steps[].​items[].​name.​thstring or null

Thaï

steps[].​items[].​name.​trstring or null

Turc

steps[].​items[].​name.​twstring or null

Chinois (traditionnel)

steps[].​items[].​name.​vistring or null

Vietnamien

steps[].​items[].​orderinteger(order)

Définit l'ordre d'empilement.

steps[].​items[].​quantityinteger>= 1

Nombre d'objets.

Exemple: 1
steps[].​items[].​skustring(sku)[ 1 .. 255 ] characters^[a-zA-Z0-9_\-–.]*$

ID unique de l'objet. L'UGS ne peut comprendre que des caractères alphanumériques latins minuscules et majuscules, des points, des tirets et des traits bas.

steps[].​items[].​typestring(item_type)

Type d'objet : virtual_good/virtual_currency/bundle/unit.

steps[].​step_idinteger or null(offer_chain_step_id)>= 1

ID unique de l'étape de la chaîne.

steps[].​step_numberinteger(offer_chain_step_number)>= 1

Numéro de l'étape.

steps[].​step_priceobject or null(offer_chain_step_price)
steps[].​step_price.​amountnumber(offer_chain_step_price_amount)obligatoire

Prix de l'étape en devises réelles.

steps[].​step_price.​currencystring(offer_chain_step_price_currency)obligatoire

Devise du prix de l'objet. Code à trois lettres selon ISO 4217.

Réponse
application/json
{ "attribute_conditions": [ {}, {}, {} ], "date_end": "2025-04-25T18:16:00+05:00", "date_start": "2023-04-15T18:16:00+05:00", "description": { "de": "Personalisierte Angebotskette mit Benutzerattributbedingungen - für Elfen der Stufe 10 und höher, die Stufe 10 spätestens am 2026-01-01 00:00:00 erreicht haben, einschließlich", "en": "Personalized offer chain with user attribute conditions - for level 10 and above elves who reached level 10 no later than 2026-01-01 00:00:00, inclusive", "fr": "Chaîne d'offres personnalisée avec des conditions d'attribut utilisateur - pour les elfes de niveau 10 et plus qui ont atteint le niveau 10 au plus tard le 2026-01-01 00:00:00, inclus", "it": "Catena di offerte personalizzata con condizioni di attributo utente - per elfi di livello 10 e superiore che hanno raggiunto il livello 10 non più tardi del 2026-01-01 00:00:00, inclusi", "ru": "Персонализированная цепочка предложений - для эльфов 10 уровня и выше, достигших 10 уровня не позднее 2026-01-01 00:00:00 включительно" }, "id": 3, "is_always_visible": false, "is_enabled": true, "name": { "de": "Angebotskette", "en": "Offer chain", "fr": "Chaîne d'offres", "it": "Catena di offerte", "ru": "Цепочка" }, "order": 1, "recurrent_schedule": null, "steps": [ {}, {}, {} ] }
Opérations
Opérations
Opérations