Xsolla-logo

Create virtual currency

post/v2/project/{project_id}/admin/items/virtual_currency

Creates a virtual currency.

Request
path Parameters
project_id
required
integer

Project ID.

Example: 44056
Request Body schema: application/json
sku
required
string [ 1 .. 255 ] characters ^[a-zA-Z0-9_\\-–.]*$

Unique item ID. The SKU may only contain lowercase Latin alphanumeric characters, periods, dashes, and underscores.

required
object

Object with localizations for item's name. Two-letter lowercase language code.

object

Object with localizations for item's description. Two-letter lowercase language code.

object

Object with localizations for long description of item. Two-letter lowercase language code.

image_url
string
Array of objects

Item's additional assets such as screenshots, gameplay video and so on.

Array of objects
Array of objects <= 20 items

List of attributes.

Attention. You can't specify more than 20 attributes for the item. Any attempts to exceed the limit result in an error.
Array of objects
Array of objects
is_enabled
boolean
is_deleted
boolean
is_show_in_store
boolean
is_free
boolean
Default: false

If true, the item is free.

is_hard
boolean
order
integer

Defines arrangement order.

object
Array of objects
object

Item limits.

Responses
201

Virtual item was successfully created.

422

Invalid request.

Request samples
application/json
{
  • "sku": "coin",
  • "name": {
    },
  • "is_enabled": true,
  • "is_free": false,
  • "order": 1,
  • "description": {
    },
  • "prices": [
    ],
  • "attributes": [
    ],
  • "limits": {
    }
}
Response samples
application/json
{
  • "sku": "new-sku"
}