Store API v2.0

概览

此部分介绍用于Buy Button模块的方法。请使用基本认证来调用方法。要打开商店UI并启用安全支付,需先获取令牌

端点路径:https://api.xsolla.com

商店UI

打开商店

要在新窗口中打开商店UI,请使用以下链接:https://secure.xsolla.com/paystation3/?access_token=ACCESS_TOKEN,其中ACCESS_TOKEN是令牌,由API接收。

如用于测试,请使用以下URL:https://sandbox-secure.xsolla.com/paystation3/?access_token=ACCESS_TOKEN

Notice: 参数access_token包含隐私用户数据。请确保获取该参数时使用服务器对服务器通信。

测试卡片列表

在沙盒中,您可以使用下列信用卡模拟成功的支付:

卡片3-D Secure
卡号:4111111111111111
过期日期:12/40
CVV2:123
卡片类型:VISA
没有
卡号:5555555555554444
过期日期:11/40
CVV2:321
卡片类型:MasterCard
没有
卡号:4000000000000010
过期日期:12/40
CVV2:123
卡片类型:VISA
卡号:5200000000000114
过期日期:11/40
CVV2:321
卡片类型:MasterCard
卡号:6759649826438453
过期日期:12/40
CVV2:321
卡片类型:Maestro

此外,您还可以使用下列数据模拟被拒绝的交易:

卡片3-D Secure描述
卡号:4000000000000002
过期日期:12/40
CVV2:123
卡片类型:VISA
没有资金不足
卡号:5200000000000007
过期日期:11/40
CVV2:321
卡片类型:MasterCard
没有资金不足
卡号:4000000000000036
过期日期:12/40
CVV2:123
卡片类型:VISA
拒绝
卡号:5200000000000031
过期日期:11/40
CVV2:321
卡片类型:MasterCard
拒绝

错误列表

代码描述
0004-0001令牌过期或者不正确。
0004-0008错误的URL(尝试以secure.xsolla.com访问沙盒模式或者以sandbox-secure.xsolla.com访问实时模式)。
0002-0004未签署协议。
0004-0010已禁止无令牌集成。
0010-0001未找到套餐。
0010-0003套餐未配置数字版权管理(DRM)。
1000-0003该项目没有启用模块。
0004-0003未传递项目ID。
0004-0009access_data的JSON无效。
0003-0001所选国家/地区禁止进行支付。
1000-0002网络错误。初始化过程中未收到API响应。
0007-0009无法通过该令牌更改订阅计划。新订阅计划的货币与现有计划设置的不同。
0004-0002数字签名不正确。
0005-0001从账单检索用户数据时出错。
1000-0004未收到状态页面的数据。
1000-0001网络错误。API未响应。
1004-0001禁止更改该订阅计划。
0002-0002项目不存在。

虚拟货币

获取套餐

通过ID获取虚拟货币套餐。

HTTP请求

GET https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id}

参数Type描述
project_id
integer项目ID。
package_id
integer虚拟货币套餐ID。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id}

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id} \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id}');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id}");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id}", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id}")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id}");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "advertisement_type": null,
  "advertisement_type_custom": null,
  "amount": 100,
  "bonus": 1,
  "description": null,
  "enabled": true,
  "id": 37702,
  "image_url": "//cdn.xsolla.net/img/misc/images/19a38b51403c3ab389fabfacdabc43df.png",
  "label": null,
  "prices_array": [
    {
      "name": "EUR",
      "value": 0.99
    }
  ],
  "sku": null
}
{
  "advertisement_type": null,
  "advertisement_type_custom": null,
  "amount": 100,
  "bonus": 1,
  "description": null,
  "enabled": true,
  "id": 37702,
  "image_url": "//cdn.xsolla.net/img/misc/images/19a38b51403c3ab389fabfacdabc43df.png",
  "label": null,
  "prices_array": [
    {
      "name": "EUR",
      "value": 0.99
    }
  ],
  "sku": null
}
{
  "advertisement_type": null,
  "advertisement_type_custom": null,
  "amount": 100,
  "bonus": 1,
  "description": null,
  "enabled": true,
  "id": 37702,
  "image_url": "//cdn.xsolla.net/img/misc/images/19a38b51403c3ab389fabfacdabc43df.png",
  "label": null,
  "prices_array": [
    {
      "name": "EUR",
      "value": 0.99
    }
  ],
  "sku": null
}
{
  "advertisement_type": null,
  "advertisement_type_custom": null,
  "amount": 100,
  "bonus": 1,
  "description": null,
  "enabled": true,
  "id": 37702,
  "image_url": "//cdn.xsolla.net/img/misc/images/19a38b51403c3ab389fabfacdabc43df.png",
  "label": null,
  "prices_array": [
    {
      "name": "EUR",
      "value": 0.99
    }
  ],
  "sku": null
}
{
  "advertisement_type": null,
  "advertisement_type_custom": null,
  "amount": 100,
  "bonus": 1,
  "description": null,
  "enabled": true,
  "id": 37702,
  "image_url": "//cdn.xsolla.net/img/misc/images/19a38b51403c3ab389fabfacdabc43df.png",
  "label": null,
  "prices_array": [
    {
      "name": "EUR",
      "value": 0.99
    }
  ],
  "sku": null
}
{
  "advertisement_type": null,
  "advertisement_type_custom": null,
  "amount": 100,
  "bonus": 1,
  "description": null,
  "enabled": true,
  "id": 37702,
  "image_url": "//cdn.xsolla.net/img/misc/images/19a38b51403c3ab389fabfacdabc43df.png",
  "label": null,
  "prices_array": [
    {
      "name": "EUR",
      "value": 0.99
    }
  ],
  "sku": null
}
{
  "advertisement_type": null,
  "advertisement_type_custom": null,
  "amount": 100,
  "bonus": 1,
  "description": null,
  "enabled": true,
  "id": 37702,
  "image_url": "//cdn.xsolla.net/img/misc/images/19a38b51403c3ab389fabfacdabc43df.png",
  "label": null,
  "prices_array": [
    {
      "name": "EUR",
      "value": 0.99
    }
  ],
  "sku": null
}
{
  "advertisement_type": null,
  "advertisement_type_custom": null,
  "amount": 100,
  "bonus": 1,
  "description": null,
  "enabled": true,
  "id": 37702,
  "image_url": "//cdn.xsolla.net/img/misc/images/19a38b51403c3ab389fabfacdabc43df.png",
  "label": null,
  "prices_array": [
    {
      "name": "EUR",
      "value": 0.99
    }
  ],
  "sku": null
}

更新套餐

更新项目虚拟货币设置。

HTTP请求

PUT https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id}

参数类型描述
project_id
integer项目ID。
package_id
integer虚拟货币套餐ID。
vc_name
array of strings产品名称。值包含"localization":"product name"对。
base
array主要产品货币的JSON对象,其中键是货币(使用ISO 4217标准规定的3字母组合表示币种),值是货币金额。
default_currency
string默认币种。
min
float最小购买金额。
max
float最大购买金额。
is_currency_discrete
boolean虚拟货币是否可以使用美分。
allow_user_sum
boolean是否允许在货币包之间支付任意金额。
amount
float货币包中虚拟货币的金额。
sku
string虚拟货币套餐的唯一ID。更新SKU后,需重新配置所有小组件。已安装的小组件将停止工作。
price
float虚拟货币包的价格。
image_url
string图像URL。
description
array of strings带有货币包本地化名称的数组。值包含"localization":"package description"对。
label
array of strings带有货币包本地化标签的数组。值包含"localization":"package description"对。
bonus
float货币包的折扣金额。
advertisement_type
string虚拟货币包的标签类型。可以是'recommended'、'best_deal'、'special_offer'或'null'。
enabled
boolean是否启用虚拟货币包。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
PUT https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id}

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
  "advertisement_type": null,
  "advertisement_type_custom": null,
  "amount": 1010,
  "bonus": 40.01,
  "description": null,
  "enabled": true,
  "image_url": "//cdn.xsolla.net/img/misc/images/e69ec3dee89b51237aa01a60b4374c23.png",
  "label": null,
  "prices_array": [
    {
      "name": "RUB",
      "value": 59.99
    }
  ],
  "sku": null
}
curl --request PUT \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id} \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"advertisement_type":null,"advertisement_type_custom":null,"amount":1010,"bonus":40.01,"description":null,"enabled":true,"image_url":"//cdn.xsolla.net/img/misc/images/e69ec3dee89b51237aa01a60b4374c23.png","label":null,"prices_array":[{"name":"RUB","value":59.99}],"sku":null}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"advertisement_type":null,"advertisement_type_custom":null,"amount":1010,"bonus":40.01,"description":null,"enabled":true,"image_url":"//cdn.xsolla.net/img/misc/images/e69ec3dee89b51237aa01a60b4374c23.png","label":null,"prices_array":[{"name":"RUB","value":59.99}],"sku":null}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id}');
$request->setRequestMethod('PUT');
$request->setBody($body);

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id}");
var request = new RestRequest(Method.PUT);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"advertisement_type\":null,\"advertisement_type_custom\":null,\"amount\":1010,\"bonus\":40.01,\"description\":null,\"enabled\":true,\"image_url\":\"//cdn.xsolla.net/img/misc/images/e69ec3dee89b51237aa01a60b4374c23.png\",\"label\":null,\"prices_array\":[{\"name\":\"RUB\",\"value\":59.99}],\"sku\":null}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"advertisement_type\":null,\"advertisement_type_custom\":null,\"amount\":1010,\"bonus\":40.01,\"description\":null,\"enabled\":true,\"image_url\":\"//cdn.xsolla.net/img/misc/images/e69ec3dee89b51237aa01a60b4374c23.png\",\"label\":null,\"prices_array\":[{\"name\":\"RUB\",\"value\":59.99}],\"sku\":null}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("PUT", "/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id}", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"advertisement_type\":null,\"advertisement_type_custom\":null,\"amount\":1010,\"bonus\":40.01,\"description\":null,\"enabled\":true,\"image_url\":\"//cdn.xsolla.net/img/misc/images/e69ec3dee89b51237aa01a60b4374c23.png\",\"label\":null,\"prices_array\":[{\"name\":\"RUB\",\"value\":59.99}],\"sku\":null}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"advertisement_type\":null,\"advertisement_type_custom\":null,\"amount\":1010,\"bonus\":40.01,\"description\":null,\"enabled\":true,\"image_url\":\"//cdn.xsolla.net/img/misc/images/e69ec3dee89b51237aa01a60b4374c23.png\",\"label\":null,\"prices_array\":[{\"name\":\"RUB\",\"value\":59.99}],\"sku\":null}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id}")
  .put(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "advertisement_type": null,
  "advertisement_type_custom": null,
  "amount": 1010,
  "bonus": 40.01,
  "description": null,
  "enabled": true,
  "image_url": "//cdn.xsolla.net/img/misc/images/e69ec3dee89b51237aa01a60b4374c23.png",
  "label": null,
  "prices_array": [
    {
      "name": "RUB",
      "value": 59.99
    }
  ],
  "sku": null
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency/packages/{package_id}");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应


获取套餐

列示虚拟货币信息和可用套餐。

HTTP请求

GET https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency

参数Type描述
project_id
integer项目ID。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/projects/{project_id}/virtual_currency", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_currency");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "allow_user_sum": true,
  "base": {
    "EUR": 0.01,
    "USD": 0.01
  },
  "default_currency": "USD",
  "id": 40123,
  "image_url": "//cdn.xsolla.net/img/misc/images/91d3aecf770347428c8c6abdc8a260b8.png",
  "is_currency_discrete": true,
  "max": 0,
  "min": 0,
  "packets": {
    "EUR": [
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 100,
        "bonus": 1,
        "description": [],
        "enabled": true,
        "id": 37702,
        "image_url": "//cdn.xsolla.net/img/misc/images/19a38b51403c3ab389fabfacdabc43df.png",
        "label": [],
        "price": 0.99,
        "sku": null
      },
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 500,
        "bonus": 0.2,
        "description": [],
        "enabled": true,
        "id": 37708,
        "image_url": "//cdn.xsolla.net/img/misc/images/fec4d08a1258582d94d50f25c92c125e.png",
        "label": [],
        "price": 4.99,
        "sku": null
      }
    ],
    "USD": [
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 100,
        "bonus": 1,
        "description": [],
        "enabled": false,
        "id": 37701,
        "image_url": "//cdn.xsolla.net/img/misc/images/5eb27983d6a7005a59b1b1b8191e3712.png",
        "label": [],
        "price": 0.99,
        "sku": null
      },
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 500,
        "bonus": 0,
        "description": [],
        "enabled": true,
        "id": 37707,
        "image_url": "//cdn.xsolla.net/img/misc/images/8574e6bb25b8fa6adac2b73250369646.png",
        "label": [],
        "price": 5.99,
        "sku": null
      }
    ]
  },
  "type": "discounts",
  "vc_name": {
    "de": null,
    "en": "Coins",
    "es": "Monedas",
    "fr": "Monnaies",
    "ko": "코인",
    "ru": "Coins"
  }
}
{
  "allow_user_sum": true,
  "base": {
    "EUR": 0.01,
    "USD": 0.01
  },
  "default_currency": "USD",
  "id": 40123,
  "image_url": "//cdn.xsolla.net/img/misc/images/91d3aecf770347428c8c6abdc8a260b8.png",
  "is_currency_discrete": true,
  "max": 0,
  "min": 0,
  "packets": {
    "EUR": [
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 100,
        "bonus": 1,
        "description": [],
        "enabled": true,
        "id": 37702,
        "image_url": "//cdn.xsolla.net/img/misc/images/19a38b51403c3ab389fabfacdabc43df.png",
        "label": [],
        "price": 0.99,
        "sku": null
      },
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 500,
        "bonus": 0.2,
        "description": [],
        "enabled": true,
        "id": 37708,
        "image_url": "//cdn.xsolla.net/img/misc/images/fec4d08a1258582d94d50f25c92c125e.png",
        "label": [],
        "price": 4.99,
        "sku": null
      }
    ],
    "USD": [
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 100,
        "bonus": 1,
        "description": [],
        "enabled": false,
        "id": 37701,
        "image_url": "//cdn.xsolla.net/img/misc/images/5eb27983d6a7005a59b1b1b8191e3712.png",
        "label": [],
        "price": 0.99,
        "sku": null
      },
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 500,
        "bonus": 0,
        "description": [],
        "enabled": true,
        "id": 37707,
        "image_url": "//cdn.xsolla.net/img/misc/images/8574e6bb25b8fa6adac2b73250369646.png",
        "label": [],
        "price": 5.99,
        "sku": null
      }
    ]
  },
  "type": "discounts",
  "vc_name": {
    "de": null,
    "en": "Coins",
    "es": "Monedas",
    "fr": "Monnaies",
    "ko": "코인",
    "ru": "Coins"
  }
}
{
  "allow_user_sum": true,
  "base": {
    "EUR": 0.01,
    "USD": 0.01
  },
  "default_currency": "USD",
  "id": 40123,
  "image_url": "//cdn.xsolla.net/img/misc/images/91d3aecf770347428c8c6abdc8a260b8.png",
  "is_currency_discrete": true,
  "max": 0,
  "min": 0,
  "packets": {
    "EUR": [
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 100,
        "bonus": 1,
        "description": [],
        "enabled": true,
        "id": 37702,
        "image_url": "//cdn.xsolla.net/img/misc/images/19a38b51403c3ab389fabfacdabc43df.png",
        "label": [],
        "price": 0.99,
        "sku": null
      },
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 500,
        "bonus": 0.2,
        "description": [],
        "enabled": true,
        "id": 37708,
        "image_url": "//cdn.xsolla.net/img/misc/images/fec4d08a1258582d94d50f25c92c125e.png",
        "label": [],
        "price": 4.99,
        "sku": null
      }
    ],
    "USD": [
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 100,
        "bonus": 1,
        "description": [],
        "enabled": false,
        "id": 37701,
        "image_url": "//cdn.xsolla.net/img/misc/images/5eb27983d6a7005a59b1b1b8191e3712.png",
        "label": [],
        "price": 0.99,
        "sku": null
      },
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 500,
        "bonus": 0,
        "description": [],
        "enabled": true,
        "id": 37707,
        "image_url": "//cdn.xsolla.net/img/misc/images/8574e6bb25b8fa6adac2b73250369646.png",
        "label": [],
        "price": 5.99,
        "sku": null
      }
    ]
  },
  "type": "discounts",
  "vc_name": {
    "de": null,
    "en": "Coins",
    "es": "Monedas",
    "fr": "Monnaies",
    "ko": "코인",
    "ru": "Coins"
  }
}
{
  "allow_user_sum": true,
  "base": {
    "EUR": 0.01,
    "USD": 0.01
  },
  "default_currency": "USD",
  "id": 40123,
  "image_url": "//cdn.xsolla.net/img/misc/images/91d3aecf770347428c8c6abdc8a260b8.png",
  "is_currency_discrete": true,
  "max": 0,
  "min": 0,
  "packets": {
    "EUR": [
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 100,
        "bonus": 1,
        "description": [],
        "enabled": true,
        "id": 37702,
        "image_url": "//cdn.xsolla.net/img/misc/images/19a38b51403c3ab389fabfacdabc43df.png",
        "label": [],
        "price": 0.99,
        "sku": null
      },
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 500,
        "bonus": 0.2,
        "description": [],
        "enabled": true,
        "id": 37708,
        "image_url": "//cdn.xsolla.net/img/misc/images/fec4d08a1258582d94d50f25c92c125e.png",
        "label": [],
        "price": 4.99,
        "sku": null
      }
    ],
    "USD": [
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 100,
        "bonus": 1,
        "description": [],
        "enabled": false,
        "id": 37701,
        "image_url": "//cdn.xsolla.net/img/misc/images/5eb27983d6a7005a59b1b1b8191e3712.png",
        "label": [],
        "price": 0.99,
        "sku": null
      },
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 500,
        "bonus": 0,
        "description": [],
        "enabled": true,
        "id": 37707,
        "image_url": "//cdn.xsolla.net/img/misc/images/8574e6bb25b8fa6adac2b73250369646.png",
        "label": [],
        "price": 5.99,
        "sku": null
      }
    ]
  },
  "type": "discounts",
  "vc_name": {
    "de": null,
    "en": "Coins",
    "es": "Monedas",
    "fr": "Monnaies",
    "ko": "코인",
    "ru": "Coins"
  }
}
{
  "allow_user_sum": true,
  "base": {
    "EUR": 0.01,
    "USD": 0.01
  },
  "default_currency": "USD",
  "id": 40123,
  "image_url": "//cdn.xsolla.net/img/misc/images/91d3aecf770347428c8c6abdc8a260b8.png",
  "is_currency_discrete": true,
  "max": 0,
  "min": 0,
  "packets": {
    "EUR": [
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 100,
        "bonus": 1,
        "description": [],
        "enabled": true,
        "id": 37702,
        "image_url": "//cdn.xsolla.net/img/misc/images/19a38b51403c3ab389fabfacdabc43df.png",
        "label": [],
        "price": 0.99,
        "sku": null
      },
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 500,
        "bonus": 0.2,
        "description": [],
        "enabled": true,
        "id": 37708,
        "image_url": "//cdn.xsolla.net/img/misc/images/fec4d08a1258582d94d50f25c92c125e.png",
        "label": [],
        "price": 4.99,
        "sku": null
      }
    ],
    "USD": [
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 100,
        "bonus": 1,
        "description": [],
        "enabled": false,
        "id": 37701,
        "image_url": "//cdn.xsolla.net/img/misc/images/5eb27983d6a7005a59b1b1b8191e3712.png",
        "label": [],
        "price": 0.99,
        "sku": null
      },
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 500,
        "bonus": 0,
        "description": [],
        "enabled": true,
        "id": 37707,
        "image_url": "//cdn.xsolla.net/img/misc/images/8574e6bb25b8fa6adac2b73250369646.png",
        "label": [],
        "price": 5.99,
        "sku": null
      }
    ]
  },
  "type": "discounts",
  "vc_name": {
    "de": null,
    "en": "Coins",
    "es": "Monedas",
    "fr": "Monnaies",
    "ko": "코인",
    "ru": "Coins"
  }
}
{
  "allow_user_sum": true,
  "base": {
    "EUR": 0.01,
    "USD": 0.01
  },
  "default_currency": "USD",
  "id": 40123,
  "image_url": "//cdn.xsolla.net/img/misc/images/91d3aecf770347428c8c6abdc8a260b8.png",
  "is_currency_discrete": true,
  "max": 0,
  "min": 0,
  "packets": {
    "EUR": [
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 100,
        "bonus": 1,
        "description": [],
        "enabled": true,
        "id": 37702,
        "image_url": "//cdn.xsolla.net/img/misc/images/19a38b51403c3ab389fabfacdabc43df.png",
        "label": [],
        "price": 0.99,
        "sku": null
      },
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 500,
        "bonus": 0.2,
        "description": [],
        "enabled": true,
        "id": 37708,
        "image_url": "//cdn.xsolla.net/img/misc/images/fec4d08a1258582d94d50f25c92c125e.png",
        "label": [],
        "price": 4.99,
        "sku": null
      }
    ],
    "USD": [
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 100,
        "bonus": 1,
        "description": [],
        "enabled": false,
        "id": 37701,
        "image_url": "//cdn.xsolla.net/img/misc/images/5eb27983d6a7005a59b1b1b8191e3712.png",
        "label": [],
        "price": 0.99,
        "sku": null
      },
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 500,
        "bonus": 0,
        "description": [],
        "enabled": true,
        "id": 37707,
        "image_url": "//cdn.xsolla.net/img/misc/images/8574e6bb25b8fa6adac2b73250369646.png",
        "label": [],
        "price": 5.99,
        "sku": null
      }
    ]
  },
  "type": "discounts",
  "vc_name": {
    "de": null,
    "en": "Coins",
    "es": "Monedas",
    "fr": "Monnaies",
    "ko": "코인",
    "ru": "Coins"
  }
}
{
  "allow_user_sum": true,
  "base": {
    "EUR": 0.01,
    "USD": 0.01
  },
  "default_currency": "USD",
  "id": 40123,
  "image_url": "//cdn.xsolla.net/img/misc/images/91d3aecf770347428c8c6abdc8a260b8.png",
  "is_currency_discrete": true,
  "max": 0,
  "min": 0,
  "packets": {
    "EUR": [
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 100,
        "bonus": 1,
        "description": [],
        "enabled": true,
        "id": 37702,
        "image_url": "//cdn.xsolla.net/img/misc/images/19a38b51403c3ab389fabfacdabc43df.png",
        "label": [],
        "price": 0.99,
        "sku": null
      },
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 500,
        "bonus": 0.2,
        "description": [],
        "enabled": true,
        "id": 37708,
        "image_url": "//cdn.xsolla.net/img/misc/images/fec4d08a1258582d94d50f25c92c125e.png",
        "label": [],
        "price": 4.99,
        "sku": null
      }
    ],
    "USD": [
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 100,
        "bonus": 1,
        "description": [],
        "enabled": false,
        "id": 37701,
        "image_url": "//cdn.xsolla.net/img/misc/images/5eb27983d6a7005a59b1b1b8191e3712.png",
        "label": [],
        "price": 0.99,
        "sku": null
      },
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 500,
        "bonus": 0,
        "description": [],
        "enabled": true,
        "id": 37707,
        "image_url": "//cdn.xsolla.net/img/misc/images/8574e6bb25b8fa6adac2b73250369646.png",
        "label": [],
        "price": 5.99,
        "sku": null
      }
    ]
  },
  "type": "discounts",
  "vc_name": {
    "de": null,
    "en": "Coins",
    "es": "Monedas",
    "fr": "Monnaies",
    "ko": "코인",
    "ru": "Coins"
  }
}
{
  "allow_user_sum": true,
  "base": {
    "EUR": 0.01,
    "USD": 0.01
  },
  "default_currency": "USD",
  "id": 40123,
  "image_url": "//cdn.xsolla.net/img/misc/images/91d3aecf770347428c8c6abdc8a260b8.png",
  "is_currency_discrete": true,
  "max": 0,
  "min": 0,
  "packets": {
    "EUR": [
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 100,
        "bonus": 1,
        "description": [],
        "enabled": true,
        "id": 37702,
        "image_url": "//cdn.xsolla.net/img/misc/images/19a38b51403c3ab389fabfacdabc43df.png",
        "label": [],
        "price": 0.99,
        "sku": null
      },
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 500,
        "bonus": 0.2,
        "description": [],
        "enabled": true,
        "id": 37708,
        "image_url": "//cdn.xsolla.net/img/misc/images/fec4d08a1258582d94d50f25c92c125e.png",
        "label": [],
        "price": 4.99,
        "sku": null
      }
    ],
    "USD": [
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 100,
        "bonus": 1,
        "description": [],
        "enabled": false,
        "id": 37701,
        "image_url": "//cdn.xsolla.net/img/misc/images/5eb27983d6a7005a59b1b1b8191e3712.png",
        "label": [],
        "price": 0.99,
        "sku": null
      },
      {
        "advertisement_type": null,
        "advertisement_type_custom": [],
        "amount": 500,
        "bonus": 0,
        "description": [],
        "enabled": true,
        "id": 37707,
        "image_url": "//cdn.xsolla.net/img/misc/images/8574e6bb25b8fa6adac2b73250369646.png",
        "label": [],
        "price": 5.99,
        "sku": null
      }
    ]
  },
  "type": "discounts",
  "vc_name": {
    "de": null,
    "en": "Coins",
    "es": "Monedas",
    "fr": "Monnaies",
    "ko": "코인",
    "ru": "Coins"
  }
}

