Choose datasets (optional)
Skip this section to use the default datasets for your account. To scope the analysis to specific datasets, list the datasets available to you and keep theircode values. All codes you pass in one request must come from the same tree. See Working with Multiple Data Sets.
Request
Response
dataset_codes array on every later request in the chain.
Resolve location and timeframe
Send only the locations and timeframes inprompt. Keep location_codes and wave_codes from the response for the next steps. The response may return default codes even when you did not name a location or timeframe; pass those on as well.
Request
Response
global_filters.inaccessible_location_names lists any requested locations your account cannot access.
To change the scope later, see Step 4.
Define the audience
Create an audience
Describe the audience in plain language and pass the codes from the previous section. You can create up to 10 audiences in one request.Request
Response
audiences[].id. Check name and description to confirm the audience matches what you asked for. A description that could not be created or matched is listed in failed_audiences with the reason, and the other audiences are still returned:
audiences[].datasets shows where the audience is stored. Do not copy it into dataset_codes.
Or use a saved audience
To use an audience saved on the GWI platform, search for it by name and keep theid of the matching result.
Request
Response
exclude_audience_ids leaves audiences out of the results, and limit sets the maximum number of results (1–100).
Combine audiences (optional)
To analyze people who belong to two or more audiences, or to any of them, join their IDs into one audience. Pass two or more IDs fromPOST /audiences/generate or POST /audiences/search in audiences, and set join_type:
andcreates an intersection. It requires thelocation_codesandwave_codesfrom Resolve location and timeframe.orcreates a union.
name is optional. A name is generated when you omit it.
Request
Response
id in enforced_audiences in Step 3. Audiences that cannot be combined, for example because they share no dataset, location or wave, return unprocessable.
