TreeNode
A node of the variables, carriers or custom tree. Empty fields are omitted.
Opaque identifier of the node in this tree, for navigation only. In survey trees it is a 22-character URL-safe id derived from the survey and the position and label of the node, so it can change when the survey is reloaded; custom nodes use the element id, and the two roots ROOT_FOLDER_TARGET and ROOT_FOLDER_USER_VAR. Use it in nodesId; store code, not id.
id of the parent node. Absent on root nodes.
Identifier used by the rest of the API: the variable id (table axes), the category id within its variable (TGL VAR.CAT), the carrier id (ranking, evaluation, Reach), or the id of a user variable or target. It is not unique across the tree.
Display label of the node, in the language of the user.
Kind of node. The set can grow, so do not fail on a value you do not know.
| Enum Value | Description |
|---|---|
| FOLDER | Grouping node. |
| VAR | Survey variable. |
| CATEGORY | Category of a survey variable. |
| CARRIER | Carrier (media vehicle): a leaf of the carriers tree. |
| CUSTOM_VAR | User variable. |
| CUSTOM_CAT | Category of a user variable. |
| TARGET_VAR | Target (a saved audience). |
Possible values: [FOLDER, VAR, CATEGORY, CARRIER, CUSTOM_VAR, CUSTOM_CAT, TARGET_VAR]
For variables, user variables and targets, how they are measured; it can be absent. Absent on folders, categories and carriers.
| Enum Value | Description |
|---|---|
| SINGLE | Categorical variable with one answer per respondent. |
| MULTIPLE | Categorical variable with several answers per respondent. |
| NUMERIC | Numeric variable with integer values. |
| REAL | Numeric variable with decimal values. |
| LOGIC | Logical variable, true or false. Every target is logical. |
| TEXT | Free text. Surveys return it, but it cannot be tabulated. |
| FREQUENCY | Frequency variable. |
Possible values: [SINGLE, MULTIPLE, NUMERIC, REAL, LOGIC, TEXT, FREQUENCY]
Carriers only: the audience model the survey uses for the carrier. Informative.
| Enum Value | Description |
|---|---|
| STANDARD | Standard audience model of the survey. |
| DIGITAL_MEASUREMENT | Digital media whose audience comes from an external digital measurement source. |
| POISSON | Audience estimated with a Poisson model. |
| ITALIAN_DIARY_INTERNET | Diary-based audience model of Italian surveys, for internet carriers. |
| ITALIAN_DIARY | Diary-based audience model of Italian surveys. |
Possible values: [STANDARD, DIGITAL_MEASUREMENT, POISSON, ITALIAN_DIARY_INTERNET, ITALIAN_DIARY]
carrierInfo object
Carriers only: descriptive data of the carrier. Absent when the survey defines none.
Name of the medium of the carrier, such as television or radio.
Free-text information about the carrier.
Time of day associated with the carrier.
Day or days associated with the carrier.
Duration associated with the carrier, as a whole number.
ids of the nodes from the root down to this node, inclusive, separated by ||.
Labels from the root down to this node, separated by a backslash. Flat mode only.
Position of the node in a depth-first walk of the tree. Sort ascending to reproduce the tree order.
Codes of the surveys the node belongs to. Flat mode only; absent on custom nodes.
Tree the node belongs to. Flat mode only.
| Enum Value | Description |
|---|---|
| VARIABLES | Folders, variables and categories. |
| CARRIERS | Folders and carriers (media vehicles). |
Possible values: [VARIABLES, CARRIERS]
Custom tree only. Survey nodes and folders are VALID. With treeMode=true it is always VALID.
| Enum Value | Description |
|---|---|
| VALID | The node is valid. |
| INVALID | The node references variables or categories that the survey does not have. |
| NOT_VALIDATED | The validation was skipped. |
Possible values: [VALID, INVALID, NOT_VALIDATED]
validInSources object[]
User variables only: the surveys where the variable can be used.
Code of the survey, as returned in code by GET /api/v2/users/surveys.
Name of the survey for the caller, as description in GET /api/v2/users/surveys: their alias, or the catalog name when there is no alias. When the survey is not available to the caller, its catalog name.
Child nodes. Only present with treeMode=true.
{
"id": "string",
"parentId": "string",
"code": "string",
"label": "string",
"type": "FOLDER",
"subtype": "SINGLE",
"audienceModel": "STANDARD",
"carrierInfo": {
"medium": "string",
"info": "string",
"time": "string",
"day": "string",
"duration": 0
},
"pathIds": "string",
"path": "string",
"order": 0,
"databases": [
"string"
],
"treeType": "VARIABLES",
"status": "VALID",
"validInSources": [
{
"sourceCode": "string",
"sourceLabel": "string"
}
],
"childs": [
null
]
}