Obtain valid values for fields: browsers, devices, tz, oses, languages
Description
The API method allows you to retrieve valid values for the following fields:
browser
device
tz
os
language
These fields are used in the following requests:
/v1.1/resources/fields_get
(obtaining resource subscription fields)/api/v1.1/goals/register
(goals and goal values registration)
URL
Method: POST
Request URL: https://example.com/api/v1.1/dictionary
Request parameters
Parameter | Type | Example | Required | Description |
---|---|---|---|---|
token | string | "abcdefghijklmnqrstuvwxyz" | Yes | API token |
name | string | "browsers" "devices" "tz" "oses" "languages" | Yes | Specify the name of the system field to retrieve the corresponding list of valid values. |
Request example
- JSON
- XML
{
"token": "abcdefghijklmnqrstuvwxyz",
"name": "devices"
}
<xml>
<token>1</token>
<name>devices</name>
</xml>
Response example
- JSON
- XML
{
"data": [
{
"title": "Desktop",
"value": "web"
},
{
"title": "Other",
"value": "other"
},
{
"title": "Mobile",
"value": "mob"
}
],
"error": 0,
"error_text": "Successful operation"
}
<xml>
<data>
<value>web</value>
<title>Desktop</title>
</data>
<data>
<value>other</value>
<title>Other</title>
</data>
<data>
<value>mob</value>
<title>Mobile</title>
</data>
<error>0</error>
<error_text>Successful operation</error_text>
</xml>