虚拟物品

创建物品

创建虚拟物品。

HTTP请求

POST https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items

参数类型描述
project_id
integer项目ID。
sku
string物品的唯一ID。SKU可能仅包含小写字母、数字、破折号和下划线。
item_code
string物品附加代码。 可选
name
array of strings物品本地化名称的数组。
description
array of strings物品本地化描述的数组。
long_description
array of strings物品本地化详细描述的数组。
prices
array物品价格数组。
default_currency
string默认购买货币。参照ISO 4217标准的三位数字代码。
enabled
boolean启用物品。
permanent
boolean如为'true',则该物品仅可购买一次。
image_url
string图像URL。
item_type
string物品的类型:消耗品/期限品/永久品/宝箱/实物。
expiration
integer过期时间(秒)。仅用于“Expiration”物品类型
groups
array of integers物品所属组。
deleted
boolean物品是否已删除。
user_attribute_conditions
array of objects用户属性条件列表。
user_attribute_conditions.right_operand
array用户属性对比值。
user_attribute_conditions.user_attribute_key
string用户属性条件键。
user_attribute_conditions.operation
string操作类型。可以是'greater'、'greaterOrEqual'、'equal'、'notEqual'、'less'、'lessOrEqual'、'between'、'in'、'notIn'。
user_attribute_conditions.action
string动作类型。可以是'hide'、'block'、'warning'。
advertisement_type
string付款UI中为物品显示的特殊横幅类型。可以是'recommended'、'best_deal'、'special_offer'、'null'。
virtual_currency_price
integer以游戏内货币计算的价格。如果为'null',则物品仅能通过真实货币购买。
purchase_limit
integer物品可购买的次数。如果为'null',则购买次数无限制。
keywords
array用于在付款UI中查找物品的关键字。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
POST https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
  "advertisement_type": null,
  "default_currency": "USD",
  "description": {
    "en": "Chinese Tier VIII medium tank."
  },
  "enabled": true,
  "expiration": null,
  "groups": [],
  "image_url": "",
  "item_code": "chinese-medium-tank",
  "item_type": null,
  "keywords": {},
  "long_description": {
    "en": "This Chinese Tier VIII medium tank is a real beast in its class."
  },
  "name": {
    "en": "T-34-3"
  },
  "permanent": true,
  "prices": {
    "EUR": "1",
    "USD": "2"
  },
  "sku": "1234",
  "user_attribute_conditions": [
    {},
    {},
    {}
  ]
}
curl --request POST \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"name":{"en":"T-34-3"},"description":{"en":"Chinese Tier VIII medium tank."},"long_description":{"en":"This Chinese Tier VIII medium tank is a real beast in its class."},"enabled":true,"item_code":"chinese-medium-tank","advertisement_type":null,"item_type":null,"keywords":{},"groups":[],"default_currency":"USD","expiration":null,"image_url":"","permanent":true,"prices":{"USD":"2","EUR":"1"},"sku":"1234","user_attribute_conditions":[{},{},{}]}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"name":{"en":"T-34-3"},"description":{"en":"Chinese Tier VIII medium tank."},"long_description":{"en":"This Chinese Tier VIII medium tank is a real beast in its class."},"enabled":true,"item_code":"chinese-medium-tank","advertisement_type":null,"item_type":null,"keywords":{},"groups":[],"default_currency":"USD","expiration":null,"image_url":"","permanent":true,"prices":{"USD":"2","EUR":"1"},"sku":"1234","user_attribute_conditions":[{},{},{}]}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items");
var request = new RestRequest(Method.POST);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":{\"en\":\"T-34-3\"},\"description\":{\"en\":\"Chinese Tier VIII medium tank.\"},\"long_description\":{\"en\":\"This Chinese Tier VIII medium tank is a real beast in its class.\"},\"enabled\":true,\"item_code\":\"chinese-medium-tank\",\"advertisement_type\":null,\"item_type\":null,\"keywords\":{},\"groups\":[],\"default_currency\":\"USD\",\"expiration\":null,\"image_url\":\"\",\"permanent\":true,\"prices\":{\"USD\":\"2\",\"EUR\":\"1\"},\"sku\":\"1234\",\"user_attribute_conditions\":[{},{},{}]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"name\":{\"en\":\"T-34-3\"},\"description\":{\"en\":\"Chinese Tier VIII medium tank.\"},\"long_description\":{\"en\":\"This Chinese Tier VIII medium tank is a real beast in its class.\"},\"enabled\":true,\"item_code\":\"chinese-medium-tank\",\"advertisement_type\":null,\"item_type\":null,\"keywords\":{},\"groups\":[],\"default_currency\":\"USD\",\"expiration\":null,\"image_url\":\"\",\"permanent\":true,\"prices\":{\"USD\":\"2\",\"EUR\":\"1\"},\"sku\":\"1234\",\"user_attribute_conditions\":[{},{},{}]}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("POST", "/merchant/v2/projects/{project_id}/virtual_items/items", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"name\":{\"en\":\"T-34-3\"},\"description\":{\"en\":\"Chinese Tier VIII medium tank.\"},\"long_description\":{\"en\":\"This Chinese Tier VIII medium tank is a real beast in its class.\"},\"enabled\":true,\"item_code\":\"chinese-medium-tank\",\"advertisement_type\":null,\"item_type\":null,\"keywords\":{},\"groups\":[],\"default_currency\":\"USD\",\"expiration\":null,\"image_url\":\"\",\"permanent\":true,\"prices\":{\"USD\":\"2\",\"EUR\":\"1\"},\"sku\":\"1234\",\"user_attribute_conditions\":[{},{},{}]}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"name\":{\"en\":\"T-34-3\"},\"description\":{\"en\":\"Chinese Tier VIII medium tank.\"},\"long_description\":{\"en\":\"This Chinese Tier VIII medium tank is a real beast in its class.\"},\"enabled\":true,\"item_code\":\"chinese-medium-tank\",\"advertisement_type\":null,\"item_type\":null,\"keywords\":{},\"groups\":[],\"default_currency\":\"USD\",\"expiration\":null,\"image_url\":\"\",\"permanent\":true,\"prices\":{\"USD\":\"2\",\"EUR\":\"1\"},\"sku\":\"1234\",\"user_attribute_conditions\":[{},{},{}]}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items")
  .post(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "name": {
    "en": "T-34-3"
  },
  "description": {
    "en": "Chinese Tier VIII medium tank."
  },
  "long_description": {
    "en": "This Chinese Tier VIII medium tank is a real beast in its class."
  },
  "enabled": true,
  "item_code": "chinese-medium-tank",
  "advertisement_type": null,
  "item_type": null,
  "keywords": {},
  "groups": [],
  "default_currency": "USD",
  "expiration": null,
  "image_url": "",
  "permanent": true,
  "prices": {
    "USD": "2",
    "EUR": "1"
  },
  "sku": "1234",
  "user_attribute_conditions": [
    {},
    {},
    {}
  ]
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "item_id": 163099
}
{
  "item_id": 163099
}
{
  "item_id": 163099
}
{
  "item_id": 163099
}
{
  "item_id": 163099
}
{
  "item_id": 163099
}
{
  "item_id": 163099
}
{
  "item_id": 163099
}

获取物品

获取虚拟物品。

HTTP请求

GET https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}

参数类型描述
item_id
integer物品ID。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id} \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "advertisement_type": null,
  "default_currency": "USD",
  "deleted": false,
  "description": {
    "en": "Chinese Tier VIII medium tank."
  },
  "enabled": true,
  "expiration": null,
  "groups": [],
  "id": 163099,
  "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
  "item_code": "chinese-medium-tank",
  "item_type": null,
  "keywords": [],
  "long_description": {
    "en": "This Chinese Tier VIII medium tank is a real beast in its class."
  },
  "name": {
    "en": "T-34-3"
  },
  "permanent": true,
  "prices": {
    "EUR": 1,
    "USD": 2
  },
  "purchase_limit": null,
  "secondary_market": [],
  "sku": "1234",
  "user_attribute_conditions": [],
  "virtual_currency_price": null
}
{
  "advertisement_type": null,
  "default_currency": "USD",
  "deleted": false,
  "description": {
    "en": "Chinese Tier VIII medium tank."
  },
  "enabled": true,
  "expiration": null,
  "groups": [],
  "id": 163099,
  "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
  "item_code": "chinese-medium-tank",
  "item_type": null,
  "keywords": [],
  "long_description": {
    "en": "This Chinese Tier VIII medium tank is a real beast in its class."
  },
  "name": {
    "en": "T-34-3"
  },
  "permanent": true,
  "prices": {
    "EUR": 1,
    "USD": 2
  },
  "purchase_limit": null,
  "secondary_market": [],
  "sku": "1234",
  "user_attribute_conditions": [],
  "virtual_currency_price": null
}
{
  "advertisement_type": null,
  "default_currency": "USD",
  "deleted": false,
  "description": {
    "en": "Chinese Tier VIII medium tank."
  },
  "enabled": true,
  "expiration": null,
  "groups": [],
  "id": 163099,
  "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
  "item_code": "chinese-medium-tank",
  "item_type": null,
  "keywords": [],
  "long_description": {
    "en": "This Chinese Tier VIII medium tank is a real beast in its class."
  },
  "name": {
    "en": "T-34-3"
  },
  "permanent": true,
  "prices": {
    "EUR": 1,
    "USD": 2
  },
  "purchase_limit": null,
  "secondary_market": [],
  "sku": "1234",
  "user_attribute_conditions": [],
  "virtual_currency_price": null
}
{
  "advertisement_type": null,
  "default_currency": "USD",
  "deleted": false,
  "description": {
    "en": "Chinese Tier VIII medium tank."
  },
  "enabled": true,
  "expiration": null,
  "groups": [],
  "id": 163099,
  "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
  "item_code": "chinese-medium-tank",
  "item_type": null,
  "keywords": [],
  "long_description": {
    "en": "This Chinese Tier VIII medium tank is a real beast in its class."
  },
  "name": {
    "en": "T-34-3"
  },
  "permanent": true,
  "prices": {
    "EUR": 1,
    "USD": 2
  },
  "purchase_limit": null,
  "secondary_market": [],
  "sku": "1234",
  "user_attribute_conditions": [],
  "virtual_currency_price": null
}
{
  "advertisement_type": null,
  "default_currency": "USD",
  "deleted": false,
  "description": {
    "en": "Chinese Tier VIII medium tank."
  },
  "enabled": true,
  "expiration": null,
  "groups": [],
  "id": 163099,
  "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
  "item_code": "chinese-medium-tank",
  "item_type": null,
  "keywords": [],
  "long_description": {
    "en": "This Chinese Tier VIII medium tank is a real beast in its class."
  },
  "name": {
    "en": "T-34-3"
  },
  "permanent": true,
  "prices": {
    "EUR": 1,
    "USD": 2
  },
  "purchase_limit": null,
  "secondary_market": [],
  "sku": "1234",
  "user_attribute_conditions": [],
  "virtual_currency_price": null
}
{
  "advertisement_type": null,
  "default_currency": "USD",
  "deleted": false,
  "description": {
    "en": "Chinese Tier VIII medium tank."
  },
  "enabled": true,
  "expiration": null,
  "groups": [],
  "id": 163099,
  "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
  "item_code": "chinese-medium-tank",
  "item_type": null,
  "keywords": [],
  "long_description": {
    "en": "This Chinese Tier VIII medium tank is a real beast in its class."
  },
  "name": {
    "en": "T-34-3"
  },
  "permanent": true,
  "prices": {
    "EUR": 1,
    "USD": 2
  },
  "purchase_limit": null,
  "secondary_market": [],
  "sku": "1234",
  "user_attribute_conditions": [],
  "virtual_currency_price": null
}
{
  "advertisement_type": null,
  "default_currency": "USD",
  "deleted": false,
  "description": {
    "en": "Chinese Tier VIII medium tank."
  },
  "enabled": true,
  "expiration": null,
  "groups": [],
  "id": 163099,
  "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
  "item_code": "chinese-medium-tank",
  "item_type": null,
  "keywords": [],
  "long_description": {
    "en": "This Chinese Tier VIII medium tank is a real beast in its class."
  },
  "name": {
    "en": "T-34-3"
  },
  "permanent": true,
  "prices": {
    "EUR": 1,
    "USD": 2
  },
  "purchase_limit": null,
  "secondary_market": [],
  "sku": "1234",
  "user_attribute_conditions": [],
  "virtual_currency_price": null
}
{
  "advertisement_type": null,
  "default_currency": "USD",
  "deleted": false,
  "description": {
    "en": "Chinese Tier VIII medium tank."
  },
  "enabled": true,
  "expiration": null,
  "groups": [],
  "id": 163099,
  "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
  "item_code": "chinese-medium-tank",
  "item_type": null,
  "keywords": [],
  "long_description": {
    "en": "This Chinese Tier VIII medium tank is a real beast in its class."
  },
  "name": {
    "en": "T-34-3"
  },
  "permanent": true,
  "prices": {
    "EUR": 1,
    "USD": 2
  },
  "purchase_limit": null,
  "secondary_market": [],
  "sku": "1234",
  "user_attribute_conditions": [],
  "virtual_currency_price": null
}

更新物品

更新虚拟物品。

HTTP请求

PUT https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}

