List the carriers of a survey
GET/api/v2/survey/:surveyCode/carriers
Returns the complete carriers tree of a survey in one response: the folders that group the media and the carriers they contain.
A carrier is a media vehicle measured by the survey: a TV channel, a radio station, a publication, a website, and so on. Carrier ids are the input of the media operations: the CARRIERS axes of POST /api/v2/table/{surveyCode} and POST /api/v2/reach/{surveyCode}, the carriers of POST /api/v2/survey/{surveyCode}/ranking, .../evaluation and .../response-curve, and the carriers[].id of POST /api/v2/survey/{surveyCode}/optimizations.
To load the tree level by level or to search carriers by name, use POST /api/v2/survey/{surveyCode}/tree/query with treeType: ["CARRIERS"].
Before you call it
surveyCodeis thecodeof a survey returned byGET /api/v2/users/surveys.
Response
- An array of root folders (
type: FOLDER). Folders contain sub-folders or carriers (type: CARRIER) initems; carriers are leaves. - The
idof aCARRIERitem (for exampleTVCH1005D1F1) is the carrier id expected by the operations above. Folder ids identify the folder within the tree. audienceModelon a carrier is the audience model the survey uses for it:STANDARD,DIGITAL_MEASUREMENT,POISSON,ITALIAN_DIARY_INTERNETorITALIAN_DIARY. It is informative. Carriers have nosubtype.- Properties without a value are omitted.
Behaviour
- The whole tree is returned: there is no pagination and no truncation.
- Send
Accept-Encoding: gzip; the response is then compressed. - The tree changes rarely: cache it on your side.
Errors
| Status | errorCode | When |
|---|---|---|
| 400 | TREE_ERR_404 | The survey has no carriers tree. |
| 401 | E401 | The X-API-Key header is missing or empty. |
| 403 | AE_ERR_415 | The survey is not available to you: not contracted, disabled, being loaded, or non-existent. |
| 500 | GEN_ERR_500 | Unexpected error. |
Request
Responses
- 200
- 400
- 401
- 403
- 500
The carriers tree of the survey, as an array of root folders with their descendants nested in items.
The survey has no carriers tree (TREE_ERR_404).
The X-API-Key header is missing or empty.
The survey is not available to the user: not contracted, disabled, being loaded or non-existent. The answer is the same in every case (AE_ERR_415).
Unexpected error.