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

The Catalog API allows you to configure a catalog of in-game items on the Xsolla side and display the catalog to users in your store.

The API allows you to manage the following catalog entities:

  • Virtual items — in-game items such as weapons, skins, boosters.
  • Virtual currency — virtual money used to purchase virtual goods.
  • Virtual currency packages — predefined bundles of virtual currency.
  • Bundles — combined packages of virtual items, currency, or game keys sold as a single SKU.
  • Game keys — keys for games and DLCs distributed via platforms like Steam or other DRM providers.
  • Groups — logical groupings for organizing and sorting items within the catalog.

API calls

The API is divided into the following groups:

  • Admin — calls for creating, updating, deleting, and configuring catalog items and groups. Authenticated via basic access authentication with your merchant or project credentials. Not intended for storefront use.
  • Catalog — calls for retrieving items and building custom storefronts for end users. Designed to handle high-load scenarios. Support optional user JWT authorization to return personalized data such as user-specific limits and active promotions.

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/catalog/
Opérations

Mettre à jour une monnaie virtuelleServer-sideAdmin

Requête

Met à jour une monnaie virtuelle.

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
virtual_currency_skustringobligatoire

UGS de la monnaie virtuelle.

Exemple: crystal
Corpsapplication/json
attributesArray of objects(Virtual-Items-Currency_admin-post-put-attributes)<= 20 items

Liste des attributs.

Attention. La création de plus de 20 attributs pour un objet n'est pas autorisée. Toute tentative de dépassement entraîne une erreur.
attributes[].​external_idstring(admin-attribute-external_id)[ 1 .. 255 ] characters^[a-zA-Z0-9-_]+$obligatoire

ID unique de l'attribut. Le external_id ne peut comprendre que des caractères alphanumériques latins minuscules et majuscules, des tirets et des traits bas.

attributes[].​nameobject(admin-attribute-name)

Objet contenant des versions localisées du nom de l'attribut. Les clés sont spécifiées selon la norme ISO 3166-1.

attributes[].​name.​property name*stringpropriété supplémentaire
attributes[].​valuesArray of objects(attribute-value)obligatoire
Attention. La création de plus de 6 valeurs pour un attribut n'est pas autorisée. Toute tentative de dépassement entraînera une erreur.
Exemple: [{"external_id":"strategy","value":{"de":"Strategie","en":"Strategy"}},{"external_id":"action","value":{"de":"Aktion","en":"Action"}}]
attributes[].​values[].​external_idstring(value-external_id)[ 1 .. 255 ] characters^[-_.\d\w]+$obligatoire

ID unique de la valeur d'un attribut. Le external_id ne peut comprendre que des caractères alphanumériques latins minuscules, des tirets et des tirets bas.

Exemple: "value_external_id"
attributes[].​values[].​valueobject(value-name)obligatoire

Objet contenant des versions localisées du nom de la valeur. Les clés sont spécifiées selon la norme ISO 3166-1.

attributes[].​values[].​value.​property name*stringpropriété supplémentaire
custom_attributesobject(json)(item-custom-attributes)<= 500 characters

Un JSON contenant les attributs de l'objet et leurs valeurs. Les attributs permettent d'ajouter des informations supplémentaires aux objets, telles que le niveau requis du joueur pour utiliser l'objet. Les attributs enrichissent la logique interne de votre jeu et sont accessibles via des méthodes GET et des webhooks spécifiques.

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

groupsArray of strings(Virtual-Items-Currency_admin-groups-create)

List of group external IDs the item belongs to.

Example: ["horror", "action"]

image_urlstring(Virtual-Items-Currency_admin-image_url)

URL de l'image.

is_enabledboolean(Virtual-Items-Currency_is_enabled)

Whether the item is available. If false, the item can't be purchased in the store or obtained as part of a bundle or within a marketing campaign. Refer to our documentation for detailed information about item availability.

is_freeboolean(value-is_free)

Détermine la gratuité de l'objet.

is_paid_randomized_rewardboolean(value-is_paid_randomized_reward)

Si l’objet est une récompense payante aléatoire (par exemple, une boîte à butin).

is_show_in_storeboolean(Virtual-Items-Currency_is_show_in_store)

Whether the item is displayed in the catalog. If false and is_enabled: true, the item is not visible in the catalog but can be obtained as part of a bundle or within marketing campaigns. Refer to our documentation for detailed information about item availability.

limitsobject(Virtual-Currency-item-limit)

Limites d'objets.

limits.​per_iteminteger or null(limit_per_item)

Limites globales d'objets.

limits.​per_userlimit_per_user (null) or limit_per_user (integer) or limit_per_user (object)(limit_per_user)