参数类型描述
item_id
integer物品ID。
sku
string唯一物品ID。SKU只能包含小写英文字母、连字符和下划线。更新SKU后,需重新配置所有小组件。已安装的小组件将停止工作。
item_code
string物品附加代码。 可选
name
array of strings物品本地化名称的数组。
description
array of strings物品本地化描述的数组。
long_description
array of strings物品本地化详细描述的数组。
prices
array物品价格数组。
default_currency
string默认购买货币。参照ISO 4217标准的三位数字代码。
enabled
boolean启用物品。
permanent
boolean如为'true',则该物品仅可购买一次。
image_url
string图像URL。
item_type
string物品的类型:消耗品/期限品/永久品/宝箱/实物。
expiration
integer过期时间(秒)。仅用于“Expiration”物品类型
groups
array of integers物品所属组。
deleted
boolean物品是否已删除。
user_attribute_conditions
array of objects用户属性条件列表。
user_attribute_conditions.right_operand
array用户属性对比值。
user_attribute_conditions.user_attribute_key
string用户属性条件键。
user_attribute_conditions.operation
string操作类型。可以是'greater'、'greaterOrEqual'、'equal'、'notEqual'、'less'、'lessOrEqual'、'between'、'in'、'notIn'。
user_attribute_conditions.action
string动作类型。可以是'hide'、'block'、'warning'。
advertisement_type
string付款UI中为物品显示的特殊横幅类型。可以是'recommended'、'best_deal'、'special_offer'、'null'。
virtual_currency_price
integer以游戏内货币计算的价格。如果为'null',则物品仅能通过真实货币购买。
purchase_limit
integer物品可购买的次数。如果为'null',则购买次数无限制。
keywords
array用于在付款UI中查找物品的关键字。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
PUT https://api.xsolla.com/merchant/v2/projects/{project_id}virtual_items/items/{item_id}

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
  "advertisement_type": null,
  "default_currency": "USD",
  "description": {
    "en": "Chinese Tier VIII medium tank."
  },
  "enabled": true,
  "expiration": null,
  "groups": [],
  "image_url": "",
  "item_code": "ut et",
  "item_type": null,
  "keywords": {},
  "long_description": {
    "en": "This Chinese Tier VIII medium tank is a real beast in its class."
  },
  "name": {
    "en": "T-34-3"
  },
  "permanent": true,
  "prices": {
    "EUR": "4",
    "USD": "2"
  },
  "sku": "12394",
  "user_attribute_conditions": [
    {},
    {},
    {}
  ]
}
curl --request PUT \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}virtual_items/items/{item_id} \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"name":{"en":"T-34-3"},"description":{"en":"Chinese Tier VIII medium tank."},"long_description":{"en":"This Chinese Tier VIII medium tank is a real beast in its class."},"enabled":true,"item_code":"ut et","advertisement_type":null,"item_type":null,"keywords":{},"groups":[],"default_currency":"USD","expiration":null,"image_url":"","permanent":true,"prices":{"USD":"2","EUR":"4"},"sku":"12394","user_attribute_conditions":[{},{},{}]}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"name":{"en":"T-34-3"},"description":{"en":"Chinese Tier VIII medium tank."},"long_description":{"en":"This Chinese Tier VIII medium tank is a real beast in its class."},"enabled":true,"item_code":"ut et","advertisement_type":null,"item_type":null,"keywords":{},"groups":[],"default_currency":"USD","expiration":null,"image_url":"","permanent":true,"prices":{"USD":"2","EUR":"4"},"sku":"12394","user_attribute_conditions":[{},{},{}]}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}virtual_items/items/{item_id}');
$request->setRequestMethod('PUT');
$request->setBody($body);

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}virtual_items/items/{item_id}");
var request = new RestRequest(Method.PUT);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":{\"en\":\"T-34-3\"},\"description\":{\"en\":\"Chinese Tier VIII medium tank.\"},\"long_description\":{\"en\":\"This Chinese Tier VIII medium tank is a real beast in its class.\"},\"enabled\":true,\"item_code\":\"ut et\",\"advertisement_type\":null,\"item_type\":null,\"keywords\":{},\"groups\":[],\"default_currency\":\"USD\",\"expiration\":null,\"image_url\":\"\",\"permanent\":true,\"prices\":{\"USD\":\"2\",\"EUR\":\"4\"},\"sku\":\"12394\",\"user_attribute_conditions\":[{},{},{}]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"name\":{\"en\":\"T-34-3\"},\"description\":{\"en\":\"Chinese Tier VIII medium tank.\"},\"long_description\":{\"en\":\"This Chinese Tier VIII medium tank is a real beast in its class.\"},\"enabled\":true,\"item_code\":\"ut et\",\"advertisement_type\":null,\"item_type\":null,\"keywords\":{},\"groups\":[],\"default_currency\":\"USD\",\"expiration\":null,\"image_url\":\"\",\"permanent\":true,\"prices\":{\"USD\":\"2\",\"EUR\":\"4\"},\"sku\":\"12394\",\"user_attribute_conditions\":[{},{},{}]}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("PUT", "/merchant/v2/projects/{project_id}virtual_items/items/{item_id}", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}virtual_items/items/{item_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"name\":{\"en\":\"T-34-3\"},\"description\":{\"en\":\"Chinese Tier VIII medium tank.\"},\"long_description\":{\"en\":\"This Chinese Tier VIII medium tank is a real beast in its class.\"},\"enabled\":true,\"item_code\":\"ut et\",\"advertisement_type\":null,\"item_type\":null,\"keywords\":{},\"groups\":[],\"default_currency\":\"USD\",\"expiration\":null,\"image_url\":\"\",\"permanent\":true,\"prices\":{\"USD\":\"2\",\"EUR\":\"4\"},\"sku\":\"12394\",\"user_attribute_conditions\":[{},{},{}]}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"name\":{\"en\":\"T-34-3\"},\"description\":{\"en\":\"Chinese Tier VIII medium tank.\"},\"long_description\":{\"en\":\"This Chinese Tier VIII medium tank is a real beast in its class.\"},\"enabled\":true,\"item_code\":\"ut et\",\"advertisement_type\":null,\"item_type\":null,\"keywords\":{},\"groups\":[],\"default_currency\":\"USD\",\"expiration\":null,\"image_url\":\"\",\"permanent\":true,\"prices\":{\"USD\":\"2\",\"EUR\":\"4\"},\"sku\":\"12394\",\"user_attribute_conditions\":[{},{},{}]}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}virtual_items/items/{item_id}")
  .put(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "name": {
    "en": "T-34-3"
  },
  "description": {
    "en": "Chinese Tier VIII medium tank."
  },
  "long_description": {
    "en": "This Chinese Tier VIII medium tank is a real beast in its class."
  },
  "enabled": true,
  "item_code": "ut et",
  "advertisement_type": null,
  "item_type": null,
  "keywords": {},
  "groups": [],
  "default_currency": "USD",
  "expiration": null,
  "image_url": "",
  "permanent": true,
  "prices": {
    "USD": "2",
    "EUR": "4"
  },
  "sku": "12394",
  "user_attribute_conditions": [
    {},
    {},
    {}
  ]
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.xsolla.com/merchant/v2/projects/{project_id}virtual_items/items/{item_id}");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应


删除物品

删除虚拟物品。

HTTP请求

DELETE https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}

参数类型描述
item_id
integer物品ID。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
DELETE https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request DELETE \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id} \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}');
$request->setRequestMethod('DELETE');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}");
var request = new RestRequest(Method.DELETE);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("DELETE", "/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}")
  .delete(null)
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items/{item_id}");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应


获取物品列表

列示虚拟物品。

HTTP请求

GET https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items

参数类型描述
project_id
integer项目ID。
offset
integer元素编号,从该元素开始生成列表(从0开始数)。
limit
integer页面上元素数量的限制。
has_price
string可以是'virtual_currency'(如果可以使用虚拟货币购买物品)或'real_currency'(如果可以使用真实货币购买物品)。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/projects/{project_id}/virtual_items/items", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
HttpResponse<String> response = Unirest.get("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items")
  .header("authorization", "Basic <your_authorization_basic_key>")
  .asString();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/items");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
[
  {
    "advertisement_type": "recommended",
    "default_currency": "USD",
    "enabled": false,
    "groups": [
      9196
    ],
    "id": 163076,
    "localized_name": "Rabbit",
    "permanent": false,
    "prices": {
      "CNY": 5.99,
      "EUR": 1,
      "KRW": 999,
      "RUB": 59.99,
      "USD": 1
    },
    "sku": "1468",
    "virtual_currency_price": 400
  },
  {
    "advertisement_type": null,
    "default_currency": "USD",
    "enabled": true,
    "groups": [
      9196
    ],
    "id": 163077,
    "localized_name": "Chicken",
    "permanent": false,
    "prices": {
      "CNY": 5.99,
      "EUR": 1,
      "KRW": 999,
      "RUB": 59.99,
      "USD": 1
    },
    "sku": "1469",
    "virtual_currency_price": 600
  }
]
[
  {
    "advertisement_type": "recommended",
    "default_currency": "USD",
    "enabled": false,
    "groups": [
      9196
    ],
    "id": 163076,
    "localized_name": "Rabbit",
    "permanent": false,
    "prices": {
      "CNY": 5.99,
      "EUR": 1,
      "KRW": 999,
      "RUB": 59.99,
      "USD": 1
    },
    "sku": "1468",
    "virtual_currency_price": 400
  },
  {
    "advertisement_type": null,
    "default_currency": "USD",
    "enabled": true,
    "groups": [
      9196
    ],
    "id": 163077,
    "localized_name": "Chicken",
    "permanent": false,
    "prices": {
      "CNY": 5.99,
      "EUR": 1,
      "KRW": 999,
      "RUB": 59.99,
      "USD": 1
    },
    "sku": "1469",
    "virtual_currency_price": 600
  }
]
[
  {
    "advertisement_type": "recommended",
    "default_currency": "USD",
    "enabled": false,
    "groups": [
      9196
    ],
    "id": 163076,
    "localized_name": "Rabbit",
    "permanent": false,
    "prices": {
      "CNY": 5.99,
      "EUR": 1,
      "KRW": 999,
      "RUB": 59.99,
      "USD": 1
    },
    "sku": "1468",
    "virtual_currency_price": 400
  },
  {
    "advertisement_type": null,
    "default_currency": "USD",
    "enabled": true,
    "groups": [
      9196
    ],
    "id": 163077,
    "localized_name": "Chicken",
    "permanent": false,
    "prices": {
      "CNY": 5.99,
      "EUR": 1,
      "KRW": 999,
      "RUB": 59.99,
      "USD": 1
    },
    "sku": "1469",
    "virtual_currency_price": 600
  }
]
[
  {
    "advertisement_type": "recommended",
    "default_currency": "USD",
    "enabled": false,
    "groups": [
      9196
    ],
    "id": 163076,
    "localized_name": "Rabbit",
    "permanent": false,
    "prices": {
      "CNY": 5.99,
      "EUR": 1,
      "KRW": 999,
      "RUB": 59.99,
      "USD": 1
    },
    "sku": "1468",
    "virtual_currency_price": 400
  },
  {
    "advertisement_type": null,
    "default_currency": "USD",
    "enabled": true,
    "groups": [
      9196
    ],
    "id": 163077,
    "localized_name": "Chicken",
    "permanent": false,
    "prices": {
      "CNY": 5.99,
      "EUR": 1,
      "KRW": 999,
      "RUB": 59.99,
      "USD": 1
    },
    "sku": "1469",
    "virtual_currency_price": 600
  }
]
[
  {
    "advertisement_type": "recommended",
    "default_currency": "USD",
    "enabled": false,
    "groups": [
      9196
    ],
    "id": 163076,
    "localized_name": "Rabbit",
    "permanent": false,
    "prices": {
      "CNY": 5.99,
      "EUR": 1,
      "KRW": 999,
      "RUB": 59.99,
      "USD": 1
    },
    "sku": "1468",
    "virtual_currency_price": 400
  },
  {
    "advertisement_type": null,
    "default_currency": "USD",
    "enabled": true,
    "groups": [
      9196
    ],
    "id": 163077,
    "localized_name": "Chicken",
    "permanent": false,
    "prices": {
      "CNY": 5.99,
      "EUR": 1,
      "KRW": 999,
      "RUB": 59.99,
      "USD": 1
    },
    "sku": "1469",
    "virtual_currency_price": 600
  }
]
[
  {
    "advertisement_type": "recommended",
    "default_currency": "USD",
    "enabled": false,
    "groups": [
      9196
    ],
    "id": 163076,
    "localized_name": "Rabbit",
    "permanent": false,
    "prices": {
      "CNY": 5.99,
      "EUR": 1,
      "KRW": 999,
      "RUB": 59.99,
      "USD": 1
    },
    "sku": "1468",
    "virtual_currency_price": 400
  },
  {
    "advertisement_type": null,
    "default_currency": "USD",
    "enabled": true,
    "groups": [
      9196
    ],
    "id": 163077,
    "localized_name": "Chicken",
    "permanent": false,
    "prices": {
      "CNY": 5.99,
      "EUR": 1,
      "KRW": 999,
      "RUB": 59.99,
      "USD": 1
    },
    "sku": "1469",
    "virtual_currency_price": 600
  }
]
[
  {
    "advertisement_type": "recommended",
    "default_currency": "USD",
    "enabled": false,
    "groups": [
      9196
    ],
    "id": 163076,
    "localized_name": "Rabbit",
    "permanent": false,
    "prices": {
      "CNY": 5.99,
      "EUR": 1,
      "KRW": 999,
      "RUB": 59.99,
      "USD": 1
    },
    "sku": "1468",
    "virtual_currency_price": 400
  },
  {
    "advertisement_type": null,
    "default_currency": "USD",
    "enabled": true,
    "groups": [
      9196
    ],
    "id": 163077,
    "localized_name": "Chicken",
    "permanent": false,
    "prices": {
      "CNY": 5.99,
      "EUR": 1,
      "KRW": 999,
      "RUB": 59.99,
      "USD": 1
    },
    "sku": "1469",
    "virtual_currency_price": 600
  }
]
[
  {
    "advertisement_type": "recommended",
    "default_currency": "USD",
    "enabled": false,
    "groups": [
      9196
    ],
    "id": 163076,
    "localized_name": "Rabbit",
    "permanent": false,
    "prices": {
      "CNY": 5.99,
      "EUR": 1,
      "KRW": 999,
      "RUB": 59.99,
      "USD": 1
    },
    "sku": "1468",
    "virtual_currency_price": 400
  },
  {
    "advertisement_type": null,
    "default_currency": "USD",
    "enabled": true,
    "groups": [
      9196
    ],
    "id": 163077,
    "localized_name": "Chicken",
    "permanent": false,
    "prices": {
      "CNY": 5.99,
      "EUR": 1,
      "KRW": 999,
      "RUB": 59.99,
      "USD": 1
    },
    "sku": "1469",
    "virtual_currency_price": 600
  }
]

创建组

创建虚拟物品组。

HTTP请求

POST https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups

参数类型描述
project_id
integer项目ID。
name
array of strings物品组本地化名称的数组。
description
array of strings物品组本地化描述的数组。
enabled
boolean是否可以使用此组。
parent_id
integer父组ID。
code
integer组的唯一代码。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
POST https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
  "code": "2",
  "description": {
    "en": "Farm animals"
  },
  "enabled": true,
  "name": {
    "en": "Animals"
  },
  "parent_id": "9182"
}
curl --request POST \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"name":{"en":"Animals"},"description":{"en":"Farm animals"},"enabled":true,"code":"2","parent_id":"9182"}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"name":{"en":"Animals"},"description":{"en":"Farm animals"},"enabled":true,"code":"2","parent_id":"9182"}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups");
var request = new RestRequest(Method.POST);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":{\"en\":\"Animals\"},\"description\":{\"en\":\"Farm animals\"},\"enabled\":true,\"code\":\"2\",\"parent_id\":\"9182\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"name\":{\"en\":\"Animals\"},\"description\":{\"en\":\"Farm animals\"},\"enabled\":true,\"code\":\"2\",\"parent_id\":\"9182\"}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("POST", "/merchant/v2/projects/{project_id}/virtual_items/groups", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"name\":{\"en\":\"Animals\"},\"description\":{\"en\":\"Farm animals\"},\"enabled\":true,\"code\":\"2\",\"parent_id\":\"9182\"}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"name\":{\"en\":\"Animals\"},\"description\":{\"en\":\"Farm animals\"},\"enabled\":true,\"code\":\"2\",\"parent_id\":\"9182\"}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups")
  .post(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "name": {
    "en": "Animals"
  },
  "description": {
    "en": "Farm animals"
  },
  "enabled": true,
  "code": "2",
  "parent_id": "9182"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "group_id": 9208
}
{
  "group_id": 9208
}
{
  "group_id": 9208
}
{
  "group_id": 9208
}
{
  "group_id": 9208
}
{
  "group_id": 9208
}
{
  "group_id": 9208
}
{
  "group_id": 9208
}

获取组

获取虚拟物品组。

HTTP请求

GET https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}

参数类型描述
group_id
string组的ID。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id} \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "code": "2",
  "description": {
    "en": "Farm animals"
  },
  "enabled": true,
  "id": 9208,
  "name": {
    "en": "Animals"
  },
  "parent_id": 9182
}
{
  "code": "2",
  "description": {
    "en": "Farm animals"
  },
  "enabled": true,
  "id": 9208,
  "name": {
    "en": "Animals"
  },
  "parent_id": 9182
}
{
  "code": "2",
  "description": {
    "en": "Farm animals"
  },
  "enabled": true,
  "id": 9208,
  "name": {
    "en": "Animals"
  },
  "parent_id": 9182
}
{
  "code": "2",
  "description": {
    "en": "Farm animals"
  },
  "enabled": true,
  "id": 9208,
  "name": {
    "en": "Animals"
  },
  "parent_id": 9182
}
{
  "code": "2",
  "description": {
    "en": "Farm animals"
  },
  "enabled": true,
  "id": 9208,
  "name": {
    "en": "Animals"
  },
  "parent_id": 9182
}
{
  "code": "2",
  "description": {
    "en": "Farm animals"
  },
  "enabled": true,
  "id": 9208,
  "name": {
    "en": "Animals"
  },
  "parent_id": 9182
}
{
  "code": "2",
  "description": {
    "en": "Farm animals"
  },
  "enabled": true,
  "id": 9208,
  "name": {
    "en": "Animals"
  },
  "parent_id": 9182
}
{
  "code": "2",
  "description": {
    "en": "Farm animals"
  },
  "enabled": true,
  "id": 9208,
  "name": {
    "en": "Animals"
  },
  "parent_id": 9182
}

更新组

更新虚拟物品组。

HTTP请求

PUT https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}

参数类型描述
group_id
string组的ID。
name
array of strings物品组本地化名称的数组。
description
array of strings物品组本地化描述的数组。
enabled
boolean是否可以使用此组。
parent_id
integer父组ID。
code
integer组的唯一代码。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
PUT https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
  "code": "2",
  "description": {
    "en": "Farm animals and plants"
  },
  "enabled": true,
  "name": {
    "en": "Animals and plants"
  },
  "parent_id": "9182"
}
curl --request PUT \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id} \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"name":{"en":"Animals and plants"},"description":{"en":"Farm animals and plants"},"enabled":true,"code":"2","parent_id":"9182"}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"name":{"en":"Animals and plants"},"description":{"en":"Farm animals and plants"},"enabled":true,"code":"2","parent_id":"9182"}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}');
$request->setRequestMethod('PUT');
$request->setBody($body);

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}");
var request = new RestRequest(Method.PUT);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":{\"en\":\"Animals and plants\"},\"description\":{\"en\":\"Farm animals and plants\"},\"enabled\":true,\"code\":\"2\",\"parent_id\":\"9182\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"name\":{\"en\":\"Animals and plants\"},\"description\":{\"en\":\"Farm animals and plants\"},\"enabled\":true,\"code\":\"2\",\"parent_id\":\"9182\"}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("PUT", "/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"name\":{\"en\":\"Animals and plants\"},\"description\":{\"en\":\"Farm animals and plants\"},\"enabled\":true,\"code\":\"2\",\"parent_id\":\"9182\"}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"name\":{\"en\":\"Animals and plants\"},\"description\":{\"en\":\"Farm animals and plants\"},\"enabled\":true,\"code\":\"2\",\"parent_id\":\"9182\"}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}")
  .put(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "name": {
    "en": "Animals and plants"
  },
  "description": {
    "en": "Farm animals and plants"
  },
  "enabled": true,
  "code": "2",
  "parent_id": "9182"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应


删除组

删除虚拟物品组。

HTTP请求

DELETE https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}

参数类型描述
group_id
string组的ID。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
DELETE https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request DELETE \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id} \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}');
$request->setRequestMethod('DELETE');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}");
var request = new RestRequest(Method.DELETE);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("DELETE", "/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}")
  .delete(null)
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups/{group_id}");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应


获取物品组列表

列示所有虚拟物品组。

HTTP请求

GET https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups

参数类型描述
project_id
integer项目ID。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/projects/{project_id}/virtual_items/groups", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/projects/{project_id}/virtual_items/groups");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
[
  {
    "code": null,
    "enabled": true,
    "has_groups": false,
    "has_virtual_items": true,
    "id": 9196,
    "localized_name": "Pets",
    "parent_id": null,
    "virtual_items_count": 8
  },
  {
    "code": null,
    "enabled": true,
    "has_groups": false,
    "has_virtual_items": true,
    "id": 9197,
    "localized_name": "Food",
    "parent_id": null,
    "virtual_items_count": 7
  }
]
[
  {
    "code": null,
    "enabled": true,
    "has_groups": false,
    "has_virtual_items": true,
    "id": 9196,
    "localized_name": "Pets",
    "parent_id": null,
    "virtual_items_count": 8
  },
  {
    "code": null,
    "enabled": true,
    "has_groups": false,
    "has_virtual_items": true,
    "id": 9197,
    "localized_name": "Food",
    "parent_id": null,
    "virtual_items_count": 7
  }
]
[
  {
    "code": null,
    "enabled": true,
    "has_groups": false,
    "has_virtual_items": true,
    "id": 9196,
    "localized_name": "Pets",
    "parent_id": null,
    "virtual_items_count": 8
  },
  {
    "code": null,
    "enabled": true,
    "has_groups": false,
    "has_virtual_items": true,
    "id": 9197,
    "localized_name": "Food",
    "parent_id": null,
    "virtual_items_count": 7
  }
]
[
  {
    "code": null,
    "enabled": true,
    "has_groups": false,
    "has_virtual_items": true,
    "id": 9196,
    "localized_name": "Pets",
    "parent_id": null,
    "virtual_items_count": 8
  },
  {
    "code": null,
    "enabled": true,
    "has_groups": false,
    "has_virtual_items": true,
    "id": 9197,
    "localized_name": "Food",
    "parent_id": null,
    "virtual_items_count": 7
  }
]
[
  {
    "code": null,
    "enabled": true,
    "has_groups": false,
    "has_virtual_items": true,
    "id": 9196,
    "localized_name": "Pets",
    "parent_id": null,
    "virtual_items_count": 8
  },
  {
    "code": null,
    "enabled": true,
    "has_groups": false,
    "has_virtual_items": true,
    "id": 9197,
    "localized_name": "Food",
    "parent_id": null,
    "virtual_items_count": 7
  }
]
[
  {
    "code": null,
    "enabled": true,
    "has_groups": false,
    "has_virtual_items": true,
    "id": 9196,
    "localized_name": "Pets",
    "parent_id": null,
    "virtual_items_count": 8
  },
  {
    "code": null,
    "enabled": true,
    "has_groups": false,
    "has_virtual_items": true,
    "id": 9197,
    "localized_name": "Food",
    "parent_id": null,
    "virtual_items_count": 7
  }
]
[
  {
    "code": null,
    "enabled": true,
    "has_groups": false,
    "has_virtual_items": true,
    "id": 9196,
    "localized_name": "Pets",
    "parent_id": null,
    "virtual_items_count": 8
  },
  {
    "code": null,
    "enabled": true,
    "has_groups": false,
    "has_virtual_items": true,
    "id": 9197,
    "localized_name": "Food",
    "parent_id": null,
    "virtual_items_count": 7
  }
]
[
  {
    "code": null,
    "enabled": true,
    "has_groups": false,
    "has_virtual_items": true,
    "id": 9196,
    "localized_name": "Pets",
    "parent_id": null,
    "virtual_items_count": 8
  },
  {
    "code": null,
    "enabled": true,
    "has_groups": false,
    "has_virtual_items": true,
    "id": 9197,
    "localized_name": "Food",
    "parent_id": null,
    "virtual_items_count": 7
  }
]

