Get resource subscription fields
Description
Get information about system and additional subscription fields.
Request URL
Method: POST
https://example.com/api/v1.1/resources/fields_get
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
id | int | 1 | Yes | Resource ID |
channel | string | "email" "sms" "push" "telegram_bot" "whatsapp" | Yes | Resource subscription channel |
Request example
- JSON
- XML
{
"id": 1,
"channel": "email",
"token": "abcdefghijklmnqrstuvwxyz"
}
<?xml version="1.0" encoding="UTF-8" ?>
<xml>
<id>1</id>
<channel>email</channel>
<token>abcdefghijklmnqrstuvwxyz</token>
</xml>
Response example
- JSON
- XML
{
"data": [
{
"category": "custom",
"title": "New_field_1",
"name": "api_new_field_1",
"required": false,
"type": "int"
},
{
"category": "system",
"title": "Device type",
"name": "_device_type",
"required": false,
"type": "unicode",
"dictionary": "devices"
},
{
"category": "system",
"title": "Device model",
"name": "_device_model",
"required": false,
"type": "unicode"
},
{
"category": "system",
"title": "Device name",
"name": "_device_name",
"required": false,
"type": "unicode"
},
{
"category": "system",
"title": "Platform",
"name": "_os",
"required": false,
"type": "unicode",
"dictionary": "oses"
},
{
"category": "system",
"title": "Platform version",
"name": "_os_ver",
"required": false,
"type": "version"
},
{
"category": "system",
"title": "Platform time zone",
"name": "_os_tz",
"required": false,
"type": "unicode",
"dictionary": "tz"
},
{
"category": "system",
"title": "Platform language",
"name": "_os_language",
"required": false,
"type": "unicode",
"dictionary": "languages"
},
{
"category": "system",
"title": "Ad tracking allowed",
"name": "_ad_track",
"required": false,
"type": "bool"
},
{
"category": "system",
"title": "Ad identifier",
"name": "_ad_id",
"required": false,
"type": "unicode"
},
{
"category": "system",
"title": "Application ID",
"name": "_app_id",
"required": false,
"type": "unicode"
},
{
"category": "system",
"title": "Application installation ID",
"name": "_app_iid",
"required": false,
"type": "unicode"
},
{
"category": "system",
"title": "Application version",
"name": "_app_ver",
"required": false,
"type": "version"
},
{
"category": "system",
"title": "Browser",
"name": "_browser_name",
"required": false,
"type": "unicode",
"dictionary": "browsers"
},
{
"category": "system",
"title": "Browser version",
"name": "_browser_ver",
"required": false,
"type": "version"
}
],
"error": 0,
"error_text": "Successful operation"
}
<?xml version="1.0" encoding="UTF-8" ?>
<xml>
<data>
<category>custom</category>
<title>New_field_1</title>
<name>api_new_field_1</name>
<required>false</required>
<type>int</type>
</data>
<data>
<category>system</category>
<title>Device type</title>
<name>_device_type</name>
<required>false</required>
<type>unicode</type>
<dictionary>devices</dictionary>
</data>
<data>
<category>system</category>
<title>Device model</title>
<name>_device_model</name>
<required>false</required>
<type>unicode</type>
</data>
<data>
<category>system</category>
<title>Device name</title>
<name>_device_name</name>
<required>false</required>
<type>unicode</type>
</data>
<data>
<category>system</category>
<title>Platform</title>
<name>_os</name>
<required>false</required>
<type>unicode</type>
<dictionary>oses</dictionary>
</data>
<data>
<category>system</category>
<title>Platform version</title>
<name>_os_ver</name>
<required>false</required>
<type>version</type>
</data>
<data>
<category>system</category>
<title>Platform time zone</title>
<name>_os_tz</name>
<required>false</required>
<type>unicode</type>
<dictionary>tz</dictionary>
</data>
<data>
<category>system</category>
<title>Platform language</title>
<name>_os_language</name>
<required>false</required>
<type>unicode</type>
<dictionary>languages</dictionary>
</data>
<data>
<category>system</category>
<title>Ad tracking allowed</title>
<name>_ad_track</name>
<required>false</required>
<type>bool</type>
</data>
<data>
<category>system</category>
<title>Ad identifier</title>
<name>_ad_id</name>
<required>false</required>
<type>unicode</type>
</data>
<data>
<category>system</category>
<title>Application ID</title>
<name>_app_id</name>
<required>false</required>
<type>unicode</type>
</data>
<data>
<category>system</category>
<title>Application installation ID</title>
<name>_app_iid</name>
<required>false</required>
<type>unicode</type>
</data>
<data>
<category>system</category>
<title>Application version</title>
<name>_app_ver</name>
<required>false</required>
<type>version</type>
</data>
<data>
<category>system</category>
<title>Browser</title>
<name>_browser_name</name>
<required>false</required>
<type>unicode</type>
<dictionary>browsers</dictionary>
</data>
<data>
<category>system</category>
<title>Browser version</title>
<name>_browser_ver</name>
<required>false</required>
<type>version</type>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>
Response parameters
Parameter | Type | Description |
---|---|---|
error | int | Error code |
error_text | string | Error text |
category | string | Subscription field category"system","custom" |
title | string | UI field name |
name | string | API field name |
required | bool | Required flag (true) |
type | string | Field type |
default_value | * | Field default value if it exists |
dictionary | string | Field name used in the request /v1.1/dictionary (a request to obtain the values of system fields that are displayed in the interface as a drop-down list)"browsers" "devices" "tz" "oses" "languages" |
Subscription system fields
Parameter | Type | Example | Description |
---|---|---|---|
_device_type | string | "mob" | Device type. Recommended to pass specific values. Get the list of valid values through the request /v1.1/dictionary ("devices") . |
_device_model | string | "MHA-L29" | Device model. |
_device_name | string | "HUAWEI Mate 9" | Device name. |
_os | string | "Android" | Platform's operating system. Recommended to pass specific values. Get the list of valid values through the request /v1.1/dictionary ("oses") . |
_os_ver | string | "v11.0" | OS version. |
_os_tz | string | "+0300" | Platform time zone. Recommended to pass specific values. Get the list of valid values through the request /v1.1/dictionary ("tz") . |
_os_language | string | "ru" | Platform language. Recommended to pass specific values. Get the list of valid values through the request /v1.1/dictionary ("languages") . |
_ad_track | bool | true | Ad tracking allowed. |
_ad_id | string | "ad 123" | Ad identifier. |
_app_id | string | "app 123" | Application ID. |
_app_iid | string | "example iid" | Installation identifier of the application. |
_app_ver | string | "v1.2.3.4" | Application version. |
_browser_name | string | "Chrome" | Browser. Recommended to pass specific values. Get the list of valid values through the request /v1.1/dictionary ("browsers") . |
_browser_ver | string | "4.5.6.7.8" | Browser version. |