List accessible surveys
GET/api/v2/users/surveys
Returns the surveys (data sources) the caller can query.
A survey's code is the {surveyCode} path parameter of every survey-scoped endpoint: variables, carriers, tree queries, tables, rankings, evaluations, Reach, response curves and optimizations.
What is included
- Only surveys enabled in the user's TOM profile and currently available. Surveys that are being loaded or are disabled are left out, so the list can change between calls.
- Sorted by creation date, oldest first.
updatedDateis an empty string, not a date, when the date of the last update is not known.availableReachtells whether the survey is a consumption-diary survey. Only those support Reach: check the flag before callingGET /api/v2/survey/{surveyCode}/reach-capabilitiesorPOST /api/v2/reach/{surveyCode}.weightslists the weightings of the survey in the platform's order, the same ones thatGET /api/v2/survey/{surveyCode}/weeks-and-weightsreturns. The default one hasisDefault: true. The list is empty when the survey has no weightings.
Survey names
descriptionis the name you see for the survey in TOM: your own alias for it, else its default alias, else its catalog name. Use it to show the survey.originalDescriptionis always the catalog name, with no alias. Use it to classify or search surveys.- Names are not unique and can change; a new alias can take up to an hour to show. Identify a survey by
code.
The list is not paginated. Treat it as a catalog: cache it for the session and refresh it when a survey-scoped call reports that a survey is not available.
Errors
| Status | errorCode | When |
|---|---|---|
| 400 | TW_ERR_500 | The X-API-Key value does not identify a TOM user. |
| 401 | E401 | The X-API-Key header is missing or empty. |
| 500 | GEN_ERR_500 | Unexpected error. |
Responses
- 200
- 400
- 401
- 500
Surveys the caller can query, oldest first.
The X-API-Key value does not identify a TOM user (TW_ERR_500).
The X-API-Key header is missing or empty.
Unexpected error.