用户属性

创建属性

创建用户属性。

HTTP请求

POST https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes

参数类型描述
project_id
integer项目ID。 必需
key
string用户属性键值。 必需
name
array of strings用户属性本地化名称的数组。 必需
type
string键值类型。可以是'int'、'string'、'enum'或'date'。 必需
list_of_values
arrayenum类型可能值的数组。 必需
skip_condition_on_nonexistent_key
boolean键值不存在时是否应跳过条件。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
POST https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
  "key": "13",
  "list_of_values": [
    {},
    {},
    {},
    {}
  ],
  "name": {
    "en": "Rating",
    "ru": "Рейтинг"
  },
  "skip_condition_on_nonexistent_key": true,
  "type": "int",
  "visible": false
}
curl --request POST \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"key":"13","name":{"en":"Rating","ru":"Рейтинг"},"type":"int","list_of_values":[{},{},{},{}],"visible":false,"skip_condition_on_nonexistent_key":true}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"key":"13","name":{"en":"Rating","ru":"Рейтинг"},"type":"int","list_of_values":[{},{},{},{}],"visible":false,"skip_condition_on_nonexistent_key":true}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes");
var request = new RestRequest(Method.POST);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"key\":\"13\",\"name\":{\"en\":\"Rating\",\"ru\":\"Рейтинг\"},\"type\":\"int\",\"list_of_values\":[{},{},{},{}],\"visible\":false,\"skip_condition_on_nonexistent_key\":true}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"key\":\"13\",\"name\":{\"en\":\"Rating\",\"ru\":\"Рейтинг\"},\"type\":\"int\",\"list_of_values\":[{},{},{},{}],\"visible\":false,\"skip_condition_on_nonexistent_key\":true}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("POST", "/merchant/v2/projects/{project_id}/user_attributes", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"key\":\"13\",\"name\":{\"en\":\"Rating\",\"ru\":\"Рейтинг\"},\"type\":\"int\",\"list_of_values\":[{},{},{},{}],\"visible\":false,\"skip_condition_on_nonexistent_key\":true}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"key\":\"13\",\"name\":{\"en\":\"Rating\",\"ru\":\"Рейтинг\"},\"type\":\"int\",\"list_of_values\":[{},{},{},{}],\"visible\":false,\"skip_condition_on_nonexistent_key\":true}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes")
  .post(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "key": "13",
  "name": {
    "en": "Rating",
    "ru": "Рейтинг"
  },
  "type": "int",
  "list_of_values": [
    {},
    {},
    {},
    {}
  ],
  "visible": false,
  "skip_condition_on_nonexistent_key": true
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "id": 11427
}
{
  "id": 11427
}
{
  "id": 11427
}
{
  "id": 11427
}
{
  "id": 11427
}
{
  "id": 11427
}
{
  "id": 11427
}
{
  "id": 11427
}

获取属性

显示用户属性

HTTP请求

GET https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{user_attribute_id}

参数Type描述
project_id
integer项目ID。
user_attribute_id
integer用户属性ID。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/11425

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/11425 \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/11425');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/11425");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/projects/{project_id}/user_attributes/11425", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/11425")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/11425")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/11425");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "id": 11425,
  "key": "12",
  "list_of_values": [],
  "localized_name": "Level",
  "name": {
    "en": "Level",
    "ru": "Уровень"
  },
  "skip_condition_on_nonexistent_key": true,
  "type": "int",
  "visible": false
}
{
  "id": 11425,
  "key": "12",
  "list_of_values": [],
  "localized_name": "Level",
  "name": {
    "en": "Level",
    "ru": "Уровень"
  },
  "skip_condition_on_nonexistent_key": true,
  "type": "int",
  "visible": false
}
{
  "id": 11425,
  "key": "12",
  "list_of_values": [],
  "localized_name": "Level",
  "name": {
    "en": "Level",
    "ru": "Уровень"
  },
  "skip_condition_on_nonexistent_key": true,
  "type": "int",
  "visible": false
}
{
  "id": 11425,
  "key": "12",
  "list_of_values": [],
  "localized_name": "Level",
  "name": {
    "en": "Level",
    "ru": "Уровень"
  },
  "skip_condition_on_nonexistent_key": true,
  "type": "int",
  "visible": false
}
{
  "id": 11425,
  "key": "12",
  "list_of_values": [],
  "localized_name": "Level",
  "name": {
    "en": "Level",
    "ru": "Уровень"
  },
  "skip_condition_on_nonexistent_key": true,
  "type": "int",
  "visible": false
}
{
  "id": 11425,
  "key": "12",
  "list_of_values": [],
  "localized_name": "Level",
  "name": {
    "en": "Level",
    "ru": "Уровень"
  },
  "skip_condition_on_nonexistent_key": true,
  "type": "int",
  "visible": false
}
{
  "id": 11425,
  "key": "12",
  "list_of_values": [],
  "localized_name": "Level",
  "name": {
    "en": "Level",
    "ru": "Уровень"
  },
  "skip_condition_on_nonexistent_key": true,
  "type": "int",
  "visible": false
}
{
  "id": 11425,
  "key": "12",
  "list_of_values": [],
  "localized_name": "Level",
  "name": {
    "en": "Level",
    "ru": "Уровень"
  },
  "skip_condition_on_nonexistent_key": true,
  "type": "int",
  "visible": false
}

更新属性

更新用户属性。

HTTP请求

PUT https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{user_attribute_id}

参数类型描述
project_id
integer项目ID。
user_attribute_id
integer用户属性ID。
key
string用户属性键值。 必需
name
array of strings用户属性本地化名称的数组。 必需
type
string键值类型。可以是'int'、'string'、'enum'或'date'。 必需
list_of_values
arrayenum类型可能值的数组。 必需
skip_condition_on_nonexistent_key
boolean键值不存在时是否应跳过条件。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
PUT https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{attribute_id}

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
  "key": "13",
  "list_of_values": [
    {},
    {},
    {},
    {}
  ],
  "name": {
    "en": "User rating",
    "ru": "Рейтинг пользователя"
  },
  "skip_condition_on_nonexistent_key": true,
  "type": "int",
  "visible": true
}
curl --request PUT \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{attribute_id} \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"key":"13","name":{"en":"User rating","ru":"Рейтинг пользователя"},"type":"int","list_of_values":[{},{},{},{}],"visible":true,"skip_condition_on_nonexistent_key":true}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"key":"13","name":{"en":"User rating","ru":"Рейтинг пользователя"},"type":"int","list_of_values":[{},{},{},{}],"visible":true,"skip_condition_on_nonexistent_key":true}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{attribute_id}');
$request->setRequestMethod('PUT');
$request->setBody($body);

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{attribute_id}");
var request = new RestRequest(Method.PUT);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"key\":\"13\",\"name\":{\"en\":\"User rating\",\"ru\":\"Рейтинг пользователя\"},\"type\":\"int\",\"list_of_values\":[{},{},{},{}],\"visible\":true,\"skip_condition_on_nonexistent_key\":true}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"key\":\"13\",\"name\":{\"en\":\"User rating\",\"ru\":\"Рейтинг пользователя\"},\"type\":\"int\",\"list_of_values\":[{},{},{},{}],\"visible\":true,\"skip_condition_on_nonexistent_key\":true}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("PUT", "/merchant/v2/projects/{project_id}/user_attributes/{attribute_id}", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{attribute_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"key\":\"13\",\"name\":{\"en\":\"User rating\",\"ru\":\"Рейтинг пользователя\"},\"type\":\"int\",\"list_of_values\":[{},{},{},{}],\"visible\":true,\"skip_condition_on_nonexistent_key\":true}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"key\":\"13\",\"name\":{\"en\":\"User rating\",\"ru\":\"Рейтинг пользователя\"},\"type\":\"int\",\"list_of_values\":[{},{},{},{}],\"visible\":true,\"skip_condition_on_nonexistent_key\":true}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{attribute_id}")
  .put(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "key": "13",
  "name": {
    "en": "User rating",
    "ru": "Рейтинг пользователя"
  },
  "type": "int",
  "list_of_values": [
    {},
    {},
    {},
    {}
  ],
  "visible": true,
  "skip_condition_on_nonexistent_key": true
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{attribute_id}");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应


删除属性

删除用户属性。

HTTP请求

DELETE https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{user_attribute_id}

参数Type描述
project_id
integer项目ID。
user_attribute_id
integer用户属性ID。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
DELETE https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{attribute_id}

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request DELETE \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{attribute_id} \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{attribute_id}');
$request->setRequestMethod('DELETE');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{attribute_id}");
var request = new RestRequest(Method.DELETE);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("DELETE", "/merchant/v2/projects/{project_id}/user_attributes/{attribute_id}", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{attribute_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Delete.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{attribute_id}")
  .delete(null)
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("DELETE", "https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes/{attribute_id}");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应


获取属性列表

获取用户属性列表

HTTP请求

GET https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes

参数Type描述
project_id
integer项目ID。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/projects/{project_id}/user_attributes", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/projects/{project_id}/user_attributes");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
[
  {
    "id": 11425,
    "key": "12",
    "list_of_values": [],
    "localized_name": "Level",
    "name": {
      "en": "Level",
      "ru": "Уровень"
    },
    "skip_condition_on_nonexistent_key": true,
    "type": "int",
    "visible": false
  },
  {
    "id": 11426,
    "key": "11",
    "list_of_values": [],
    "localized_name": "Class",
    "name": {
      "en": "Class",
      "ru": "Класс"
    },
    "skip_condition_on_nonexistent_key": true,
    "type": "string",
    "visible": false
  }
]
[
  {
    "id": 11425,
    "key": "12",
    "list_of_values": [],
    "localized_name": "Level",
    "name": {
      "en": "Level",
      "ru": "Уровень"
    },
    "skip_condition_on_nonexistent_key": true,
    "type": "int",
    "visible": false
  },
  {
    "id": 11426,
    "key": "11",
    "list_of_values": [],
    "localized_name": "Class",
    "name": {
      "en": "Class",
      "ru": "Класс"
    },
    "skip_condition_on_nonexistent_key": true,
    "type": "string",
    "visible": false
  }
]
[
  {
    "id": 11425,
    "key": "12",
    "list_of_values": [],
    "localized_name": "Level",
    "name": {
      "en": "Level",
      "ru": "Уровень"
    },
    "skip_condition_on_nonexistent_key": true,
    "type": "int",
    "visible": false
  },
  {
    "id": 11426,
    "key": "11",
    "list_of_values": [],
    "localized_name": "Class",
    "name": {
      "en": "Class",
      "ru": "Класс"
    },
    "skip_condition_on_nonexistent_key": true,
    "type": "string",
    "visible": false
  }
]
[
  {
    "id": 11425,
    "key": "12",
    "list_of_values": [],
    "localized_name": "Level",
    "name": {
      "en": "Level",
      "ru": "Уровень"
    },
    "skip_condition_on_nonexistent_key": true,
    "type": "int",
    "visible": false
  },
  {
    "id": 11426,
    "key": "11",
    "list_of_values": [],
    "localized_name": "Class",
    "name": {
      "en": "Class",
      "ru": "Класс"
    },
    "skip_condition_on_nonexistent_key": true,
    "type": "string",
    "visible": false
  }
]
[
  {
    "id": 11425,
    "key": "12",
    "list_of_values": [],
    "localized_name": "Level",
    "name": {
      "en": "Level",
      "ru": "Уровень"
    },
    "skip_condition_on_nonexistent_key": true,
    "type": "int",
    "visible": false
  },
  {
    "id": 11426,
    "key": "11",
    "list_of_values": [],
    "localized_name": "Class",
    "name": {
      "en": "Class",
      "ru": "Класс"
    },
    "skip_condition_on_nonexistent_key": true,
    "type": "string",
    "visible": false
  }
]
[
  {
    "id": 11425,
    "key": "12",
    "list_of_values": [],
    "localized_name": "Level",
    "name": {
      "en": "Level",
      "ru": "Уровень"
    },
    "skip_condition_on_nonexistent_key": true,
    "type": "int",
    "visible": false
  },
  {
    "id": 11426,
    "key": "11",
    "list_of_values": [],
    "localized_name": "Class",
    "name": {
      "en": "Class",
      "ru": "Класс"
    },
    "skip_condition_on_nonexistent_key": true,
    "type": "string",
    "visible": false
  }
]
[
  {
    "id": 11425,
    "key": "12",
    "list_of_values": [],
    "localized_name": "Level",
    "name": {
      "en": "Level",
      "ru": "Уровень"
    },
    "skip_condition_on_nonexistent_key": true,
    "type": "int",
    "visible": false
  },
  {
    "id": 11426,
    "key": "11",
    "list_of_values": [],
    "localized_name": "Class",
    "name": {
      "en": "Class",
      "ru": "Класс"
    },
    "skip_condition_on_nonexistent_key": true,
    "type": "string",
    "visible": false
  }
]
[
  {
    "id": 11425,
    "key": "12",
    "list_of_values": [],
    "localized_name": "Level",
    "name": {
      "en": "Level",
      "ru": "Уровень"
    },
    "skip_condition_on_nonexistent_key": true,
    "type": "int",
    "visible": false
  },
  {
    "id": 11426,
    "key": "11",
    "list_of_values": [],
    "localized_name": "Class",
    "name": {
      "en": "Class",
      "ru": "Класс"
    },
    "skip_condition_on_nonexistent_key": true,
    "type": "string",
    "visible": false
  }
]

游戏密钥

创建实体

创建游戏交付实体。

HTTP请求

POST https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery

参数类型描述
project_id
integer项目ID。
sku
string物品唯一ID。SKU可能仅包含小写字母、数字、破折号和下划线。
name
object游戏交付实体本地化名称的数组。
description
object游戏交付实体本地化简单描述的数组。
system_requirements
string当前游戏的系统要求。
image_url
string图像URL。 可选
long_description
string游戏交付实体的详细描述。 可选
locales_list
string本地化语种列表,使用逗号分隔。 可选
发布商
string游戏的发行商。 可选
developer
string游戏的开发商。 可选
string游戏相关视频的链接。 可选
genre
string游戏类型。 可选
additional_info
string游戏的附加信息。 可选
string论坛的链接。 可选
string提供支持的联系人网页链接。 可选
old_price
string游戏的原价。 可选
parent_id
integer父游戏ID。 可选
default_currency
string默认购买货币。参照ISO 4217标准的三字母货币代码。
delivery
object预订密钥的交付日期。
delivery.release_date_type
string发布日期类型。可设置为具体的UTC日期或设置为一年中的某一季度。如为后者,'delivery.release_date_type'将设置为指定季度的最后一天。
delivery.delivery_method
string密钥交付方式。
delivery.delivery_method.default
string默认密钥交付方式。
delivery.delivery_method.exception
string密钥交付方式例外。
release_date
string游戏的预计发布日期。 可选
drm
array带有DRM相关数据的数组。
drm.id
integer可用于本游戏的DRM的ID。
drm.name
integerDRM名称。
drm.prices
arrayDRM游戏价格数组。 可选
drm.codes
arrayDRM的密钥数组。 可选
drm.codes.total
string密钥总数。 可选
drm.codes.active
string活动密钥个数。 可选
drm.codes.used
string已用密钥个数。 可选
drm.platforms
array带有DRM平台相关数据的数组。
drm.platforms.id
integer此DRM支持的平台的ID。
drm.enabled
boolean是否对此游戏启用DRM。
obtain_code_from_db
boolean是否使用艾克索拉数据库游戏密钥。 可选
obtain_code_from_api
boolean是否使用通过API收到的游戏密钥。 可选
files
array下载的安装文件的数组。 可选
files.name
string文件名。 可选
files.url
string下载URL。 可选
tips_enabled
boolean是否为开发者启用打赏。 可选
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
POST https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
  "default_currency": "USD",
  "delivery": {
    "delivery_method": {
      "default": [
        "key"
      ],
      "exceptions": {}
    },
    "is_partner_side_processing": true,
    "is_pre_order": true,
    "release_date_type": "quarter"
  },
  "description": {
    "en": "A good new game"
  },
  "drm": [
    {
      "enabled": true,
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "name": "Steam",
      "platforms": [
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "enabled": true,
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        }
      ]
    },
    {
      "enabled": true,
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "name": "XBox",
      "platforms": [
        {
          "id": 7,
          "name": "XBox 360"
        }
      ]
    },
    {
      "enabled": false,
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "name": "Uplay",
      "platforms": []
    },
    {
      "enabled": false,
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "name": "Origin",
      "platforms": []
    },
    {
      "enabled": true,
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "is_autoredeem_enabled": false,
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        }
      ]
    },
    {
      "enabled": false,
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "name": "GOG",
      "platforms": []
    }
  ],
  "files": [],
  "name": {
    "en": "New game"
  },
  "obtain_code_from_api": false,
  "obtain_code_from_db": true,
  "release_date": "2019-09-30T05:00:00+05:00",
  "sales_exist": false,
  "sku": "134",
  "system_requirements": "Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU"
}
curl --request POST \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"name":{"en":"New game"},"description":{"en":"A good new game"},"default_currency":"USD","system_requirements":"Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU","release_date":"2019-09-30T05:00:00+05:00","delivery":{"release_date_type":"quarter","is_pre_order":true,"is_partner_side_processing":true,"delivery_method":{"default":["key"],"exceptions":{}}},"files":[],"obtain_code_from_api":false,"obtain_code_from_db":true,"sales_exist":false,"drm":[{"id":1,"name":"Steam","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg","platforms":[{"id":6,"name":"Mac"}],"enabled":true},{"id":2,"name":"Playstation","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg","platforms":[{"id":3,"name":"Playstation 3"}],"enabled":true},{"id":3,"name":"XBox","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg","platforms":[{"id":7,"name":"XBox 360"}],"enabled":true},{"id":4,"name":"Uplay","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg","platforms":[],"enabled":false},{"id":5,"name":"Origin","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg","platforms":[],"enabled":false},{"id":6,"name":"DRM Free","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg","platforms":[{"id":1,"name":"Windows"}],"enabled":true,"is_autoredeem_enabled":false},{"id":7,"name":"GOG","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg","platforms":[],"enabled":false}],"sku":"134"}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"name":{"en":"New game"},"description":{"en":"A good new game"},"default_currency":"USD","system_requirements":"Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU","release_date":"2019-09-30T05:00:00+05:00","delivery":{"release_date_type":"quarter","is_pre_order":true,"is_partner_side_processing":true,"delivery_method":{"default":["key"],"exceptions":{}}},"files":[],"obtain_code_from_api":false,"obtain_code_from_db":true,"sales_exist":false,"drm":[{"id":1,"name":"Steam","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg","platforms":[{"id":6,"name":"Mac"}],"enabled":true},{"id":2,"name":"Playstation","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg","platforms":[{"id":3,"name":"Playstation 3"}],"enabled":true},{"id":3,"name":"XBox","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg","platforms":[{"id":7,"name":"XBox 360"}],"enabled":true},{"id":4,"name":"Uplay","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg","platforms":[],"enabled":false},{"id":5,"name":"Origin","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg","platforms":[],"enabled":false},{"id":6,"name":"DRM Free","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg","platforms":[{"id":1,"name":"Windows"}],"enabled":true,"is_autoredeem_enabled":false},{"id":7,"name":"GOG","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg","platforms":[],"enabled":false}],"sku":"134"}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery');
$request->setRequestMethod('POST');
$request->setBody($body);

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery");
var request = new RestRequest(Method.POST);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":{\"en\":\"New game\"},\"description\":{\"en\":\"A good new game\"},\"default_currency\":\"USD\",\"system_requirements\":\"Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU\",\"release_date\":\"2019-09-30T05:00:00+05:00\",\"delivery\":{\"release_date_type\":\"quarter\",\"is_pre_order\":true,\"is_partner_side_processing\":true,\"delivery_method\":{\"default\":[\"key\"],\"exceptions\":{}}},\"files\":[],\"obtain_code_from_api\":false,\"obtain_code_from_db\":true,\"sales_exist\":false,\"drm\":[{\"id\":1,\"name\":\"Steam\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg\",\"platforms\":[{\"id\":6,\"name\":\"Mac\"}],\"enabled\":true},{\"id\":2,\"name\":\"Playstation\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg\",\"platforms\":[{\"id\":3,\"name\":\"Playstation 3\"}],\"enabled\":true},{\"id\":3,\"name\":\"XBox\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg\",\"platforms\":[{\"id\":7,\"name\":\"XBox 360\"}],\"enabled\":true},{\"id\":4,\"name\":\"Uplay\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg\",\"platforms\":[],\"enabled\":false},{\"id\":5,\"name\":\"Origin\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg\",\"platforms\":[],\"enabled\":false},{\"id\":6,\"name\":\"DRM Free\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg\",\"platforms\":[{\"id\":1,\"name\":\"Windows\"}],\"enabled\":true,\"is_autoredeem_enabled\":false},{\"id\":7,\"name\":\"GOG\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg\",\"platforms\":[],\"enabled\":false}],\"sku\":\"134\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"name\":{\"en\":\"New game\"},\"description\":{\"en\":\"A good new game\"},\"default_currency\":\"USD\",\"system_requirements\":\"Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU\",\"release_date\":\"2019-09-30T05:00:00+05:00\",\"delivery\":{\"release_date_type\":\"quarter\",\"is_pre_order\":true,\"is_partner_side_processing\":true,\"delivery_method\":{\"default\":[\"key\"],\"exceptions\":{}}},\"files\":[],\"obtain_code_from_api\":false,\"obtain_code_from_db\":true,\"sales_exist\":false,\"drm\":[{\"id\":1,\"name\":\"Steam\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg\",\"platforms\":[{\"id\":6,\"name\":\"Mac\"}],\"enabled\":true},{\"id\":2,\"name\":\"Playstation\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg\",\"platforms\":[{\"id\":3,\"name\":\"Playstation 3\"}],\"enabled\":true},{\"id\":3,\"name\":\"XBox\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg\",\"platforms\":[{\"id\":7,\"name\":\"XBox 360\"}],\"enabled\":true},{\"id\":4,\"name\":\"Uplay\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg\",\"platforms\":[],\"enabled\":false},{\"id\":5,\"name\":\"Origin\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg\",\"platforms\":[],\"enabled\":false},{\"id\":6,\"name\":\"DRM Free\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg\",\"platforms\":[{\"id\":1,\"name\":\"Windows\"}],\"enabled\":true,\"is_autoredeem_enabled\":false},{\"id\":7,\"name\":\"GOG\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg\",\"platforms\":[],\"enabled\":false}],\"sku\":\"134\"}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("POST", "/merchant/v2/projects/{project_id}/game_delivery", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Post.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"name\":{\"en\":\"New game\"},\"description\":{\"en\":\"A good new game\"},\"default_currency\":\"USD\",\"system_requirements\":\"Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU\",\"release_date\":\"2019-09-30T05:00:00+05:00\",\"delivery\":{\"release_date_type\":\"quarter\",\"is_pre_order\":true,\"is_partner_side_processing\":true,\"delivery_method\":{\"default\":[\"key\"],\"exceptions\":{}}},\"files\":[],\"obtain_code_from_api\":false,\"obtain_code_from_db\":true,\"sales_exist\":false,\"drm\":[{\"id\":1,\"name\":\"Steam\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg\",\"platforms\":[{\"id\":6,\"name\":\"Mac\"}],\"enabled\":true},{\"id\":2,\"name\":\"Playstation\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg\",\"platforms\":[{\"id\":3,\"name\":\"Playstation 3\"}],\"enabled\":true},{\"id\":3,\"name\":\"XBox\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg\",\"platforms\":[{\"id\":7,\"name\":\"XBox 360\"}],\"enabled\":true},{\"id\":4,\"name\":\"Uplay\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg\",\"platforms\":[],\"enabled\":false},{\"id\":5,\"name\":\"Origin\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg\",\"platforms\":[],\"enabled\":false},{\"id\":6,\"name\":\"DRM Free\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg\",\"platforms\":[{\"id\":1,\"name\":\"Windows\"}],\"enabled\":true,\"is_autoredeem_enabled\":false},{\"id\":7,\"name\":\"GOG\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg\",\"platforms\":[],\"enabled\":false}],\"sku\":\"134\"}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"name\":{\"en\":\"New game\"},\"description\":{\"en\":\"A good new game\"},\"default_currency\":\"USD\",\"system_requirements\":\"Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU\",\"release_date\":\"2019-09-30T05:00:00+05:00\",\"delivery\":{\"release_date_type\":\"quarter\",\"is_pre_order\":true,\"is_partner_side_processing\":true,\"delivery_method\":{\"default\":[\"key\"],\"exceptions\":{}}},\"files\":[],\"obtain_code_from_api\":false,\"obtain_code_from_db\":true,\"sales_exist\":false,\"drm\":[{\"id\":1,\"name\":\"Steam\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg\",\"platforms\":[{\"id\":6,\"name\":\"Mac\"}],\"enabled\":true},{\"id\":2,\"name\":\"Playstation\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg\",\"platforms\":[{\"id\":3,\"name\":\"Playstation 3\"}],\"enabled\":true},{\"id\":3,\"name\":\"XBox\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg\",\"platforms\":[{\"id\":7,\"name\":\"XBox 360\"}],\"enabled\":true},{\"id\":4,\"name\":\"Uplay\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg\",\"platforms\":[],\"enabled\":false},{\"id\":5,\"name\":\"Origin\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg\",\"platforms\":[],\"enabled\":false},{\"id\":6,\"name\":\"DRM Free\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg\",\"platforms\":[{\"id\":1,\"name\":\"Windows\"}],\"enabled\":true,\"is_autoredeem_enabled\":false},{\"id\":7,\"name\":\"GOG\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg\",\"platforms\":[],\"enabled\":false}],\"sku\":\"134\"}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery")
  .post(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "name": {
    "en": "New game"
  },
  "description": {
    "en": "A good new game"
  },
  "default_currency": "USD",
  "system_requirements": "Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU",
  "release_date": "2019-09-30T05:00:00+05:00",
  "delivery": {
    "release_date_type": "quarter",
    "is_pre_order": true,
    "is_partner_side_processing": true,
    "delivery_method": {
      "default": [
        "key"
      ],
      "exceptions": {}
    }
  },
  "files": [],
  "obtain_code_from_api": false,
  "obtain_code_from_db": true,
  "sales_exist": false,
  "drm": [
    {
      "id": 1,
      "name": "Steam",
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "platforms": [
        {
          "id": 6,
          "name": "Mac"
        }
      ],
      "enabled": true
    },
    {
      "id": 2,
      "name": "Playstation",
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        }
      ],
      "enabled": true
    },
    {
      "id": 3,
      "name": "XBox",
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "platforms": [
        {
          "id": 7,
          "name": "XBox 360"
        }
      ],
      "enabled": true
    },
    {
      "id": 4,
      "name": "Uplay",
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "platforms": [],
      "enabled": false
    },
    {
      "id": 5,
      "name": "Origin",
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "platforms": [],
      "enabled": false
    },
    {
      "id": 6,
      "name": "DRM Free",
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        }
      ],
      "enabled": true,
      "is_autoredeem_enabled": false
    },
    {
      "id": 7,
      "name": "GOG",
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "platforms": [],
      "enabled": false
    }
  ],
  "sku": "134"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("POST", "https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "id": 4241
}
{
  "id": 4241
}
{
  "id": 4241
}
{
  "id": 4241
}
{
  "id": 4241
}
{
  "id": 4241
}
{
  "id": 4241
}
{
  "id": 4241
}