Limites d'objets pour un utilisateur spécifique.

Any of:

Limites d'objets pour un utilisateur spécifique.

null(limit_per_user)
limits.​recurrent_scheduleobject or null(virtual_currency_recurrent_schedule)

Délai d'actualisation des limites.

limits.​recurrent_schedule.​per_userinterval_type = daily (object) or interval_type = weekly (object) or interval_type = monthly (object) or interval_type = horaire (object)

Réinitialisation des limites d'achat effectuée selon l'intervalle de temps spécifié, en heures.

One of:

Réinitialisation des limites d'achat effectuée selon l'intervalle de temps spécifié, en heures.

limits.​recurrent_schedule.​per_user.​interval_typestringobligatoire

Délai d'actualisation récurrent.

Valeur"daily"
limits.​recurrent_schedule.​per_user.​timestring((0[0-9]|1[0-9]|2[0-3]):00:00)(\+|-)(0[0-9]|1...obligatoire

Heure d'actualisation des limites dans le fuseau horaire souhaité (arrondie en heures).

Exemple: "02:00:00+03:00"
long_description(two-letter (object or null)) or (five-letter (object or null))(long-description-localization-object)

Conteneur objet contenant les localisations de la description complète 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.

long_description.​arstring or null

Arabe

long_description.​bgstring or null

Bulgare

long_description.​cnstring or null

Chinois (simplifié)

long_description.​csstring or null

Tchèque

long_description.​destring or null

Allemand

long_description.​enstring or null

Anglais

long_description.​esstring or null

Espagnol (Espagne)

long_description.​frstring or null

Français

long_description.​hestring or null

Hébreu

long_description.​idstring or null

Indonésien

long_description.​itstring or null

Italien

long_description.​jastring or null

Japonais

long_description.​kmstring or null

Khmer

long_description.​kostring or null

Coréen

long_description.​lostring or null

Laotien

long_description.​mystring or null

Birman

long_description.​nestring or null

Népalais

long_description.​phstring or null

Philippin

long_description.​plstring or null

Polonais

long_description.​ptstring or null

Portugais

long_description.​rostring or null

Roumain

long_description.​rustring or null

Russe

long_description.​thstring or null

Thaï

long_description.​trstring or null

Turc

long_description.​twstring or null

Chinois (traditionnel)

long_description.​vistring or null

Vietnamien

media_listArray of objects(Virtual-Items-Currency_admin-media_list)

Ressources supplémentaires de l'objet, telles que des captures d'écran, des vidéos de gameplay, etc.

media_list[].​typestring

Type de média : image/video.

Enum"image""video"
Exemple: "image"
media_list[].​urlstring

Fichier de ressources.

Exemple: "https://cdn3.xsolla.com/img/misc/images/71ab1e12126f2103e1868076f0acb21a.jpg"
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(Virtual-Items-Currency_order)

Item display order in the catalog. The higher the value, the lower the item appears in the list. If the values are the same, items are sorted by creation date, with newer items displayed higher.

periodsArray of objects or null(item-periods)

Période de vente d'objets.

periods[].​date_fromstring(date-time)

Date de mise en vente de l'objet spécifié.

Exemple: "2020-08-11T10:00:00+03:00"
periods[].​date_untilstring or null(date-time)

Date de retrait de la vente de l'objet spécifié. Peut prendre la valeur null.

Exemple: "2020-08-11T20:00:00+03:00"
pricesArray of objects(Virtual-Items-Currency_admin-prices)
Exemple: [{"amount":10.5,"country_iso":"US","currency":"USD","is_default":true,"is_enabled":true}]
prices[].​amountnumber> 0obligatoire

Item price in real currency.

Exemple: 10.5
prices[].​country_isostring or null

Pays où ce prix est disponible. Code à deux lettres selon la norme ISO 3166-1 alpha 2.

Exemple: "US"
prices[].​currencystringobligatoire

Devise du prix de l'article. Code à trois lettres selon ISO 4217. Consultez la documentation pour obtenir des informations détaillées sur les devises prises en charge par Xsolla.

Exemple: "USD"
prices[].​is_defaultboolean

Whether it is the default price in real currency. Refer to our documentation for detailed information on price settings.

Par défaut false
Exemple: true
prices[].​is_enabledboolean

Whether this price is used for displaying in the catalog and for purchasing the item. If false, the price is not used and another price is applied. Refer to our documentation for detailed information on price settings.

Par défaut true
Exemple: true
regionsArray of objects(Virtual-Items-Currency_admin-regions)

Array of regions where the item is available. If the array is empty or not passed, the item is available in all regions.

regions[].​idinteger>= 1

Region ID within the project.

Refer to the regional sale restriction documentation and region management API calls for detailed information.

Exemple: 1
skustring(Virtual-Items-Currency_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.

vc_pricesArray of objects or null(Virtual-Items-Currency_admin-create-vc_prices)

Array of virtual currency prices.

Exemple: [{"amount":10,"is_default":true,"is_enabled":true,"sku":"com.xsolla.gold_1"}]
vc_prices[].​amountintegerobligatoire

Prix de l'objet en monnaie virtuelle.

Exemple: 10
vc_prices[].​is_defaultbooleanobligatoire

Whether it is the default price in virtual currency.

Par défaut false
Exemple: true
vc_prices[].​is_enabledbooleanobligatoire

Whether this price is used for displaying in the catalog and for purchasing the item. If false, the price is not used.

Par défaut true
Exemple: true
vc_prices[].​skustring(Virtual-Items-Currency_schemas-sku)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.

Exemple: "com.xsolla.gold_1"
curl -i -X PUT \
  -u <username>:<password> \
  https://store.xsolla.com/api/v2/project/44056/admin/items/virtual_currency/sku/crystal \
  -H 'Content-Type: application/json' \
  -d '{
    "attributes": [
      {
        "external_id": "material",
        "name": {
          "en-US": "Material"
        },
        "values": [
          {
            "external_id": "gold",
            "value": {
              "en-US": "Gold"
            }
          }
        ]
      }
    ],
    "custom_attributes": {
      "attr": "value",
      "purchased": 0
    },
    "description": {
      "de-DE": "Die Hauptwährung deines Königreichs",
      "en-US": "The main currency of your kingdom"
    },
    "groups": [
      "gold"
    ],
    "is_enabled": true,
    "is_free": false,
    "is_paid_randomized_reward": false,
    "limits": {
      "per_item": 10000,
      "per_user": 5
    },
    "name": {
      "de-DE": "Goldmünze",
      "en-US": "Gold coin"
    },
    "order": 1,
    "periods": [
      {
        "date_from": "2020-08-11T10:00:00+03:00",
        "date_until": "2020-08-11T20:00:00+03:00"
      }
    ],
    "prices": [
      {
        "amount": 100,
        "currency": "USD",
        "is_default": true,
        "is_enabled": true
      }
    ],
    "sku": "com.xsolla.coin_1"
  }'

Réponses

La monnaie virtuelle a été mise à jour avec succès.

Corps
Réponse
Aucun contenu

Lire la liste des objets virtuelsServer-sideAdmin

Requête

Récupère la liste des objets virtuels au sein d'un projet à des fins d'administration.

Note

N'utilisez pas cet endpoint pour créer un catalogue de magasin.
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
Requête
limitinteger>= 1

Nombre maximal d'éléments sur une page.

Exemple: limit=50
offsetinteger>= 0

Numéro de l'élément à partir duquel la liste est générée (le décompte commence à 0).

Exemple: offset=0
curl -i -X GET \
  -u <username>:<password> \
  'https://store.xsolla.com/api/v2/project/44056/admin/items/virtual_items?limit=50&offset=0'

Réponses

La liste d'objets virtuels a été reçue avec succès.

Corpsapplication/json
itemsArray of objects(Virtual-Items-Currency_admin-virtual-item)
items[].​attributesArray of objects(Virtual-Items-Currency_admin-attributes)

Liste des attributs.

Exemple: [{"external_id":"attribute_external_id","name":{"de":"Attributname","en":"Attribute name"},"values":[{"external_id":"value_1","name":{"de":"wert 1","en":"value 1"}},{"external_id":"value_2","name":{"de":"wert 2","en":"value 2"}}]}]
items[].​attributes[].​external_idstring(admin-attribute-external_id)[ 1 .. 255 ] characters^[a-zA-Z0-9-_]+$obligatoire

ID unique de l'attribut. Le external_id ne peut comprendre que des caractères alphanumériques latins minuscules et majuscules, des tirets et des traits bas.

Exemple: "attribute_external_id"
items[].​attributes[].​nameobject(admin-attribute-name)

Objet contenant des versions localisées du nom de l'attribut. Les clés sont spécifiées selon la norme ISO 3166-1.

Exemple: {"de":"Attributname","en":"Attribute name"}
items[].​attributes[].​name.​property name*stringpropriété supplémentaire
items[].​attributes[].​valuesArray of objects(attribute-value)obligatoire
Exemple: [{"external_id":"value_1","name":{"de":"wert 1","en":"value 1"}},{"external_id":"value_2","name":{"de":"wert 2","en":"value 2"}}]
items[].​attributes[].​values[].​external_idstring(value-external_id)[ 1 .. 255 ] characters^[-_.\d\w]+$obligatoire

ID unique de la valeur d'un attribut. Le external_id ne peut comprendre que des caractères alphanumériques latins minuscules, des tirets et des tirets bas.

Exemple: "value_external_id"
items[].​attributes[].​values[].​valueobject(value-name)obligatoire

Objet contenant des versions localisées du nom de la valeur. Les clés sont spécifiées selon la norme ISO 3166-1.

items[].​attributes[].​values[].​value.​property name*stringpropriété supplémentaire
items[].​custom_attributesobject(json)(item-custom-attributes-response)

Un JSON contenant les attributs de l'objet et leurs valeurs.

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.

items[].​description.​arstring or null

Arabe

items[].​description.​bgstring or null

Bulgare

items[].​description.​cnstring or null

Chinois (simplifié)

items[].​description.​csstring or null

Tchèque

items[].​description.​destring or null

Allemand

items[].​description.​enstring or null

Anglais

items[].​description.​esstring or null

Espagnol (Espagne)

items[].​description.​frstring or null

Français

items[].​description.​hestring or null

Hébreu

items[].​description.​idstring or null

Indonésien

items[].​description.​itstring or null

Italien

items[].​description.​jastring or null

Japonais

items[].​description.​kmstring or null

Khmer

items[].​description.​kostring or null

Coréen

items[].​description.​lostring or null

Laotien

items[].​description.​mystring or null

Birman

items[].​description.​nestring or null

Népalais

items[].​description.​phstring or null

Philippin

items[].​description.​plstring or null

Polonais

items[].​description.​ptstring or null

Portugais

items[].​description.​rostring or null

Roumain

items[].​description.​rustring or null

Russe

items[].​description.​thstring or null

Thaï

items[].​description.​trstring or null

Turc

items[].​description.​twstring or null

Chinois (traditionnel)

items[].​description.​vistring or null

Vietnamien

items[].​groupsArray of objects(Virtual-Items-Currency_admin-groups-response)

Groupes auxquels l'objet appartient.

items[].​groups[].​external_idstring
Exemple: "horror"
items[].​groups[].​nameobject

Nom de l'objet. Doit comprendre des paires clé/valeur où la clé est une région au format "^[a-z]{2}", la valeur est une chaîne.

Par défaut {"en":"Horror"}
Exemple: {"de":"Horror","en":"Horror"}
items[].​groups[].​name.​property name*stringpropriété supplémentaire
items[].​image_urlstring(Virtual-Items-Currency_admin-image_url)

URL de l'image.

items[].​is_enabledboolean(Virtual-Items-Currency_is_enabled)

Whether the item is available. If false, the item can't be purchased in the store or obtained as part of a bundle or within a marketing campaign. Refer to our documentation for detailed information about item availability.

items[].​is_freeboolean(value-is_free)

Détermine la gratuité de l'objet.

items[].​is_paid_randomized_rewardboolean(value-is_paid_randomized_reward)

Si l’objet est une récompense payante aléatoire (par exemple, une boîte à butin).

items[].​is_show_in_storeboolean(Virtual-Items-Currency_is_show_in_store)

Whether the item is displayed in the catalog. If false and is_enabled: true, the item is not visible in the catalog but can be obtained as part of a bundle or within marketing campaigns. Refer to our documentation for detailed information about item availability.

items[].​limitsobject or null(admin-item-limit-response)

Limites d'objets.

items[].​limits.​per_itemobject or null

Limites globales d'objets.

items[].​limits.​per_item.​availableinteger

Nombre d'objets restants que tous les utilisateurs peuvent acheter.

items[].​limits.​per_item.​reservedinteger
items[].​limits.​per_item.​soldinteger
items[].​limits.​per_item.​totalinteger

Nombre maximal d'objets que tous les utilisateurs peuvent acheter.

items[].​limits.​per_userobject or null

Limites d'objets pour un utilisateur spécifique.

items[].​limits.​per_user.​limit_exceeded_visibilitystring(limit_exceeded_visibility)

Determines the visibility of the item in the catalog after the purchase limit is reached, until the next limit reset.

Applies to items for which recurring limit resets are configured in the recurrent_schedule array.

If limit resets are not configured, the item doesn't appear in the catalog after the purchase limit is reached, regardless of the limit_exceeded_visibility value.

Possible values:

  • show — The item is returned in catalog retrieval API calls after the purchase limit is reached. In client-side catalog retrieval API calls, once the limit is reached, the item is returned with the can_be_bought: false flag. The next reset date is returned in reset_next_date.
  • hide — The item is not returned in catalog retrieval API calls after the purchase limit is reached, until the limit is reset.
Enum"show""hide"
items[].​limits.​per_user.​totalinteger

Nombre maximal d'objets qu'un utilisateur unique peut acheter.

items[].​limits.​recurrent_scheduleobject or null(admin_recurrent_schedule_response)

Délai d'actualisation des limites.

items[].​limits.​recurrent_schedule.​per_userinterval_type = daily (object) or interval_type = weekly (object) or interval_type = monthly (object) or interval_type = horaire (object)

Délai d'actualisation des limites pour un utilisateur.

One of:

Type quotidien d'actualisation des limites pour l'utilisateur.

items[].​limits.​recurrent_schedule.​per_user.​displayable_reset_next_datestring(date-time)

Date et heure de réinitialisation des limites (ISO 8601).

Exemple: "2023-02-28T11:00:00+08:00"
items[].​limits.​recurrent_schedule.​per_user.​displayable_reset_start_datestring(date-time)

Date et heure de la première actualisation des limites (ISO 8601).

Exemple: "2023-02-28T11:00:00+08:00"
items[].​limits.​recurrent_schedule.​per_user.​interval_typestring

Type de délai d'actualisation récurrent.

Valeur"daily"
items[].​limits.​recurrent_schedule.​per_user.​reset_next_dateinteger

Date et heure d'actualisation des limites (horodatage Unix).

Exemple: 1677553200
items[].​limits.​recurrent_schedule.​per_user.​timestring(full-time)

Heure d'actualisation des limites dans le fuseau horaire souhaité (arrondie en heures).

Exemple: "11:00:00+03:00"
items[].​long_description(two-letter (object or null)) or (five-letter (object or null))(long-description-localization-object)

Conteneur objet contenant les localisations de la description complète 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.

items[].​long_description.​arstring or null

Arabe

items[].​long_description.​bgstring or null

Bulgare

items[].​long_description.​cnstring or null

Chinois (simplifié)

items[].​long_description.​csstring or null

Tchèque

items[].​long_description.​destring or null

Allemand

items[].​long_description.​enstring or null

Anglais

items[].​long_description.​esstring or null

Espagnol (Espagne)

items[].​long_description.​frstring or null

Français

items[].​long_description.​hestring or null

Hébreu

items[].​long_description.​idstring or null

Indonésien

items[].​long_description.​itstring or null

Italien

items[].​long_description.​jastring or null

Japonais

items[].​long_description.​kmstring or null

Khmer

items[].​long_description.​kostring or null

Coréen

items[].​long_description.​lostring or null

Laotien

items[].​long_description.​mystring or null

Birman

items[].​long_description.​nestring or null

Népalais

items[].​long_description.​phstring or null

Philippin

items[].​long_description.​plstring or null

Polonais

items[].​long_description.​ptstring or null

Portugais

items[].​long_description.​rostring or null

Roumain

items[].​long_description.​rustring or null

Russe

items[].​long_description.​thstring or null

Thaï

items[].​long_description.​trstring or null

Turc

items[].​long_description.​twstring or null

Chinois (traditionnel)

items[].​long_description.​vistring or null

Vietnamien

items[].​media_listArray of objects(Virtual-Items-Currency_admin-media_list)

Ressources supplémentaires de l'objet, telles que des captures d'écran, des vidéos de gameplay, etc.

items[].​media_list[].​typestring

Type de média : image/video.

Enum"image""video"
Exemple: "image"
items[].​media_list[].​urlstring

Fichier de ressources.

Exemple: "https://cdn3.xsolla.com/img/misc/images/71ab1e12126f2103e1868076f0acb21a.jpg"
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.

items[].​name.​arstring or null

Arabe

items[].​name.​bgstring or null

Bulgare

items[].​name.​cnstring or null

Chinois (simplifié)

items[].​name.​csstring or null

Tchèque

items[].​name.​destring or null

Allemand

items[].​name.​enstring or null

Anglais

items[].​name.​esstring or null

Espagnol (Espagne)

items[].​name.​frstring or null

Français

items[].​name.​hestring or null

Hébreu

items[].​name.​idstring or null

Indonésien

items[].​name.​itstring or null

Italien

items[].​name.​jastring or null

Japonais

items[].​name.​kmstring or null

Khmer

items[].​name.​kostring or null

Coréen

items[].​name.​lostring or null

Laotien

items[].​name.​mystring or null

Birman

items[].​name.​nestring or null

Népalais

items[].​name.​phstring or null

Philippin

items[].​name.​plstring or null

Polonais

items[].​name.​ptstring or null

Portugais

items[].​name.​rostring or null

Roumain

items[].​name.​rustring or null

Russe

items[].​name.​thstring or null

Thaï

items[].​name.​trstring or null

Turc

items[].​name.​twstring or null

Chinois (traditionnel)

items[].​name.​vistring or null

Vietnamien

items[].​orderinteger(Virtual-Items-Currency_order)

Item display order in the catalog. The higher the value, the lower the item appears in the list. If the values are the same, items are sorted by creation date, with newer items displayed higher.

items[].​periodsArray of objects(item-periods-response)

Période de vente d'objets.

items[].​periods[].​date_fromstring or null(date-time)

Date de mise en vente de l'objet spécifié.

Exemple: "2020-08-11T10:00:00+03:00"
items[].​periods[].​date_untilstring or null(date-time)

Date de retrait de la vente de l'objet spécifié. Peut prendre la valeur null.

Exemple: "2020-08-11T20:00:00+03:00"
items[].​pricesArray of objects(Virtual-Items_admin-prices)
Exemple: [{"amount":10.5,"currency":"USD","is_default":true,"is_enabled":true}]
items[].​prices[].​amountnumber> 0obligatoire

Montant.

Exemple: 10.5
items[].​prices[].​country_isostring

Code pays à deux lettres majuscules selon la norme ISO 3166-1 alpha-2. Consultez la documentation pour obtenir des informations détaillées sur les pays pris en charge par Xsolla.
Exemple : country=US

Exemple: "US"
items[].​prices[].​currencystringobligatoire

Devise du prix de l'article. Code à trois lettres selon ISO 4217. Consultez la documentation pour obtenir des informations détaillées sur les devises prises en charge par Xsolla.

Exemple: "USD"
items[].​prices[].​is_defaultboolean
Par défaut false
Exemple: true
items[].​prices[].​is_enabledboolean
Par défaut true
Exemple: true
items[].​regionsArray of objects(Virtual-Items-Currency_admin-regions)

Array of regions where the item is available. If the array is empty or not passed, the item is available in all regions.

items[].​regions[].​idinteger>= 1

Region ID within the project.

Refer to the regional sale restriction documentation and region management API calls for detailed information.

Exemple: 1
items[].​skustring(Virtual-Items-Currency_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.

items[].​typestring(Virtual-Items-Currency_type)

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

items[].​vc_pricesArray of objects(Virtual-Items-Currency_admin-get-vc_prices)
Exemple: [{"amount":10,"is_default":true,"sku":"com.xsolla.gold_1"}]
items[].​vc_prices[].​amountnumber> 0obligatoire

Montant.

Exemple: 10
items[].​vc_prices[].​is_defaultboolean
Par défaut false
Exemple: true
items[].​vc_prices[].​skustring(Virtual-Items-Currency_schemas-sku)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.

Exemple: "com.xsolla.gold_1"
Réponse
application/json
{ "items": [ {}, {}, {}, {}, {} ] }

Requête

Crée un objet virtuel.

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
attributesArray of objects(Virtual-Items-Currency_admin-post-put-attributes)<= 20 items

Liste des attributs.

Attention. La création de plus de 20 attributs pour un objet n'est pas autorisée. Toute tentative de dépassement entraîne une erreur.
attributes[].​external_idstring(admin-attribute-external_id)[ 1 .. 255 ] characters^[a-zA-Z0-9-_]+$obligatoire

ID unique de l'attribut. Le external_id ne peut comprendre que des caractères alphanumériques latins minuscules et majuscules, des tirets et des traits bas.

attributes[].​nameobject(admin-attribute-name)

Objet contenant des versions localisées du nom de l'attribut. Les clés sont spécifiées selon la norme ISO 3166-1.

attributes[].​name.​property name*stringpropriété supplémentaire
attributes[].​valuesArray of objects(attribute-value)obligatoire
Attention. La création de plus de 6 valeurs pour un attribut n'est pas autorisée. Toute tentative de dépassement entraînera une erreur.
Exemple: [{"external_id":"strategy","value":{"de":"Strategie","en":"Strategy"}},{"external_id":"action","value":{"de":"Aktion","en":"Action"}}]
attributes[].​values[].​external_idstring(value-external_id)[ 1 .. 255 ] characters^[-_.\d\w]+$obligatoire

ID unique de la valeur d'un attribut. Le external_id ne peut comprendre que des caractères alphanumériques latins minuscules, des tirets et des tirets bas.

Exemple: "value_external_id"
attributes[].​values[].​valueobject(value-name)obligatoire

Objet contenant des versions localisées du nom de la valeur. Les clés sont spécifiées selon la norme ISO 3166-1.

attributes[].​values[].​value.​property name*stringpropriété supplémentaire
custom_attributesobject(json)(item-custom-attributes)<= 500 characters

Un JSON contenant les attributs de l'objet et leurs valeurs. Les attributs permettent d'ajouter des informations supplémentaires aux objets, telles que le niveau requis du joueur pour utiliser l'objet. Les attributs enrichissent la logique interne de votre jeu et sont accessibles via des méthodes GET et des webhooks spécifiques.

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

groupsArray of strings(Virtual-Items-Currency_admin-groups-create)

List of group external IDs the item belongs to.

Example: ["horror", "action"]

image_urlstring(Virtual-Items-Currency_schemas-admin-image_url)

URL de l'image.

is_enabledboolean(Virtual-Items-Currency_is_enabled)

Whether the item is available. If false, the item can't be purchased in the store or obtained as part of a bundle or within a marketing campaign. Refer to our documentation for detailed information about item availability.

is_freeboolean(value-is_free)

Détermine la gratuité de l'objet.

is_paid_randomized_rewardboolean(value-is_paid_randomized_reward)

Si l’objet est une récompense payante aléatoire (par exemple, une boîte à butin).

is_show_in_storeboolean(Virtual-Items-Currency_is_show_in_store)

Whether the item is displayed in the catalog. If false and is_enabled: true, the item is not visible in the catalog but can be obtained as part of a bundle or within marketing campaigns. Refer to our documentation for detailed information about item availability.

limitsobject(Virtual-Item-item-limit)

Limites d'objets.

limits.​per_iteminteger or null(limit_per_item)

Limites globales d'objets.

limits.​per_userlimit_per_user (null) or limit_per_user (integer) or limit_per_user (object)(limit_per_user)

Limites d'objets pour un utilisateur spécifique.

Any of:

Limites d'objets pour un utilisateur spécifique.

null(limit_per_user)
limits.​recurrent_scheduleobject or null(virtual_item_recurrent_schedule)

Délai d'actualisation des limites.

limits.​recurrent_schedule.​per_userinterval_type = daily (object) or interval_type = weekly (object) or interval_type = monthly (object) or interval_type = horaire (object)

Réinitialisation des limites d'achat effectuée selon l'intervalle de temps spécifié, en heures.

One of:

Réinitialisation des limites d'achat effectuée selon l'intervalle de temps spécifié, en heures.

limits.​recurrent_schedule.​per_user.​interval_typestringobligatoire

Délai d'actualisation récurrent.

Valeur"daily"
limits.​recurrent_schedule.​per_user.​timestring((0[0-9]|1[0-9]|2[0-3]):00:00)(\+|-)(0[0-9]|1...obligatoire

Heure d'actualisation des limites dans le fuseau horaire souhaité (arrondie en heures).

Exemple: "02:00:00+03:00"
long_description(two-letter (object or null)) or (five-letter (object or null))(long-description-localization-object)

Conteneur objet contenant les localisations de la description complète 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.

long_description.​arstring or null

Arabe

long_description.​bgstring or null

Bulgare

long_description.​cnstring or null

Chinois (simplifié)

long_description.​csstring or null

Tchèque

long_description.​destring or null

Allemand

long_description.​enstring or null

Anglais

long_description.​esstring or null

Espagnol (Espagne)

long_description.​frstring or null

Français

long_description.​hestring or null

Hébreu

long_description.​idstring or null

Indonésien

long_description.​itstring or null

Italien

long_description.​jastring or null

Japonais

long_description.​kmstring or null

Khmer

long_description.​kostring or null

Coréen

long_description.​lostring or null

Laotien

long_description.​mystring or null

Birman

long_description.​nestring or null

Népalais

long_description.​phstring or null

Philippin

long_description.​plstring or null

Polonais

long_description.​ptstring or null

Portugais

long_description.​rostring or null

Roumain

long_description.​rustring or null

Russe

long_description.​thstring or null

Thaï

long_description.​trstring or null

Turc

long_description.​twstring or null

Chinois (traditionnel)

long_description.​vistring or null

Vietnamien

media_listArray of objects(Virtual-Items-Currency_admin-media_list)

Ressources supplémentaires de l'objet, telles que des captures d'écran, des vidéos de gameplay, etc.

media_list[].​typestring

Type de média : image/video.

Enum"image""video"
Exemple: "image"
media_list[].​urlstring

Fichier de ressources.

Exemple: "https://cdn3.xsolla.com/img/misc/images/71ab1e12126f2103e1868076f0acb21a.jpg"
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(Virtual-Items-Currency_order)

Item display order in the catalog. The higher the value, the lower the item appears in the list. If the values are the same, items are sorted by creation date, with newer items displayed higher.

periodsArray of objects or null(item-periods)

Période de vente d'objets.

periods[].​date_fromstring(date-time)

Date de mise en vente de l'objet spécifié.

Exemple: "2020-08-11T10:00:00+03:00"
periods[].​date_untilstring or null(date-time)

Date de retrait de la vente de l'objet spécifié. Peut prendre la valeur null.

Exemple: "2020-08-11T20:00:00+03:00"
pricesArray of objects(Virtual-Items_admin-prices)
Exemple: [{"amount":10.5,"currency":"USD","is_default":true,"is_enabled":true}]
prices[].​amountnumber> 0obligatoire

Montant.

Exemple: 10.5
prices[].​country_isostring

Code pays à deux lettres majuscules selon la norme ISO 3166-1 alpha-2. Consultez la documentation pour obtenir des informations détaillées sur les pays pris en charge par Xsolla.
Exemple : country=US

Exemple: "US"
prices[].​currencystringobligatoire

Devise du prix de l'article. Code à trois lettres selon ISO 4217. Consultez la documentation pour obtenir des informations détaillées sur les devises prises en charge par Xsolla.

Exemple: "USD"
prices[].​is_defaultboolean
Par défaut false
Exemple: true
prices[].​is_enabledboolean
Par défaut true
Exemple: true
regionsArray of objects(Virtual-Items-Currency_admin-regions)

Array of regions where the item is available. If the array is empty or not passed, the item is available in all regions.

regions[].​idinteger>= 1

Region ID within the project.

Refer to the regional sale restriction documentation and region management API calls for detailed information.

Exemple: 1
skustring(Virtual-Items-Currency_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.

vc_pricesArray of objects or null(Virtual-Items-Currency_admin-create-vc_prices)

Array of virtual currency prices.

Exemple: [{"amount":10,"is_default":true,"is_enabled":true,"sku":"com.xsolla.gold_1"}]
vc_prices[].​amountintegerobligatoire

Prix de l'objet en monnaie virtuelle.

Exemple: 10
vc_prices[].​is_defaultbooleanobligatoire

Whether it is the default price in virtual currency.

Par défaut false
Exemple: true
vc_prices[].​is_enabledbooleanobligatoire

Whether this price is used for displaying in the catalog and for purchasing the item. If false, the price is not used.

Par défaut true
Exemple: true
vc_prices[].​skustring(Virtual-Items-Currency_schemas-sku)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.

Exemple: "com.xsolla.gold_1"
curl -i -X POST \
  -u <username>:<password> \
  https://store.xsolla.com/api/v2/project/44056/admin/items/virtual_items \
  -H 'Content-Type: application/json' \
  -d '{
    "attributes": [
      {
        "external_id": "craft-materials",
        "name": {
          "en": "Craft materials"
        },
        "values": [
          {
            "external_id": "steel",
            "value": {
              "en-US": "5"
            }
          },
          {
            "external_id": "leather",
            "value": {
              "en-US": "1"
            }
          }
        ]
      }
    ],
    "custom_attributes": {
      "attr": "value",
      "purchased": 0
    },
    "description": {
      "de": "Ein Schwert ist eine Nahkampfwaffe mit Klinge, die zum Schneiden oder Stechen bestimmt ist, länger als ein Messer oder Dolch ist und aus einer langen Klinge besteht, die an einem Griff befestigt ist.",
      "en": "A sword is a bladed melee weapon intended for cutting or thrusting that is longer than a knife or dagger, consisting of a long blade attached to a hilt."
    },
    "groups": [
      "weapons"
    ],
    "is_enabled": true,
    "is_free": false,
    "is_paid_randomized_reward": true,
    "is_show_in_store": true,
    "limits": {
      "per_item": 100,
      "per_user": 5
    },
    "name": {
      "de": "Schwert",
      "en": "Sword"
    },
    "order": 1,
    "periods": [
      {
        "date_from": "2020-08-11T10:00:00+03:00",
        "date_until": "2020-08-11T20:00:00+03:00"
      }
    ],
    "prices": [
      {
        "amount": 100,
        "currency": "USD",
        "is_default": true,
        "is_enabled": true
      },
      {
        "amount": 200,
        "country_iso": "CZ",
        "currency": "CZK",
        "is_default": true,
        "is_enabled": false
      }
    ],
    "sku": "com.xsolla.sword_1",
    "vc_prices": []
  }'

Réponses

L'objet virtuel a été créé avec succès.

Corpsapplication/json
skustring
Exemple: "com.xsolla.item_1"
Réponse
application/json
{ "sku": "com.xsolla.item_1" }
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations
Opérations

Catalogue

Cette API permet de récupérer tout type d'objet vendable ou tout objet spécifique.

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