Skip to main content

TreeNode

A node of the variables, carriers or custom tree. Empty fields are omitted.

idstring

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.

parentIdstring

id of the parent node. Absent on root nodes.

codestring

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.

labelstring

Display label of the node, in the language of the user.

typeTreeNodeType (string)

Kind of node. The set can grow, so do not fail on a value you do not know.

Enum ValueDescription
FOLDERGrouping node.
VARSurvey variable.
CATEGORYCategory of a survey variable.
CARRIERCarrier (media vehicle): a leaf of the carriers tree.
CUSTOM_VARUser variable.
CUSTOM_CATCategory of a user variable.
TARGET_VARTarget (a saved audience).

Possible values: [FOLDER, VAR, CATEGORY, CARRIER, CUSTOM_VAR, CUSTOM_CAT, TARGET_VAR]

subtypeNodeSubtype (string)

For variables, user variables and targets, how they are measured; it can be absent. Absent on folders, categories and carriers.

Enum ValueDescription
SINGLECategorical variable with one answer per respondent.
MULTIPLECategorical variable with several answers per respondent.
NUMERICNumeric variable with integer values.
REALNumeric variable with decimal values.
LOGICLogical variable, true or false. Every target is logical.
TEXTFree text. Surveys return it, but it cannot be tabulated.
FREQUENCYFrequency variable.

Possible values: [SINGLE, MULTIPLE, NUMERIC, REAL, LOGIC, TEXT, FREQUENCY]

audienceModelAudienceModel (string)

Carriers only: the audience model the survey uses for the carrier. Informative.

Enum ValueDescription
STANDARDStandard audience model of the survey.
DIGITAL_MEASUREMENTDigital media whose audience comes from an external digital measurement source.
POISSONAudience estimated with a Poisson model.
ITALIAN_DIARY_INTERNETDiary-based audience model of Italian surveys, for internet carriers.
ITALIAN_DIARYDiary-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.

mediumstring

Name of the medium of the carrier, such as television or radio.

infostring

Free-text information about the carrier.

timestring

Time of day associated with the carrier.

daystring

Day or days associated with the carrier.

durationinteger<int32>

Duration associated with the carrier, as a whole number.

pathIdsstring

ids of the nodes from the root down to this node, inclusive, separated by ||.

pathstring

Labels from the root down to this node, separated by a backslash. Flat mode only.

orderinteger<int64>

Position of the node in a depth-first walk of the tree. Sort ascending to reproduce the tree order.

databasesstring[]

Codes of the surveys the node belongs to. Flat mode only; absent on custom nodes.

treeTypeTreeType (string)

Tree the node belongs to. Flat mode only.

Enum ValueDescription
VARIABLESFolders, variables and categories.
CARRIERSFolders and carriers (media vehicles).

Possible values: [VARIABLES, CARRIERS]

statusNodeStatus (string)

Custom tree only. Survey nodes and folders are VALID. With treeMode=true it is always VALID.

Enum ValueDescription
VALIDThe node is valid.
INVALIDThe node references variables or categories that the survey does not have.
NOT_VALIDATEDThe validation was skipped.

Possible values: [VALID, INVALID, NOT_VALIDATED]

validInSources object[]

User variables only: the surveys where the variable can be used.

  • Array [
  • sourceCodestring

    Code of the survey, as returned in code by GET /api/v2/users/surveys.

    sourceLabelstring

    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.

  • ]
  • childsundefined[]

    Child nodes. Only present with treeMode=true.

    TreeNode
    {
    "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
    ]
    }