获取实体

获取游戏交付实体。

HTTP请求

GET https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}

参数类型描述
project_id
integer项目ID。
game_delivery_id
integer游戏交付实体的ID。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}

Headers:
Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id} \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "additional_info": null,
  "default_currency": "USD",
  "delivery": {
    "delivery_method": {
      "default": [
        "key"
      ],
      "exceptions": {
        "drmfree": [
          "link"
        ]
      }
    },
    "is_partner_side_processing": true,
    "is_pre_order": true,
    "release_date_type": "quarter"
  },
  "description": {
    "en": "A brief summary of your game Updadated brief| English"
  },
  "developer": null,
  "drm": [
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "is_autoredeem_enabled": false,
      "name": "Steam",
      "platforms": [
        {
          "id": 6,
          "name": "Mac"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "is_autoredeem_enabled": false,
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 5,
        "total": 5,
        "used": 0
      },
      "enabled": true,
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "XBox",
      "platforms": [
        {
          "id": 7,
          "name": "XBox 360"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "Uplay",
      "platforms": [],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "Origin",
      "platforms": [],
      "prices": []
    },
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "is_autoredeem_enabled": false,
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "is_autoredeem_enabled": false,
      "name": "GOG",
      "platforms": [],
      "prices": []
    }
  ],
  "files": [
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 1,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Fwindows%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGd2luZG93cyUyRkluc3RhbGxIYW5nb3V0c0NoYXQuZG1nIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNTQ5NDQwMzU4fX19XX0_&Signature=bTVBhDCIKPpnkQYj0LlaTPeGvbhiFtRhrj~Opzk-a2F0w1OFhtCUZrNunjFZkwF8ehQIQlxlKNjvne1Djurvyz4hHHT8x2lU0Ns~jBu2Hf7FuCyun~pxmrI2qU1ReJXCP971rMjJqy9VcQnaD4i0IQ~CKPkoWE-QqPGZhH87hqRGw9HQCsriXilpVBLWf~9EFP97JghvobvMDXF3F-CHTmDnaSk-nGt~Lqhz1lXPhWCJupuYuYFPALpHPb7wnOl4GQfzq3sIEgUmMe2MnpjhUT1k~mDMwXSHhcUPL~QooRsxrP5XfzLPX8weiyG6l5bUpvEd~mVAe8WXeezy~s76Qg__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    },
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 2,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Flinux%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGbGludXglMkZJbnN0YWxsSGFuZ291dHNDaGF0LmRtZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTU0OTQ0MDM1OH19fV19&Signature=RhIxAxFSEb0vMYD~CnINwGInCRArTskQuA9OUOn3vMRY0VRCCXuzQIiTKxYYa2rX3S0NN0STeFCAYv-hqyc4tEXZj0FXpYiOIxgx1wZ1tv9HxloOQfGwejDMCg48XQeupbZM9biC-KgDNCIjKpIvKbc0NTYGpnBE4YO-f7-UbIiNBynjMQdVSTtLKrUxYdUW0lazXbb-BJSK5Sq~IaZubf7BMsoTOn67eeFLZX3EH7ntXs0NyPw~-bsx-YI8tgHQ5SXXiZtQ~2VKB4VjgsaZn7Tzx-tOTlWnvW3WYbFqjixhdN-jDwo-XwPMghR354440hau3Ncf3GCv4Vu3it880g__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    },
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 6,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Fmac%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGbWFjJTJGSW5zdGFsbEhhbmdvdXRzQ2hhdC5kbWciLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE1NDk0NDAzNTh9fX1dfQ__&Signature=bcLMaQ3jxffu82tUsw96B7SqS5p2Zva4vp~le8OGpgKdEdXA0eRrud8moelyBZ2RRhfF9hwPBNxenwOjPQWrsCHQVS9faRZgMQPBzyCeZj1SsgnnOpdK~auIv4ltTt5twI6flkcUJqpEbCn8v5rViJg2pYctwxUPMJHNy~yV3K9-y4rnPNdl3vHzgZLT-Q9qjvzsR5G4oiW5ubGLkL~3nlBesLNSNyqY~fHKmDzwhvCLgQhD7W3pZ3QzO0D66UNUmgaKu8Ly-kwW3hKop4nveKEIvLUnN91JOf~ja30HMPfVCrVt-cP-E1W78Q~rMxSSnJ8xMI8Z7a9VqyvbCn3ntQ__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    }
  ],
  "forum_link": null,
  "genre": null,
  "id": 4223,
  "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
  "locales_list": null,
  "long_description": null,
  "name": {
    "en": "test Entity"
  },
  "obtain_code_from_api": false,
  "obtain_code_from_db": true,
  "old_price": null,
  "parent_id": null,
  "publisher": null,
  "release_date": "2019-09-30T05:00:00+05:00",
  "sales_exist": false,
  "sku": "1234",
  "support_link": null,
  "system_requirements": "Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU",
  "tips_enabled": false,
  "video_link": null,
  "widget_settings": {
    "description_enabled": false,
    "image_enabled": false
  }
}
{
  "additional_info": null,
  "default_currency": "USD",
  "delivery": {
    "delivery_method": {
      "default": [
        "key"
      ],
      "exceptions": {
        "drmfree": [
          "link"
        ]
      }
    },
    "is_partner_side_processing": true,
    "is_pre_order": true,
    "release_date_type": "quarter"
  },
  "description": {
    "en": "A brief summary of your game Updadated brief| English"
  },
  "developer": null,
  "drm": [
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "is_autoredeem_enabled": false,
      "name": "Steam",
      "platforms": [
        {
          "id": 6,
          "name": "Mac"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "is_autoredeem_enabled": false,
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 5,
        "total": 5,
        "used": 0
      },
      "enabled": true,
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "XBox",
      "platforms": [
        {
          "id": 7,
          "name": "XBox 360"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "Uplay",
      "platforms": [],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "Origin",
      "platforms": [],
      "prices": []
    },
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "is_autoredeem_enabled": false,
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "is_autoredeem_enabled": false,
      "name": "GOG",
      "platforms": [],
      "prices": []
    }
  ],
  "files": [
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 1,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Fwindows%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGd2luZG93cyUyRkluc3RhbGxIYW5nb3V0c0NoYXQuZG1nIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNTQ5NDQwMzU4fX19XX0_&Signature=bTVBhDCIKPpnkQYj0LlaTPeGvbhiFtRhrj~Opzk-a2F0w1OFhtCUZrNunjFZkwF8ehQIQlxlKNjvne1Djurvyz4hHHT8x2lU0Ns~jBu2Hf7FuCyun~pxmrI2qU1ReJXCP971rMjJqy9VcQnaD4i0IQ~CKPkoWE-QqPGZhH87hqRGw9HQCsriXilpVBLWf~9EFP97JghvobvMDXF3F-CHTmDnaSk-nGt~Lqhz1lXPhWCJupuYuYFPALpHPb7wnOl4GQfzq3sIEgUmMe2MnpjhUT1k~mDMwXSHhcUPL~QooRsxrP5XfzLPX8weiyG6l5bUpvEd~mVAe8WXeezy~s76Qg__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    },
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 2,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Flinux%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGbGludXglMkZJbnN0YWxsSGFuZ291dHNDaGF0LmRtZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTU0OTQ0MDM1OH19fV19&Signature=RhIxAxFSEb0vMYD~CnINwGInCRArTskQuA9OUOn3vMRY0VRCCXuzQIiTKxYYa2rX3S0NN0STeFCAYv-hqyc4tEXZj0FXpYiOIxgx1wZ1tv9HxloOQfGwejDMCg48XQeupbZM9biC-KgDNCIjKpIvKbc0NTYGpnBE4YO-f7-UbIiNBynjMQdVSTtLKrUxYdUW0lazXbb-BJSK5Sq~IaZubf7BMsoTOn67eeFLZX3EH7ntXs0NyPw~-bsx-YI8tgHQ5SXXiZtQ~2VKB4VjgsaZn7Tzx-tOTlWnvW3WYbFqjixhdN-jDwo-XwPMghR354440hau3Ncf3GCv4Vu3it880g__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    },
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 6,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Fmac%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGbWFjJTJGSW5zdGFsbEhhbmdvdXRzQ2hhdC5kbWciLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE1NDk0NDAzNTh9fX1dfQ__&Signature=bcLMaQ3jxffu82tUsw96B7SqS5p2Zva4vp~le8OGpgKdEdXA0eRrud8moelyBZ2RRhfF9hwPBNxenwOjPQWrsCHQVS9faRZgMQPBzyCeZj1SsgnnOpdK~auIv4ltTt5twI6flkcUJqpEbCn8v5rViJg2pYctwxUPMJHNy~yV3K9-y4rnPNdl3vHzgZLT-Q9qjvzsR5G4oiW5ubGLkL~3nlBesLNSNyqY~fHKmDzwhvCLgQhD7W3pZ3QzO0D66UNUmgaKu8Ly-kwW3hKop4nveKEIvLUnN91JOf~ja30HMPfVCrVt-cP-E1W78Q~rMxSSnJ8xMI8Z7a9VqyvbCn3ntQ__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    }
  ],
  "forum_link": null,
  "genre": null,
  "id": 4223,
  "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
  "locales_list": null,
  "long_description": null,
  "name": {
    "en": "test Entity"
  },
  "obtain_code_from_api": false,
  "obtain_code_from_db": true,
  "old_price": null,
  "parent_id": null,
  "publisher": null,
  "release_date": "2019-09-30T05:00:00+05:00",
  "sales_exist": false,
  "sku": "1234",
  "support_link": null,
  "system_requirements": "Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU",
  "tips_enabled": false,
  "video_link": null,
  "widget_settings": {
    "description_enabled": false,
    "image_enabled": false
  }
}
{
  "additional_info": null,
  "default_currency": "USD",
  "delivery": {
    "delivery_method": {
      "default": [
        "key"
      ],
      "exceptions": {
        "drmfree": [
          "link"
        ]
      }
    },
    "is_partner_side_processing": true,
    "is_pre_order": true,
    "release_date_type": "quarter"
  },
  "description": {
    "en": "A brief summary of your game Updadated brief| English"
  },
  "developer": null,
  "drm": [
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "is_autoredeem_enabled": false,
      "name": "Steam",
      "platforms": [
        {
          "id": 6,
          "name": "Mac"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "is_autoredeem_enabled": false,
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 5,
        "total": 5,
        "used": 0
      },
      "enabled": true,
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "XBox",
      "platforms": [
        {
          "id": 7,
          "name": "XBox 360"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "Uplay",
      "platforms": [],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "Origin",
      "platforms": [],
      "prices": []
    },
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "is_autoredeem_enabled": false,
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "is_autoredeem_enabled": false,
      "name": "GOG",
      "platforms": [],
      "prices": []
    }
  ],
  "files": [
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 1,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Fwindows%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGd2luZG93cyUyRkluc3RhbGxIYW5nb3V0c0NoYXQuZG1nIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNTQ5NDQwMzU4fX19XX0_&Signature=bTVBhDCIKPpnkQYj0LlaTPeGvbhiFtRhrj~Opzk-a2F0w1OFhtCUZrNunjFZkwF8ehQIQlxlKNjvne1Djurvyz4hHHT8x2lU0Ns~jBu2Hf7FuCyun~pxmrI2qU1ReJXCP971rMjJqy9VcQnaD4i0IQ~CKPkoWE-QqPGZhH87hqRGw9HQCsriXilpVBLWf~9EFP97JghvobvMDXF3F-CHTmDnaSk-nGt~Lqhz1lXPhWCJupuYuYFPALpHPb7wnOl4GQfzq3sIEgUmMe2MnpjhUT1k~mDMwXSHhcUPL~QooRsxrP5XfzLPX8weiyG6l5bUpvEd~mVAe8WXeezy~s76Qg__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    },
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 2,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Flinux%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGbGludXglMkZJbnN0YWxsSGFuZ291dHNDaGF0LmRtZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTU0OTQ0MDM1OH19fV19&Signature=RhIxAxFSEb0vMYD~CnINwGInCRArTskQuA9OUOn3vMRY0VRCCXuzQIiTKxYYa2rX3S0NN0STeFCAYv-hqyc4tEXZj0FXpYiOIxgx1wZ1tv9HxloOQfGwejDMCg48XQeupbZM9biC-KgDNCIjKpIvKbc0NTYGpnBE4YO-f7-UbIiNBynjMQdVSTtLKrUxYdUW0lazXbb-BJSK5Sq~IaZubf7BMsoTOn67eeFLZX3EH7ntXs0NyPw~-bsx-YI8tgHQ5SXXiZtQ~2VKB4VjgsaZn7Tzx-tOTlWnvW3WYbFqjixhdN-jDwo-XwPMghR354440hau3Ncf3GCv4Vu3it880g__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    },
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 6,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Fmac%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGbWFjJTJGSW5zdGFsbEhhbmdvdXRzQ2hhdC5kbWciLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE1NDk0NDAzNTh9fX1dfQ__&Signature=bcLMaQ3jxffu82tUsw96B7SqS5p2Zva4vp~le8OGpgKdEdXA0eRrud8moelyBZ2RRhfF9hwPBNxenwOjPQWrsCHQVS9faRZgMQPBzyCeZj1SsgnnOpdK~auIv4ltTt5twI6flkcUJqpEbCn8v5rViJg2pYctwxUPMJHNy~yV3K9-y4rnPNdl3vHzgZLT-Q9qjvzsR5G4oiW5ubGLkL~3nlBesLNSNyqY~fHKmDzwhvCLgQhD7W3pZ3QzO0D66UNUmgaKu8Ly-kwW3hKop4nveKEIvLUnN91JOf~ja30HMPfVCrVt-cP-E1W78Q~rMxSSnJ8xMI8Z7a9VqyvbCn3ntQ__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    }
  ],
  "forum_link": null,
  "genre": null,
  "id": 4223,
  "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
  "locales_list": null,
  "long_description": null,
  "name": {
    "en": "test Entity"
  },
  "obtain_code_from_api": false,
  "obtain_code_from_db": true,
  "old_price": null,
  "parent_id": null,
  "publisher": null,
  "release_date": "2019-09-30T05:00:00+05:00",
  "sales_exist": false,
  "sku": "1234",
  "support_link": null,
  "system_requirements": "Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU",
  "tips_enabled": false,
  "video_link": null,
  "widget_settings": {
    "description_enabled": false,
    "image_enabled": false
  }
}
{
  "additional_info": null,
  "default_currency": "USD",
  "delivery": {
    "delivery_method": {
      "default": [
        "key"
      ],
      "exceptions": {
        "drmfree": [
          "link"
        ]
      }
    },
    "is_partner_side_processing": true,
    "is_pre_order": true,
    "release_date_type": "quarter"
  },
  "description": {
    "en": "A brief summary of your game Updadated brief| English"
  },
  "developer": null,
  "drm": [
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "is_autoredeem_enabled": false,
      "name": "Steam",
      "platforms": [
        {
          "id": 6,
          "name": "Mac"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "is_autoredeem_enabled": false,
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 5,
        "total": 5,
        "used": 0
      },
      "enabled": true,
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "XBox",
      "platforms": [
        {
          "id": 7,
          "name": "XBox 360"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "Uplay",
      "platforms": [],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "Origin",
      "platforms": [],
      "prices": []
    },
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "is_autoredeem_enabled": false,
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "is_autoredeem_enabled": false,
      "name": "GOG",
      "platforms": [],
      "prices": []
    }
  ],
  "files": [
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 1,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Fwindows%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGd2luZG93cyUyRkluc3RhbGxIYW5nb3V0c0NoYXQuZG1nIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNTQ5NDQwMzU4fX19XX0_&Signature=bTVBhDCIKPpnkQYj0LlaTPeGvbhiFtRhrj~Opzk-a2F0w1OFhtCUZrNunjFZkwF8ehQIQlxlKNjvne1Djurvyz4hHHT8x2lU0Ns~jBu2Hf7FuCyun~pxmrI2qU1ReJXCP971rMjJqy9VcQnaD4i0IQ~CKPkoWE-QqPGZhH87hqRGw9HQCsriXilpVBLWf~9EFP97JghvobvMDXF3F-CHTmDnaSk-nGt~Lqhz1lXPhWCJupuYuYFPALpHPb7wnOl4GQfzq3sIEgUmMe2MnpjhUT1k~mDMwXSHhcUPL~QooRsxrP5XfzLPX8weiyG6l5bUpvEd~mVAe8WXeezy~s76Qg__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    },
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 2,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Flinux%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGbGludXglMkZJbnN0YWxsSGFuZ291dHNDaGF0LmRtZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTU0OTQ0MDM1OH19fV19&Signature=RhIxAxFSEb0vMYD~CnINwGInCRArTskQuA9OUOn3vMRY0VRCCXuzQIiTKxYYa2rX3S0NN0STeFCAYv-hqyc4tEXZj0FXpYiOIxgx1wZ1tv9HxloOQfGwejDMCg48XQeupbZM9biC-KgDNCIjKpIvKbc0NTYGpnBE4YO-f7-UbIiNBynjMQdVSTtLKrUxYdUW0lazXbb-BJSK5Sq~IaZubf7BMsoTOn67eeFLZX3EH7ntXs0NyPw~-bsx-YI8tgHQ5SXXiZtQ~2VKB4VjgsaZn7Tzx-tOTlWnvW3WYbFqjixhdN-jDwo-XwPMghR354440hau3Ncf3GCv4Vu3it880g__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    },
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 6,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Fmac%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGbWFjJTJGSW5zdGFsbEhhbmdvdXRzQ2hhdC5kbWciLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE1NDk0NDAzNTh9fX1dfQ__&Signature=bcLMaQ3jxffu82tUsw96B7SqS5p2Zva4vp~le8OGpgKdEdXA0eRrud8moelyBZ2RRhfF9hwPBNxenwOjPQWrsCHQVS9faRZgMQPBzyCeZj1SsgnnOpdK~auIv4ltTt5twI6flkcUJqpEbCn8v5rViJg2pYctwxUPMJHNy~yV3K9-y4rnPNdl3vHzgZLT-Q9qjvzsR5G4oiW5ubGLkL~3nlBesLNSNyqY~fHKmDzwhvCLgQhD7W3pZ3QzO0D66UNUmgaKu8Ly-kwW3hKop4nveKEIvLUnN91JOf~ja30HMPfVCrVt-cP-E1W78Q~rMxSSnJ8xMI8Z7a9VqyvbCn3ntQ__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    }
  ],
  "forum_link": null,
  "genre": null,
  "id": 4223,
  "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
  "locales_list": null,
  "long_description": null,
  "name": {
    "en": "test Entity"
  },
  "obtain_code_from_api": false,
  "obtain_code_from_db": true,
  "old_price": null,
  "parent_id": null,
  "publisher": null,
  "release_date": "2019-09-30T05:00:00+05:00",
  "sales_exist": false,
  "sku": "1234",
  "support_link": null,
  "system_requirements": "Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU",
  "tips_enabled": false,
  "video_link": null,
  "widget_settings": {
    "description_enabled": false,
    "image_enabled": false
  }
}
{
  "additional_info": null,
  "default_currency": "USD",
  "delivery": {
    "delivery_method": {
      "default": [
        "key"
      ],
      "exceptions": {
        "drmfree": [
          "link"
        ]
      }
    },
    "is_partner_side_processing": true,
    "is_pre_order": true,
    "release_date_type": "quarter"
  },
  "description": {
    "en": "A brief summary of your game Updadated brief| English"
  },
  "developer": null,
  "drm": [
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "is_autoredeem_enabled": false,
      "name": "Steam",
      "platforms": [
        {
          "id": 6,
          "name": "Mac"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "is_autoredeem_enabled": false,
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 5,
        "total": 5,
        "used": 0
      },
      "enabled": true,
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "XBox",
      "platforms": [
        {
          "id": 7,
          "name": "XBox 360"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "Uplay",
      "platforms": [],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "Origin",
      "platforms": [],
      "prices": []
    },
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "is_autoredeem_enabled": false,
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "is_autoredeem_enabled": false,
      "name": "GOG",
      "platforms": [],
      "prices": []
    }
  ],
  "files": [
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 1,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Fwindows%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGd2luZG93cyUyRkluc3RhbGxIYW5nb3V0c0NoYXQuZG1nIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNTQ5NDQwMzU4fX19XX0_&Signature=bTVBhDCIKPpnkQYj0LlaTPeGvbhiFtRhrj~Opzk-a2F0w1OFhtCUZrNunjFZkwF8ehQIQlxlKNjvne1Djurvyz4hHHT8x2lU0Ns~jBu2Hf7FuCyun~pxmrI2qU1ReJXCP971rMjJqy9VcQnaD4i0IQ~CKPkoWE-QqPGZhH87hqRGw9HQCsriXilpVBLWf~9EFP97JghvobvMDXF3F-CHTmDnaSk-nGt~Lqhz1lXPhWCJupuYuYFPALpHPb7wnOl4GQfzq3sIEgUmMe2MnpjhUT1k~mDMwXSHhcUPL~QooRsxrP5XfzLPX8weiyG6l5bUpvEd~mVAe8WXeezy~s76Qg__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    },
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 2,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Flinux%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGbGludXglMkZJbnN0YWxsSGFuZ291dHNDaGF0LmRtZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTU0OTQ0MDM1OH19fV19&Signature=RhIxAxFSEb0vMYD~CnINwGInCRArTskQuA9OUOn3vMRY0VRCCXuzQIiTKxYYa2rX3S0NN0STeFCAYv-hqyc4tEXZj0FXpYiOIxgx1wZ1tv9HxloOQfGwejDMCg48XQeupbZM9biC-KgDNCIjKpIvKbc0NTYGpnBE4YO-f7-UbIiNBynjMQdVSTtLKrUxYdUW0lazXbb-BJSK5Sq~IaZubf7BMsoTOn67eeFLZX3EH7ntXs0NyPw~-bsx-YI8tgHQ5SXXiZtQ~2VKB4VjgsaZn7Tzx-tOTlWnvW3WYbFqjixhdN-jDwo-XwPMghR354440hau3Ncf3GCv4Vu3it880g__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    },
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 6,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Fmac%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGbWFjJTJGSW5zdGFsbEhhbmdvdXRzQ2hhdC5kbWciLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE1NDk0NDAzNTh9fX1dfQ__&Signature=bcLMaQ3jxffu82tUsw96B7SqS5p2Zva4vp~le8OGpgKdEdXA0eRrud8moelyBZ2RRhfF9hwPBNxenwOjPQWrsCHQVS9faRZgMQPBzyCeZj1SsgnnOpdK~auIv4ltTt5twI6flkcUJqpEbCn8v5rViJg2pYctwxUPMJHNy~yV3K9-y4rnPNdl3vHzgZLT-Q9qjvzsR5G4oiW5ubGLkL~3nlBesLNSNyqY~fHKmDzwhvCLgQhD7W3pZ3QzO0D66UNUmgaKu8Ly-kwW3hKop4nveKEIvLUnN91JOf~ja30HMPfVCrVt-cP-E1W78Q~rMxSSnJ8xMI8Z7a9VqyvbCn3ntQ__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    }
  ],
  "forum_link": null,
  "genre": null,
  "id": 4223,
  "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
  "locales_list": null,
  "long_description": null,
  "name": {
    "en": "test Entity"
  },
  "obtain_code_from_api": false,
  "obtain_code_from_db": true,
  "old_price": null,
  "parent_id": null,
  "publisher": null,
  "release_date": "2019-09-30T05:00:00+05:00",
  "sales_exist": false,
  "sku": "1234",
  "support_link": null,
  "system_requirements": "Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU",
  "tips_enabled": false,
  "video_link": null,
  "widget_settings": {
    "description_enabled": false,
    "image_enabled": false
  }
}
{
  "additional_info": null,
  "default_currency": "USD",
  "delivery": {
    "delivery_method": {
      "default": [
        "key"
      ],
      "exceptions": {
        "drmfree": [
          "link"
        ]
      }
    },
    "is_partner_side_processing": true,
    "is_pre_order": true,
    "release_date_type": "quarter"
  },
  "description": {
    "en": "A brief summary of your game Updadated brief| English"
  },
  "developer": null,
  "drm": [
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "is_autoredeem_enabled": false,
      "name": "Steam",
      "platforms": [
        {
          "id": 6,
          "name": "Mac"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "is_autoredeem_enabled": false,
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 5,
        "total": 5,
        "used": 0
      },
      "enabled": true,
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "XBox",
      "platforms": [
        {
          "id": 7,
          "name": "XBox 360"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "Uplay",
      "platforms": [],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "Origin",
      "platforms": [],
      "prices": []
    },
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "is_autoredeem_enabled": false,
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "is_autoredeem_enabled": false,
      "name": "GOG",
      "platforms": [],
      "prices": []
    }
  ],
  "files": [
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 1,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Fwindows%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGd2luZG93cyUyRkluc3RhbGxIYW5nb3V0c0NoYXQuZG1nIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNTQ5NDQwMzU4fX19XX0_&Signature=bTVBhDCIKPpnkQYj0LlaTPeGvbhiFtRhrj~Opzk-a2F0w1OFhtCUZrNunjFZkwF8ehQIQlxlKNjvne1Djurvyz4hHHT8x2lU0Ns~jBu2Hf7FuCyun~pxmrI2qU1ReJXCP971rMjJqy9VcQnaD4i0IQ~CKPkoWE-QqPGZhH87hqRGw9HQCsriXilpVBLWf~9EFP97JghvobvMDXF3F-CHTmDnaSk-nGt~Lqhz1lXPhWCJupuYuYFPALpHPb7wnOl4GQfzq3sIEgUmMe2MnpjhUT1k~mDMwXSHhcUPL~QooRsxrP5XfzLPX8weiyG6l5bUpvEd~mVAe8WXeezy~s76Qg__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    },
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 2,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Flinux%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGbGludXglMkZJbnN0YWxsSGFuZ291dHNDaGF0LmRtZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTU0OTQ0MDM1OH19fV19&Signature=RhIxAxFSEb0vMYD~CnINwGInCRArTskQuA9OUOn3vMRY0VRCCXuzQIiTKxYYa2rX3S0NN0STeFCAYv-hqyc4tEXZj0FXpYiOIxgx1wZ1tv9HxloOQfGwejDMCg48XQeupbZM9biC-KgDNCIjKpIvKbc0NTYGpnBE4YO-f7-UbIiNBynjMQdVSTtLKrUxYdUW0lazXbb-BJSK5Sq~IaZubf7BMsoTOn67eeFLZX3EH7ntXs0NyPw~-bsx-YI8tgHQ5SXXiZtQ~2VKB4VjgsaZn7Tzx-tOTlWnvW3WYbFqjixhdN-jDwo-XwPMghR354440hau3Ncf3GCv4Vu3it880g__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    },
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 6,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Fmac%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGbWFjJTJGSW5zdGFsbEhhbmdvdXRzQ2hhdC5kbWciLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE1NDk0NDAzNTh9fX1dfQ__&Signature=bcLMaQ3jxffu82tUsw96B7SqS5p2Zva4vp~le8OGpgKdEdXA0eRrud8moelyBZ2RRhfF9hwPBNxenwOjPQWrsCHQVS9faRZgMQPBzyCeZj1SsgnnOpdK~auIv4ltTt5twI6flkcUJqpEbCn8v5rViJg2pYctwxUPMJHNy~yV3K9-y4rnPNdl3vHzgZLT-Q9qjvzsR5G4oiW5ubGLkL~3nlBesLNSNyqY~fHKmDzwhvCLgQhD7W3pZ3QzO0D66UNUmgaKu8Ly-kwW3hKop4nveKEIvLUnN91JOf~ja30HMPfVCrVt-cP-E1W78Q~rMxSSnJ8xMI8Z7a9VqyvbCn3ntQ__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    }
  ],
  "forum_link": null,
  "genre": null,
  "id": 4223,
  "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
  "locales_list": null,
  "long_description": null,
  "name": {
    "en": "test Entity"
  },
  "obtain_code_from_api": false,
  "obtain_code_from_db": true,
  "old_price": null,
  "parent_id": null,
  "publisher": null,
  "release_date": "2019-09-30T05:00:00+05:00",
  "sales_exist": false,
  "sku": "1234",
  "support_link": null,
  "system_requirements": "Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU",
  "tips_enabled": false,
  "video_link": null,
  "widget_settings": {
    "description_enabled": false,
    "image_enabled": false
  }
}
{
  "additional_info": null,
  "default_currency": "USD",
  "delivery": {
    "delivery_method": {
      "default": [
        "key"
      ],
      "exceptions": {
        "drmfree": [
          "link"
        ]
      }
    },
    "is_partner_side_processing": true,
    "is_pre_order": true,
    "release_date_type": "quarter"
  },
  "description": {
    "en": "A brief summary of your game Updadated brief| English"
  },
  "developer": null,
  "drm": [
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "is_autoredeem_enabled": false,
      "name": "Steam",
      "platforms": [
        {
          "id": 6,
          "name": "Mac"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "is_autoredeem_enabled": false,
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 5,
        "total": 5,
        "used": 0
      },
      "enabled": true,
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "XBox",
      "platforms": [
        {
          "id": 7,
          "name": "XBox 360"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "Uplay",
      "platforms": [],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "Origin",
      "platforms": [],
      "prices": []
    },
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "is_autoredeem_enabled": false,
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "is_autoredeem_enabled": false,
      "name": "GOG",
      "platforms": [],
      "prices": []
    }
  ],
  "files": [
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 1,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Fwindows%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGd2luZG93cyUyRkluc3RhbGxIYW5nb3V0c0NoYXQuZG1nIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNTQ5NDQwMzU4fX19XX0_&Signature=bTVBhDCIKPpnkQYj0LlaTPeGvbhiFtRhrj~Opzk-a2F0w1OFhtCUZrNunjFZkwF8ehQIQlxlKNjvne1Djurvyz4hHHT8x2lU0Ns~jBu2Hf7FuCyun~pxmrI2qU1ReJXCP971rMjJqy9VcQnaD4i0IQ~CKPkoWE-QqPGZhH87hqRGw9HQCsriXilpVBLWf~9EFP97JghvobvMDXF3F-CHTmDnaSk-nGt~Lqhz1lXPhWCJupuYuYFPALpHPb7wnOl4GQfzq3sIEgUmMe2MnpjhUT1k~mDMwXSHhcUPL~QooRsxrP5XfzLPX8weiyG6l5bUpvEd~mVAe8WXeezy~s76Qg__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    },
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 2,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Flinux%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGbGludXglMkZJbnN0YWxsSGFuZ291dHNDaGF0LmRtZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTU0OTQ0MDM1OH19fV19&Signature=RhIxAxFSEb0vMYD~CnINwGInCRArTskQuA9OUOn3vMRY0VRCCXuzQIiTKxYYa2rX3S0NN0STeFCAYv-hqyc4tEXZj0FXpYiOIxgx1wZ1tv9HxloOQfGwejDMCg48XQeupbZM9biC-KgDNCIjKpIvKbc0NTYGpnBE4YO-f7-UbIiNBynjMQdVSTtLKrUxYdUW0lazXbb-BJSK5Sq~IaZubf7BMsoTOn67eeFLZX3EH7ntXs0NyPw~-bsx-YI8tgHQ5SXXiZtQ~2VKB4VjgsaZn7Tzx-tOTlWnvW3WYbFqjixhdN-jDwo-XwPMghR354440hau3Ncf3GCv4Vu3it880g__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    },
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 6,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Fmac%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGbWFjJTJGSW5zdGFsbEhhbmdvdXRzQ2hhdC5kbWciLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE1NDk0NDAzNTh9fX1dfQ__&Signature=bcLMaQ3jxffu82tUsw96B7SqS5p2Zva4vp~le8OGpgKdEdXA0eRrud8moelyBZ2RRhfF9hwPBNxenwOjPQWrsCHQVS9faRZgMQPBzyCeZj1SsgnnOpdK~auIv4ltTt5twI6flkcUJqpEbCn8v5rViJg2pYctwxUPMJHNy~yV3K9-y4rnPNdl3vHzgZLT-Q9qjvzsR5G4oiW5ubGLkL~3nlBesLNSNyqY~fHKmDzwhvCLgQhD7W3pZ3QzO0D66UNUmgaKu8Ly-kwW3hKop4nveKEIvLUnN91JOf~ja30HMPfVCrVt-cP-E1W78Q~rMxSSnJ8xMI8Z7a9VqyvbCn3ntQ__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    }
  ],
  "forum_link": null,
  "genre": null,
  "id": 4223,
  "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
  "locales_list": null,
  "long_description": null,
  "name": {
    "en": "test Entity"
  },
  "obtain_code_from_api": false,
  "obtain_code_from_db": true,
  "old_price": null,
  "parent_id": null,
  "publisher": null,
  "release_date": "2019-09-30T05:00:00+05:00",
  "sales_exist": false,
  "sku": "1234",
  "support_link": null,
  "system_requirements": "Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU",
  "tips_enabled": false,
  "video_link": null,
  "widget_settings": {
    "description_enabled": false,
    "image_enabled": false
  }
}
{
  "additional_info": null,
  "default_currency": "USD",
  "delivery": {
    "delivery_method": {
      "default": [
        "key"
      ],
      "exceptions": {
        "drmfree": [
          "link"
        ]
      }
    },
    "is_partner_side_processing": true,
    "is_pre_order": true,
    "release_date_type": "quarter"
  },
  "description": {
    "en": "A brief summary of your game Updadated brief| English"
  },
  "developer": null,
  "drm": [
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "is_autoredeem_enabled": false,
      "name": "Steam",
      "platforms": [
        {
          "id": 6,
          "name": "Mac"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "is_autoredeem_enabled": false,
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 5,
        "total": 5,
        "used": 0
      },
      "enabled": true,
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "XBox",
      "platforms": [
        {
          "id": 7,
          "name": "XBox 360"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "Uplay",
      "platforms": [],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "is_autoredeem_enabled": false,
      "name": "Origin",
      "platforms": [],
      "prices": []
    },
    {
      "codes": {
        "active": 3,
        "total": 3,
        "used": 0
      },
      "enabled": true,
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "is_autoredeem_enabled": false,
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        }
      ],
      "prices": []
    },
    {
      "codes": {
        "active": 0,
        "total": 0,
        "used": 0
      },
      "enabled": false,
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "is_autoredeem_enabled": false,
      "name": "GOG",
      "platforms": [],
      "prices": []
    }
  ],
  "files": [
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 1,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Fwindows%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGd2luZG93cyUyRkluc3RhbGxIYW5nb3V0c0NoYXQuZG1nIiwiQ29uZGl0aW9uIjp7IkRhdGVMZXNzVGhhbiI6eyJBV1M6RXBvY2hUaW1lIjoxNTQ5NDQwMzU4fX19XX0_&Signature=bTVBhDCIKPpnkQYj0LlaTPeGvbhiFtRhrj~Opzk-a2F0w1OFhtCUZrNunjFZkwF8ehQIQlxlKNjvne1Djurvyz4hHHT8x2lU0Ns~jBu2Hf7FuCyun~pxmrI2qU1ReJXCP971rMjJqy9VcQnaD4i0IQ~CKPkoWE-QqPGZhH87hqRGw9HQCsriXilpVBLWf~9EFP97JghvobvMDXF3F-CHTmDnaSk-nGt~Lqhz1lXPhWCJupuYuYFPALpHPb7wnOl4GQfzq3sIEgUmMe2MnpjhUT1k~mDMwXSHhcUPL~QooRsxrP5XfzLPX8weiyG6l5bUpvEd~mVAe8WXeezy~s76Qg__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    },
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 2,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Flinux%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGbGludXglMkZJbnN0YWxsSGFuZ291dHNDaGF0LmRtZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTU0OTQ0MDM1OH19fV19&Signature=RhIxAxFSEb0vMYD~CnINwGInCRArTskQuA9OUOn3vMRY0VRCCXuzQIiTKxYYa2rX3S0NN0STeFCAYv-hqyc4tEXZj0FXpYiOIxgx1wZ1tv9HxloOQfGwejDMCg48XQeupbZM9biC-KgDNCIjKpIvKbc0NTYGpnBE4YO-f7-UbIiNBynjMQdVSTtLKrUxYdUW0lazXbb-BJSK5Sq~IaZubf7BMsoTOn67eeFLZX3EH7ntXs0NyPw~-bsx-YI8tgHQ5SXXiZtQ~2VKB4VjgsaZn7Tzx-tOTlWnvW3WYbFqjixhdN-jDwo-XwPMghR354440hau3Ncf3GCv4Vu3it880g__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    },
    {
      "name": "InstallHangoutsChat.dmg",
      "platform_id": 6,
      "url": "http://d2snhz4ugmmjtp.cloudfront.net/digital-content%2Fgame-files%2F4223%2Fmac%2FInstallHangoutsChat.dmg?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cDpcL1wvZDJzbmh6NHVnbW1qdHAuY2xvdWRmcm9udC5uZXRcL2RpZ2l0YWwtY29udGVudCUyRmdhbWUtZmlsZXMlMkY0MjIzJTJGbWFjJTJGSW5zdGFsbEhhbmdvdXRzQ2hhdC5kbWciLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE1NDk0NDAzNTh9fX1dfQ__&Signature=bcLMaQ3jxffu82tUsw96B7SqS5p2Zva4vp~le8OGpgKdEdXA0eRrud8moelyBZ2RRhfF9hwPBNxenwOjPQWrsCHQVS9faRZgMQPBzyCeZj1SsgnnOpdK~auIv4ltTt5twI6flkcUJqpEbCn8v5rViJg2pYctwxUPMJHNy~yV3K9-y4rnPNdl3vHzgZLT-Q9qjvzsR5G4oiW5ubGLkL~3nlBesLNSNyqY~fHKmDzwhvCLgQhD7W3pZ3QzO0D66UNUmgaKu8Ly-kwW3hKop4nveKEIvLUnN91JOf~ja30HMPfVCrVt-cP-E1W78Q~rMxSSnJ8xMI8Z7a9VqyvbCn3ntQ__&Key-Pair-Id=APKAI42XVMVSXXOJUDWQ"
    }
  ],
  "forum_link": null,
  "genre": null,
  "id": 4223,
  "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
  "locales_list": null,
  "long_description": null,
  "name": {
    "en": "test Entity"
  },
  "obtain_code_from_api": false,
  "obtain_code_from_db": true,
  "old_price": null,
  "parent_id": null,
  "publisher": null,
  "release_date": "2019-09-30T05:00:00+05:00",
  "sales_exist": false,
  "sku": "1234",
  "support_link": null,
  "system_requirements": "Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU",
  "tips_enabled": false,
  "video_link": null,
  "widget_settings": {
    "description_enabled": false,
    "image_enabled": false
  }
}

