Skip to main content

Category

A category of a categorical variable (subtype SINGLE or MULTIPLE) in a VARIABLES axis. Take category ids from GET /api/v2/survey/{surveyCode}/variables (children of type CATEGORY) or from a tree query.

idstring

Code of the category within its variable. For a JOINT, an id chosen by the caller for the joint. Responses return the base category with id BASE.

idsstring[]

Member category ids of a JOINT category. When omitted, the joint contains only id. Ignored for the other types.

labelstring

Category label, in the language of the user. Required when the variable is in a split axis (split: true), because split categories are matched by label. Always returned in responses.

typeCategoryKind (string)required

Kind of category of a variable. Values are case-sensitive, except JOINT.

Enum ValueDescription
CATEGORYA category of a survey variable.
CUSTOM_CATA category of a user variable.
JOINTThe union of the categories listed in ids.
BASEThe base category: responses return it with the id BASE.

Possible values: [CATEGORY, CUSTOM_CAT, JOINT, BASE]

selectedboolean

Marks the category that fixes the slice when its variable is in a PLANES axis. In PLANES, several categories can be selected (one matrix each); in any other axis, more than one returns 400 AE_ERR_404.

tglstring

TGL condition of a CUSTOM_CAT category of a user variable (CUSTOM_VAR, subtype SINGLE or MULTIPLE). GET /api/v2/workspace/{workspaceId}/element/{elementId} returns it with resolve=TGL. Send it back unchanged: when every CUSTOM_CAT category of the variable has one, the calculation uses them and does not look the variable up by id. A tgl anywhere else returns 400 AE_ERR_416.

hiddenboolean

Marks a CUSTOM_CAT category that is not shown as a row or column but is needed by a JOINT of the same variable. Returned only as true and only with tgl (see resolve in GET /api/v2/workspace/{workspaceId}/element/{elementId}). Send it back unchanged. Accepted only on a CUSTOM_CAT category of a CUSTOM_VAR with subtype SINGLE or MULTIPLE; anywhere else true returns 400 AE_ERR_416.

Category
{
"id": "string",
"ids": [
"string"
],
"label": "string",
"type": "CATEGORY",
"selected": true,
"tgl": "string",
"hidden": true
}