更新实体

更新游戏交付实体。

HTTP请求

PUT https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}

参数类型描述
project_id
integer项目ID。
sku
string唯一ID。SKU只能包含小写英文字母、连字符和下划线。更新SKU后,需重新配置所有小组件。已安装的小组件将停止工作。
name
object游戏交付 实体本地化名称的数组。
description
object游戏交付 实体本地化简单描述的数组。
system_requirements
string当前游戏的系统要求。
image_url
string图像URL。 可选
long_description
string游戏交付 实体的详细描述。 可选
locales_list
string本地化语种列表,使用逗号分隔。 可选
发布商
string游戏的发行商。 可选
developer
string游戏的开发商。 可选
string游戏相关视频的链接。 可选
genre
string游戏类型。 可选
additional_info
string游戏的附加信息。 可选
string论坛的链接。 可选
string提供支持的联系人网页链接。 可选
old_price
string游戏的原价。 可选
parent_id
integer父游戏 ID。 可选
default_currency
string默认购买货币。参照ISO 4217标准的三字母货币代码。
delivery
object预订密钥的交付日期。
delivery.release_date_type
string发布日期类型。可设置为具体的UTC日期或设置为一年中的某一季度。如为后者,'delivery.release_date_type'将设置为指定季度的最后一天。
delivery.delivery_method
string密钥交付方式。
delivery.delivery_method.default
string默认密钥交付方式。
delivery.delivery_method.exception
string密钥交付方式例外。
release_date
string游戏的预计发布日期。 可选
drm
array带有 DRM 相关数据的数组。
drm.id
integer可用于本游戏的 DRM 的 ID。
drm.name
integerDRM名称。
drm.prices
arrayDRM 游戏价格数组。 可选
drm.codes
arrayDRM的密钥数组。 可选
drm.codes.total
string密钥总数。 可选
drm.codes.active
string活动密钥个数。 可选
drm.codes.used
string已用密钥个数。 可选
drm.platforms
array带有 DRM 平台相关数据的数组。
drm.platforms.id
integer此 DRM 支持的平台的 ID。
drm.enabled
boolean是否对此游戏启用 DRM。
obtain_code_from_db
boolean是否使用艾克索拉数据库游戏密钥。 可选
obtain_code_from_api
boolean是否使用通过API收到的游戏密钥。 可选
files
array下载的安装文件的数组。 可选
files.name
string文件名。 可选
files.url
string下载URL。 可选
tips_enabled
boolean是否为开发者启用打赏。 可选
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
PUT https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}/

Headers:
  Authorization: Basic <your_authorization_basic_key>
Content-Type: application/json

Body:
  {
  "default_currency": "USD",
  "delivery": {
    "delivery_method": {
      "default": [
        "key"
      ],
      "exceptions": {}
    },
    "is_partner_side_processing": true,
    "is_pre_order": true,
    "release_date_type": "quarter"
  },
  "description": {
    "en": "A good new game"
  },
  "drm": [
    {
      "enabled": true,
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "name": "Steam",
      "platforms": [
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "enabled": true,
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        }
      ]
    },
    {
      "enabled": true,
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "name": "XBox",
      "platforms": [
        {
          "id": 7,
          "name": "XBox 360"
        }
      ]
    },
    {
      "enabled": false,
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "name": "Uplay",
      "platforms": []
    },
    {
      "enabled": false,
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "name": "Origin",
      "platforms": []
    },
    {
      "enabled": true,
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "is_autoredeem_enabled": false,
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        }
      ]
    },
    {
      "enabled": false,
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "name": "GOG",
      "platforms": []
    }
  ],
  "files": [],
  "name": {
    "en": "New game"
  },
  "obtain_code_from_api": false,
  "obtain_code_from_db": true,
  "release_date": "2019-09-30T05:00:00+05:00",
  "sales_exist": false,
  "sku": "1234",
  "system_requirements": "Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU"
}
curl --request PUT \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}/ \
  --header 'authorization: Basic <your_authorization_basic_key>' \
  --header 'content-type: application/json' \
  --data '{"name":{"en":"New game"},"description":{"en":"A good new game"},"default_currency":"USD","system_requirements":"Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU","release_date":"2019-09-30T05:00:00+05:00","delivery":{"release_date_type":"quarter","is_pre_order":true,"is_partner_side_processing":true,"delivery_method":{"default":["key"],"exceptions":{}}},"files":[],"obtain_code_from_api":false,"obtain_code_from_db":true,"sales_exist":false,"drm":[{"id":1,"name":"Steam","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg","platforms":[{"id":6,"name":"Mac"}],"enabled":true},{"id":2,"name":"Playstation","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg","platforms":[{"id":3,"name":"Playstation 3"}],"enabled":true},{"id":3,"name":"XBox","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg","platforms":[{"id":7,"name":"XBox 360"}],"enabled":true},{"id":4,"name":"Uplay","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg","platforms":[],"enabled":false},{"id":5,"name":"Origin","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg","platforms":[],"enabled":false},{"id":6,"name":"DRM Free","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg","platforms":[{"id":1,"name":"Windows"}],"enabled":true,"is_autoredeem_enabled":false},{"id":7,"name":"GOG","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg","platforms":[],"enabled":false}],"sku":"1234"}'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$body = new http\Message\Body;
$body->append('{"name":{"en":"New game"},"description":{"en":"A good new game"},"default_currency":"USD","system_requirements":"Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU","release_date":"2019-09-30T05:00:00+05:00","delivery":{"release_date_type":"quarter","is_pre_order":true,"is_partner_side_processing":true,"delivery_method":{"default":["key"],"exceptions":{}}},"files":[],"obtain_code_from_api":false,"obtain_code_from_db":true,"sales_exist":false,"drm":[{"id":1,"name":"Steam","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg","platforms":[{"id":6,"name":"Mac"}],"enabled":true},{"id":2,"name":"Playstation","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg","platforms":[{"id":3,"name":"Playstation 3"}],"enabled":true},{"id":3,"name":"XBox","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg","platforms":[{"id":7,"name":"XBox 360"}],"enabled":true},{"id":4,"name":"Uplay","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg","platforms":[],"enabled":false},{"id":5,"name":"Origin","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg","platforms":[],"enabled":false},{"id":6,"name":"DRM Free","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg","platforms":[{"id":1,"name":"Windows"}],"enabled":true,"is_autoredeem_enabled":false},{"id":7,"name":"GOG","image":"//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg","platforms":[],"enabled":false}],"sku":"1234"}');

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}/');
$request->setRequestMethod('PUT');
$request->setBody($body);

$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>',
  'content-type' => 'application/json'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}/");
var request = new RestRequest(Method.PUT);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":{\"en\":\"New game\"},\"description\":{\"en\":\"A good new game\"},\"default_currency\":\"USD\",\"system_requirements\":\"Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU\",\"release_date\":\"2019-09-30T05:00:00+05:00\",\"delivery\":{\"release_date_type\":\"quarter\",\"is_pre_order\":true,\"is_partner_side_processing\":true,\"delivery_method\":{\"default\":[\"key\"],\"exceptions\":{}}},\"files\":[],\"obtain_code_from_api\":false,\"obtain_code_from_db\":true,\"sales_exist\":false,\"drm\":[{\"id\":1,\"name\":\"Steam\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg\",\"platforms\":[{\"id\":6,\"name\":\"Mac\"}],\"enabled\":true},{\"id\":2,\"name\":\"Playstation\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg\",\"platforms\":[{\"id\":3,\"name\":\"Playstation 3\"}],\"enabled\":true},{\"id\":3,\"name\":\"XBox\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg\",\"platforms\":[{\"id\":7,\"name\":\"XBox 360\"}],\"enabled\":true},{\"id\":4,\"name\":\"Uplay\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg\",\"platforms\":[],\"enabled\":false},{\"id\":5,\"name\":\"Origin\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg\",\"platforms\":[],\"enabled\":false},{\"id\":6,\"name\":\"DRM Free\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg\",\"platforms\":[{\"id\":1,\"name\":\"Windows\"}],\"enabled\":true,\"is_autoredeem_enabled\":false},{\"id\":7,\"name\":\"GOG\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg\",\"platforms\":[],\"enabled\":false}],\"sku\":\"1234\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

payload = "{\"name\":{\"en\":\"New game\"},\"description\":{\"en\":\"A good new game\"},\"default_currency\":\"USD\",\"system_requirements\":\"Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU\",\"release_date\":\"2019-09-30T05:00:00+05:00\",\"delivery\":{\"release_date_type\":\"quarter\",\"is_pre_order\":true,\"is_partner_side_processing\":true,\"delivery_method\":{\"default\":[\"key\"],\"exceptions\":{}}},\"files\":[],\"obtain_code_from_api\":false,\"obtain_code_from_db\":true,\"sales_exist\":false,\"drm\":[{\"id\":1,\"name\":\"Steam\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg\",\"platforms\":[{\"id\":6,\"name\":\"Mac\"}],\"enabled\":true},{\"id\":2,\"name\":\"Playstation\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg\",\"platforms\":[{\"id\":3,\"name\":\"Playstation 3\"}],\"enabled\":true},{\"id\":3,\"name\":\"XBox\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg\",\"platforms\":[{\"id\":7,\"name\":\"XBox 360\"}],\"enabled\":true},{\"id\":4,\"name\":\"Uplay\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg\",\"platforms\":[],\"enabled\":false},{\"id\":5,\"name\":\"Origin\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg\",\"platforms\":[],\"enabled\":false},{\"id\":6,\"name\":\"DRM Free\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg\",\"platforms\":[{\"id\":1,\"name\":\"Windows\"}],\"enabled\":true,\"is_autoredeem_enabled\":false},{\"id\":7,\"name\":\"GOG\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg\",\"platforms\":[],\"enabled\":false}],\"sku\":\"1234\"}"

headers = {
    'content-type': "application/json",
    'authorization': "Basic <your_authorization_basic_key>"
    }

conn.request("PUT", "/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}/", payload, headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}/")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Put.new(url)
request["content-type"] = 'application/json'
request["authorization"] = 'Basic <your_authorization_basic_key>'
request.body = "{\"name\":{\"en\":\"New game\"},\"description\":{\"en\":\"A good new game\"},\"default_currency\":\"USD\",\"system_requirements\":\"Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU\",\"release_date\":\"2019-09-30T05:00:00+05:00\",\"delivery\":{\"release_date_type\":\"quarter\",\"is_pre_order\":true,\"is_partner_side_processing\":true,\"delivery_method\":{\"default\":[\"key\"],\"exceptions\":{}}},\"files\":[],\"obtain_code_from_api\":false,\"obtain_code_from_db\":true,\"sales_exist\":false,\"drm\":[{\"id\":1,\"name\":\"Steam\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg\",\"platforms\":[{\"id\":6,\"name\":\"Mac\"}],\"enabled\":true},{\"id\":2,\"name\":\"Playstation\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg\",\"platforms\":[{\"id\":3,\"name\":\"Playstation 3\"}],\"enabled\":true},{\"id\":3,\"name\":\"XBox\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg\",\"platforms\":[{\"id\":7,\"name\":\"XBox 360\"}],\"enabled\":true},{\"id\":4,\"name\":\"Uplay\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg\",\"platforms\":[],\"enabled\":false},{\"id\":5,\"name\":\"Origin\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg\",\"platforms\":[],\"enabled\":false},{\"id\":6,\"name\":\"DRM Free\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg\",\"platforms\":[{\"id\":1,\"name\":\"Windows\"}],\"enabled\":true,\"is_autoredeem_enabled\":false},{\"id\":7,\"name\":\"GOG\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg\",\"platforms\":[],\"enabled\":false}],\"sku\":\"1234\"}"

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"name\":{\"en\":\"New game\"},\"description\":{\"en\":\"A good new game\"},\"default_currency\":\"USD\",\"system_requirements\":\"Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU\",\"release_date\":\"2019-09-30T05:00:00+05:00\",\"delivery\":{\"release_date_type\":\"quarter\",\"is_pre_order\":true,\"is_partner_side_processing\":true,\"delivery_method\":{\"default\":[\"key\"],\"exceptions\":{}}},\"files\":[],\"obtain_code_from_api\":false,\"obtain_code_from_db\":true,\"sales_exist\":false,\"drm\":[{\"id\":1,\"name\":\"Steam\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg\",\"platforms\":[{\"id\":6,\"name\":\"Mac\"}],\"enabled\":true},{\"id\":2,\"name\":\"Playstation\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg\",\"platforms\":[{\"id\":3,\"name\":\"Playstation 3\"}],\"enabled\":true},{\"id\":3,\"name\":\"XBox\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg\",\"platforms\":[{\"id\":7,\"name\":\"XBox 360\"}],\"enabled\":true},{\"id\":4,\"name\":\"Uplay\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg\",\"platforms\":[],\"enabled\":false},{\"id\":5,\"name\":\"Origin\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg\",\"platforms\":[],\"enabled\":false},{\"id\":6,\"name\":\"DRM Free\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg\",\"platforms\":[{\"id\":1,\"name\":\"Windows\"}],\"enabled\":true,\"is_autoredeem_enabled\":false},{\"id\":7,\"name\":\"GOG\",\"image\":\"//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg\",\"platforms\":[],\"enabled\":false}],\"sku\":\"1234\"}");
Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}/")
  .put(body)
  .addHeader("content-type", "application/json")
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = JSON.stringify({
  "name": {
    "en": "New game"
  },
  "description": {
    "en": "A good new game"
  },
  "default_currency": "USD",
  "system_requirements": "Windows 7/8/10 64-bit, Core i3 2.4 Ghz, 4 GByte RAM, Nvidia GTX 660 or AMD Radeon HD 7870 equivalent DX11 GPU",
  "release_date": "2019-09-30T05:00:00+05:00",
  "delivery": {
    "release_date_type": "quarter",
    "is_pre_order": true,
    "is_partner_side_processing": true,
    "delivery_method": {
      "default": [
        "key"
      ],
      "exceptions": {}
    }
  },
  "files": [],
  "obtain_code_from_api": false,
  "obtain_code_from_db": true,
  "sales_exist": false,
  "drm": [
    {
      "id": 1,
      "name": "Steam",
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "platforms": [
        {
          "id": 6,
          "name": "Mac"
        }
      ],
      "enabled": true
    },
    {
      "id": 2,
      "name": "Playstation",
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        }
      ],
      "enabled": true
    },
    {
      "id": 3,
      "name": "XBox",
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "platforms": [
        {
          "id": 7,
          "name": "XBox 360"
        }
      ],
      "enabled": true
    },
    {
      "id": 4,
      "name": "Uplay",
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "platforms": [],
      "enabled": false
    },
    {
      "id": 5,
      "name": "Origin",
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "platforms": [],
      "enabled": false
    },
    {
      "id": 6,
      "name": "DRM Free",
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        }
      ],
      "enabled": true,
      "is_autoredeem_enabled": false
    },
    {
      "id": 7,
      "name": "GOG",
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "platforms": [],
      "enabled": false
    }
  ],
  "sku": "1234"
});

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("PUT", "https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/{game_delivery_id}/");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应


获取实体列表

所有游戏交付实体的列表。

HTTP请求

GET https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery

参数类型描述
project_id
integer项目ID。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/projects/{project_id}/game_delivery", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
[
  {
    "default_currency": "USD",
    "drm": [
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 1,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
        "name": "Steam",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 2,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
        "name": "Playstation",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 3,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
        "name": "XBox",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 4,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
        "name": "Uplay",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 5,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
        "name": "Origin",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 6,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
        "name": "DRM Free",
        "platforms": [
          {
            "id": 1,
            "name": "Windows"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 7,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
        "name": "GOG",
        "platforms": [],
        "prices": []
      }
    ],
    "id": 4202,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "thg",
    "parent_id": null,
    "sku": "6433",
    "widget_settings": {
      "description_enabled": false,
      "image_enabled": false
    }
  },
  {
    "default_currency": "USD",
    "drm": [
      {
        "codes": {
          "active": 3,
          "total": 3,
          "used": 0
        },
        "enabled": true,
        "id": 1,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
        "name": "Steam",
        "platforms": [
          {
            "id": 6,
            "name": "Mac"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 2,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
        "name": "Playstation",
        "platforms": [
          {
            "id": 3,
            "name": "Playstation 3"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 3,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
        "name": "XBox",
        "platforms": [
          {
            "id": 7,
            "name": "XBox 360"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 4,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
        "name": "Uplay",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 5,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
        "name": "Origin",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 6,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
        "name": "DRM Free",
        "platforms": [
          {
            "id": 1,
            "name": "Windows"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 7,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
        "name": "GOG",
        "platforms": [],
        "prices": []
      }
    ],
    "id": 4223,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "test Entity",
    "parent_id": null,
    "sku": "1234",
    "widget_settings": {
      "description_enabled": false,
      "image_enabled": false
    }
  }
]
[
  {
    "default_currency": "USD",
    "drm": [
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 1,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
        "name": "Steam",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 2,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
        "name": "Playstation",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 3,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
        "name": "XBox",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 4,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
        "name": "Uplay",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 5,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
        "name": "Origin",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 6,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
        "name": "DRM Free",
        "platforms": [
          {
            "id": 1,
            "name": "Windows"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 7,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
        "name": "GOG",
        "platforms": [],
        "prices": []
      }
    ],
    "id": 4202,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "thg",
    "parent_id": null,
    "sku": "6433",
    "widget_settings": {
      "description_enabled": false,
      "image_enabled": false
    }
  },
  {
    "default_currency": "USD",
    "drm": [
      {
        "codes": {
          "active": 3,
          "total": 3,
          "used": 0
        },
        "enabled": true,
        "id": 1,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
        "name": "Steam",
        "platforms": [
          {
            "id": 6,
            "name": "Mac"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 2,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
        "name": "Playstation",
        "platforms": [
          {
            "id": 3,
            "name": "Playstation 3"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 3,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
        "name": "XBox",
        "platforms": [
          {
            "id": 7,
            "name": "XBox 360"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 4,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
        "name": "Uplay",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 5,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
        "name": "Origin",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 6,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
        "name": "DRM Free",
        "platforms": [
          {
            "id": 1,
            "name": "Windows"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 7,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
        "name": "GOG",
        "platforms": [],
        "prices": []
      }
    ],
    "id": 4223,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "test Entity",
    "parent_id": null,
    "sku": "1234",
    "widget_settings": {
      "description_enabled": false,
      "image_enabled": false
    }
  }
]
[
  {
    "default_currency": "USD",
    "drm": [
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 1,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
        "name": "Steam",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 2,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
        "name": "Playstation",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 3,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
        "name": "XBox",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 4,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
        "name": "Uplay",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 5,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
        "name": "Origin",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 6,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
        "name": "DRM Free",
        "platforms": [
          {
            "id": 1,
            "name": "Windows"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 7,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
        "name": "GOG",
        "platforms": [],
        "prices": []
      }
    ],
    "id": 4202,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "thg",
    "parent_id": null,
    "sku": "6433",
    "widget_settings": {
      "description_enabled": false,
      "image_enabled": false
    }
  },
  {
    "default_currency": "USD",
    "drm": [
      {
        "codes": {
          "active": 3,
          "total": 3,
          "used": 0
        },
        "enabled": true,
        "id": 1,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
        "name": "Steam",
        "platforms": [
          {
            "id": 6,
            "name": "Mac"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 2,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
        "name": "Playstation",
        "platforms": [
          {
            "id": 3,
            "name": "Playstation 3"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 3,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
        "name": "XBox",
        "platforms": [
          {
            "id": 7,
            "name": "XBox 360"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 4,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
        "name": "Uplay",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 5,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
        "name": "Origin",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 6,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
        "name": "DRM Free",
        "platforms": [
          {
            "id": 1,
            "name": "Windows"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 7,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
        "name": "GOG",
        "platforms": [],
        "prices": []
      }
    ],
    "id": 4223,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "test Entity",
    "parent_id": null,
    "sku": "1234",
    "widget_settings": {
      "description_enabled": false,
      "image_enabled": false
    }
  }
]
[
  {
    "default_currency": "USD",
    "drm": [
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 1,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
        "name": "Steam",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 2,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
        "name": "Playstation",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 3,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
        "name": "XBox",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 4,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
        "name": "Uplay",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 5,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
        "name": "Origin",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 6,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
        "name": "DRM Free",
        "platforms": [
          {
            "id": 1,
            "name": "Windows"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 7,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
        "name": "GOG",
        "platforms": [],
        "prices": []
      }
    ],
    "id": 4202,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "thg",
    "parent_id": null,
    "sku": "6433",
    "widget_settings": {
      "description_enabled": false,
      "image_enabled": false
    }
  },
  {
    "default_currency": "USD",
    "drm": [
      {
        "codes": {
          "active": 3,
          "total": 3,
          "used": 0
        },
        "enabled": true,
        "id": 1,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
        "name": "Steam",
        "platforms": [
          {
            "id": 6,
            "name": "Mac"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 2,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
        "name": "Playstation",
        "platforms": [
          {
            "id": 3,
            "name": "Playstation 3"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 3,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
        "name": "XBox",
        "platforms": [
          {
            "id": 7,
            "name": "XBox 360"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 4,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
        "name": "Uplay",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 5,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
        "name": "Origin",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 6,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
        "name": "DRM Free",
        "platforms": [
          {
            "id": 1,
            "name": "Windows"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 7,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
        "name": "GOG",
        "platforms": [],
        "prices": []
      }
    ],
    "id": 4223,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "test Entity",
    "parent_id": null,
    "sku": "1234",
    "widget_settings": {
      "description_enabled": false,
      "image_enabled": false
    }
  }
]
[
  {
    "default_currency": "USD",
    "drm": [
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 1,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
        "name": "Steam",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 2,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
        "name": "Playstation",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 3,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
        "name": "XBox",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 4,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
        "name": "Uplay",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 5,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
        "name": "Origin",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 6,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
        "name": "DRM Free",
        "platforms": [
          {
            "id": 1,
            "name": "Windows"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 7,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
        "name": "GOG",
        "platforms": [],
        "prices": []
      }
    ],
    "id": 4202,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "thg",
    "parent_id": null,
    "sku": "6433",
    "widget_settings": {
      "description_enabled": false,
      "image_enabled": false
    }
  },
  {
    "default_currency": "USD",
    "drm": [
      {
        "codes": {
          "active": 3,
          "total": 3,
          "used": 0
        },
        "enabled": true,
        "id": 1,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
        "name": "Steam",
        "platforms": [
          {
            "id": 6,
            "name": "Mac"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 2,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
        "name": "Playstation",
        "platforms": [
          {
            "id": 3,
            "name": "Playstation 3"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 3,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
        "name": "XBox",
        "platforms": [
          {
            "id": 7,
            "name": "XBox 360"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 4,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
        "name": "Uplay",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 5,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
        "name": "Origin",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 6,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
        "name": "DRM Free",
        "platforms": [
          {
            "id": 1,
            "name": "Windows"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 7,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
        "name": "GOG",
        "platforms": [],
        "prices": []
      }
    ],
    "id": 4223,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "test Entity",
    "parent_id": null,
    "sku": "1234",
    "widget_settings": {
      "description_enabled": false,
      "image_enabled": false
    }
  }
]
[
  {
    "default_currency": "USD",
    "drm": [
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 1,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
        "name": "Steam",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 2,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
        "name": "Playstation",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 3,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
        "name": "XBox",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 4,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
        "name": "Uplay",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 5,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
        "name": "Origin",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 6,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
        "name": "DRM Free",
        "platforms": [
          {
            "id": 1,
            "name": "Windows"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 7,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
        "name": "GOG",
        "platforms": [],
        "prices": []
      }
    ],
    "id": 4202,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "thg",
    "parent_id": null,
    "sku": "6433",
    "widget_settings": {
      "description_enabled": false,
      "image_enabled": false
    }
  },
  {
    "default_currency": "USD",
    "drm": [
      {
        "codes": {
          "active": 3,
          "total": 3,
          "used": 0
        },
        "enabled": true,
        "id": 1,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
        "name": "Steam",
        "platforms": [
          {
            "id": 6,
            "name": "Mac"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 2,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
        "name": "Playstation",
        "platforms": [
          {
            "id": 3,
            "name": "Playstation 3"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 3,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
        "name": "XBox",
        "platforms": [
          {
            "id": 7,
            "name": "XBox 360"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 4,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
        "name": "Uplay",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 5,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
        "name": "Origin",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 6,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
        "name": "DRM Free",
        "platforms": [
          {
            "id": 1,
            "name": "Windows"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 7,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
        "name": "GOG",
        "platforms": [],
        "prices": []
      }
    ],
    "id": 4223,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "test Entity",
    "parent_id": null,
    "sku": "1234",
    "widget_settings": {
      "description_enabled": false,
      "image_enabled": false
    }
  }
]
[
  {
    "default_currency": "USD",
    "drm": [
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 1,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
        "name": "Steam",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 2,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
        "name": "Playstation",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 3,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
        "name": "XBox",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 4,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
        "name": "Uplay",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 5,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
        "name": "Origin",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 6,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
        "name": "DRM Free",
        "platforms": [
          {
            "id": 1,
            "name": "Windows"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 7,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
        "name": "GOG",
        "platforms": [],
        "prices": []
      }
    ],
    "id": 4202,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "thg",
    "parent_id": null,
    "sku": "6433",
    "widget_settings": {
      "description_enabled": false,
      "image_enabled": false
    }
  },
  {
    "default_currency": "USD",
    "drm": [
      {
        "codes": {
          "active": 3,
          "total": 3,
          "used": 0
        },
        "enabled": true,
        "id": 1,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
        "name": "Steam",
        "platforms": [
          {
            "id": 6,
            "name": "Mac"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 2,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
        "name": "Playstation",
        "platforms": [
          {
            "id": 3,
            "name": "Playstation 3"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 3,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
        "name": "XBox",
        "platforms": [
          {
            "id": 7,
            "name": "XBox 360"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 4,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
        "name": "Uplay",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 5,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
        "name": "Origin",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 6,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
        "name": "DRM Free",
        "platforms": [
          {
            "id": 1,
            "name": "Windows"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 7,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
        "name": "GOG",
        "platforms": [],
        "prices": []
      }
    ],
    "id": 4223,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "test Entity",
    "parent_id": null,
    "sku": "1234",
    "widget_settings": {
      "description_enabled": false,
      "image_enabled": false
    }
  }
]
[
  {
    "default_currency": "USD",
    "drm": [
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 1,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
        "name": "Steam",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 2,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
        "name": "Playstation",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 3,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
        "name": "XBox",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 4,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
        "name": "Uplay",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 5,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
        "name": "Origin",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 6,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
        "name": "DRM Free",
        "platforms": [
          {
            "id": 1,
            "name": "Windows"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 7,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
        "name": "GOG",
        "platforms": [],
        "prices": []
      }
    ],
    "id": 4202,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "thg",
    "parent_id": null,
    "sku": "6433",
    "widget_settings": {
      "description_enabled": false,
      "image_enabled": false
    }
  },
  {
    "default_currency": "USD",
    "drm": [
      {
        "codes": {
          "active": 3,
          "total": 3,
          "used": 0
        },
        "enabled": true,
        "id": 1,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
        "name": "Steam",
        "platforms": [
          {
            "id": 6,
            "name": "Mac"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 2,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
        "name": "Playstation",
        "platforms": [
          {
            "id": 3,
            "name": "Playstation 3"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 3,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
        "name": "XBox",
        "platforms": [
          {
            "id": 7,
            "name": "XBox 360"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 4,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
        "name": "Uplay",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 5,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
        "name": "Origin",
        "platforms": [],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": true,
        "id": 6,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
        "name": "DRM Free",
        "platforms": [
          {
            "id": 1,
            "name": "Windows"
          }
        ],
        "prices": []
      },
      {
        "codes": {
          "active": 0,
          "total": 0,
          "used": 0
        },
        "enabled": false,
        "id": 7,
        "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
        "name": "GOG",
        "platforms": [],
        "prices": []
      }
    ],
    "id": 4223,
    "image_url": "//cdn.xsolla.net/img/misc/merchant/default-item.png",
    "localized_name": "test Entity",
    "parent_id": null,
    "sku": "1234",
    "widget_settings": {
      "description_enabled": false,
      "image_enabled": false
    }
  }
]

获取DRM列表

可用DRM平台的列表。

HTTP请求

GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/drm

参数类型描述
merchant_id
integer商户ID。
Copy
Full screen
http
  • http
  • curl
  • php
  • C#
  • python
  • ruby
  • java
  • js
请求
GET https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/drm

Headers:
  Authorization: Basic <your_authorization_basic_key>
curl --request GET \
  --url https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/drm \
  --header 'authorization: Basic <your_authorization_basic_key>'
<?php

$client = new http\Client;
$request = new http\Client\Request;

$request->setRequestUrl('https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/drm');
$request->setRequestMethod('GET');
$request->setHeaders(array(
  'authorization' => 'Basic <your_authorization_basic_key>'
));

$client->enqueue($request)->send();
$response = $client->getResponse();

echo $response->getBody();
var client = new RestClient("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/drm");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "Basic <your_authorization_basic_key>");
IRestResponse response = client.Execute(request);
import http.client

conn = http.client.HTTPSConnection("api.xsolla.com")

headers = { 'authorization': "Basic <your_authorization_basic_key>" }

conn.request("GET", "/merchant/v2/merchants/{merchant_id}/drm", headers=headers)

res = conn.getresponse()
data = res.read()

print(data.decode("utf-8"))
require 'uri'
require 'net/http'

url = URI("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/drm")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE

request = Net::HTTP::Get.new(url)
request["authorization"] = 'Basic <your_authorization_basic_key>'

response = http.request(request)
puts response.read_body
OkHttpClient client = new OkHttpClient();

Request request = new Request.Builder()
  .url("https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/drm")
  .get()
  .addHeader("authorization", "Basic <your_authorization_basic_key>")
  .build();

Response response = client.newCall(request).execute();
var data = null;

var xhr = new XMLHttpRequest();
xhr.withCredentials = true;

xhr.addEventListener("readystatechange", function () {
  if (this.readyState === this.DONE) {
    console.log(this.responseText);
  }
});

xhr.open("GET", "https://api.xsolla.com/merchant/v2/merchants/{merchant_id}/drm");
xhr.setRequestHeader("authorization", "Basic <your_authorization_basic_key>");

xhr.send(data);
响应
{
  "drm": [
    {
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "name": "Steam",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        },
        {
          "id": 4,
          "name": "Playstation 4"
        }
      ]
    },
    {
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "name": "XBox",
      "platforms": [
        {
          "id": 5,
          "name": "XBox One"
        },
        {
          "id": 7,
          "name": "XBox 360"
        }
      ]
    },
    {
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "name": "Uplay",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "name": "Origin",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "name": "GOG",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    }
  ],
  "platforms": [
    {
      "id": 1,
      "name": "Windows"
    },
    {
      "id": 2,
      "name": "Linux"
    },
    {
      "id": 3,
      "name": "Playstation 3"
    },
    {
      "id": 4,
      "name": "Playstation 4"
    },
    {
      "id": 5,
      "name": "XBox One"
    },
    {
      "id": 6,
      "name": "Mac"
    },
    {
      "id": 7,
      "name": "XBox 360"
    }
  ]
}
{
  "drm": [
    {
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "name": "Steam",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        },
        {
          "id": 4,
          "name": "Playstation 4"
        }
      ]
    },
    {
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "name": "XBox",
      "platforms": [
        {
          "id": 5,
          "name": "XBox One"
        },
        {
          "id": 7,
          "name": "XBox 360"
        }
      ]
    },
    {
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "name": "Uplay",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "name": "Origin",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "name": "GOG",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    }
  ],
  "platforms": [
    {
      "id": 1,
      "name": "Windows"
    },
    {
      "id": 2,
      "name": "Linux"
    },
    {
      "id": 3,
      "name": "Playstation 3"
    },
    {
      "id": 4,
      "name": "Playstation 4"
    },
    {
      "id": 5,
      "name": "XBox One"
    },
    {
      "id": 6,
      "name": "Mac"
    },
    {
      "id": 7,
      "name": "XBox 360"
    }
  ]
}
{
  "drm": [
    {
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "name": "Steam",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        },
        {
          "id": 4,
          "name": "Playstation 4"
        }
      ]
    },
    {
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "name": "XBox",
      "platforms": [
        {
          "id": 5,
          "name": "XBox One"
        },
        {
          "id": 7,
          "name": "XBox 360"
        }
      ]
    },
    {
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "name": "Uplay",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "name": "Origin",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "name": "GOG",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    }
  ],
  "platforms": [
    {
      "id": 1,
      "name": "Windows"
    },
    {
      "id": 2,
      "name": "Linux"
    },
    {
      "id": 3,
      "name": "Playstation 3"
    },
    {
      "id": 4,
      "name": "Playstation 4"
    },
    {
      "id": 5,
      "name": "XBox One"
    },
    {
      "id": 6,
      "name": "Mac"
    },
    {
      "id": 7,
      "name": "XBox 360"
    }
  ]
}
{
  "drm": [
    {
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "name": "Steam",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        },
        {
          "id": 4,
          "name": "Playstation 4"
        }
      ]
    },
    {
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "name": "XBox",
      "platforms": [
        {
          "id": 5,
          "name": "XBox One"
        },
        {
          "id": 7,
          "name": "XBox 360"
        }
      ]
    },
    {
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "name": "Uplay",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "name": "Origin",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "name": "GOG",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    }
  ],
  "platforms": [
    {
      "id": 1,
      "name": "Windows"
    },
    {
      "id": 2,
      "name": "Linux"
    },
    {
      "id": 3,
      "name": "Playstation 3"
    },
    {
      "id": 4,
      "name": "Playstation 4"
    },
    {
      "id": 5,
      "name": "XBox One"
    },
    {
      "id": 6,
      "name": "Mac"
    },
    {
      "id": 7,
      "name": "XBox 360"
    }
  ]
}
{
  "drm": [
    {
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "name": "Steam",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        },
        {
          "id": 4,
          "name": "Playstation 4"
        }
      ]
    },
    {
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "name": "XBox",
      "platforms": [
        {
          "id": 5,
          "name": "XBox One"
        },
        {
          "id": 7,
          "name": "XBox 360"
        }
      ]
    },
    {
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "name": "Uplay",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "name": "Origin",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "name": "GOG",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    }
  ],
  "platforms": [
    {
      "id": 1,
      "name": "Windows"
    },
    {
      "id": 2,
      "name": "Linux"
    },
    {
      "id": 3,
      "name": "Playstation 3"
    },
    {
      "id": 4,
      "name": "Playstation 4"
    },
    {
      "id": 5,
      "name": "XBox One"
    },
    {
      "id": 6,
      "name": "Mac"
    },
    {
      "id": 7,
      "name": "XBox 360"
    }
  ]
}
{
  "drm": [
    {
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "name": "Steam",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        },
        {
          "id": 4,
          "name": "Playstation 4"
        }
      ]
    },
    {
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "name": "XBox",
      "platforms": [
        {
          "id": 5,
          "name": "XBox One"
        },
        {
          "id": 7,
          "name": "XBox 360"
        }
      ]
    },
    {
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "name": "Uplay",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "name": "Origin",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "name": "GOG",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    }
  ],
  "platforms": [
    {
      "id": 1,
      "name": "Windows"
    },
    {
      "id": 2,
      "name": "Linux"
    },
    {
      "id": 3,
      "name": "Playstation 3"
    },
    {
      "id": 4,
      "name": "Playstation 4"
    },
    {
      "id": 5,
      "name": "XBox One"
    },
    {
      "id": 6,
      "name": "Mac"
    },
    {
      "id": 7,
      "name": "XBox 360"
    }
  ]
}
{
  "drm": [
    {
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "name": "Steam",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        },
        {
          "id": 4,
          "name": "Playstation 4"
        }
      ]
    },
    {
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "name": "XBox",
      "platforms": [
        {
          "id": 5,
          "name": "XBox One"
        },
        {
          "id": 7,
          "name": "XBox 360"
        }
      ]
    },
    {
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "name": "Uplay",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "name": "Origin",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "name": "GOG",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    }
  ],
  "platforms": [
    {
      "id": 1,
      "name": "Windows"
    },
    {
      "id": 2,
      "name": "Linux"
    },
    {
      "id": 3,
      "name": "Playstation 3"
    },
    {
      "id": 4,
      "name": "Playstation 4"
    },
    {
      "id": 5,
      "name": "XBox One"
    },
    {
      "id": 6,
      "name": "Mac"
    },
    {
      "id": 7,
      "name": "XBox 360"
    }
  ]
}
{
  "drm": [
    {
      "id": 1,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/1.1472111837.svg",
      "name": "Steam",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 2,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/2.1535378400.svg",
      "name": "Playstation",
      "platforms": [
        {
          "id": 3,
          "name": "Playstation 3"
        },
        {
          "id": 4,
          "name": "Playstation 4"
        }
      ]
    },
    {
      "id": 3,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/3.1460367796.svg",
      "name": "XBox",
      "platforms": [
        {
          "id": 5,
          "name": "XBox One"
        },
        {
          "id": 7,
          "name": "XBox 360"
        }
      ]
    },
    {
      "id": 4,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/4.1460367796.svg",
      "name": "Uplay",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 5,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/5.1460367796.svg",
      "name": "Origin",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 6,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/6.1509084108.svg",
      "name": "DRM Free",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    },
    {
      "id": 7,
      "image": "//cdn.xsolla.net/misc/game_delivery/drms/set2/7.1492784697.svg",
      "name": "GOG",
      "platforms": [
        {
          "id": 1,
          "name": "Windows"
        },
        {
          "id": 2,
          "name": "Linux"
        },
        {
          "id": 6,
          "name": "Mac"
        }
      ]
    }
  ],
  "platforms": [
    {
      "id": 1,
      "name": "Windows"
    },
    {
      "id": 2,
      "name": "Linux"
    },
    {
      "id": 3,
      "name": "Playstation 3"
    },
    {
      "id": 4,
      "name": "Playstation 4"
    },
    {
      "id": 5,
      "name": "XBox One"
    },
    {
      "id": 6,
      "name": "Mac"
    },
    {
      "id": 7,
      "name": "XBox 360"
    }
  ]
}

激活密钥

激活游戏密钥。

HTTP请求

POST https://api.xsolla.com/merchant/v2/projects/{project_id}/game_delivery/redeem_key

参数类型描述
digital_content_sku
string唯一密钥套餐ID。
drm_sku
string艾克索拉中的唯一DRM ID。 必需
key
string激活密钥。 必需
user_id
string用户ID。 必需
user_email
string用户电子邮件。 必需
language
string参照ISO-639-1标准的用户语言代码。 必需
encoded
boolean是否使用了密钥加密。如为‘true’,则使用项目密钥根据AES-256-ECB算法对密钥进行加密。默认为‘false’。