Getting started
- Introduction
- Prerequisites
- Rules of our API
- Quickstarts
Transition from V1 to V2 API
Platform API
- Reference
- Audiences
- Authorization
- Categories
- Crosstabs
- Insights
- Locations
- Namespaces
- Query
- Questions
- Splitters
- Taxonomy
- Waves
v2 Create Audience
Create a new audience for the current user. You can specify the attributes that you want to define your audiences, choosing from all data points in our taxonomy.
curl --request POST \
--url https://api.globalwebindex.com/v2/saved/audiences \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Male with credit card and short-term loan",
"expression": {
"and": [
{
"question": "q2",
"datapoints": [
"q2_1"
]
},
{
"question": "gwi-ext.q1014a",
"datapoints": [
"q1014a",
"q1014b"
],
"suffixes": [
"1"
]
}
]
},
"folder_id": "b140035b-3adc-43bf-a39d-8e8005c8af2a",
"position": 128,
"datasets": [
"ds-core",
"ds-96c906f1"
]
}'
{
"data": {
"id": "8f568af7-a225-40fd-992f-839d8f0ed499",
"name": "Male with credit card and short-term load",
"expression": {
"and": [
{
"question": "q2",
"datapoints": [
"q2_1"
]
},
{
"question": "gwi-ext.q1014a",
"datapoints": [
"q1014a",
"q1014b"
],
"suffixes": [
"1"
]
}
]
},
"flags": [
"authored",
"curated",
"isP2"
],
"folder_id": "b140035b-3adc-43bf-a39d-8e8005c8af2a",
"position": 128.1,
"permissions": {
"audience_overall": "containsUnknownData"
},
"datasets": [
"ds-core",
"ds-96c906f1"
]
}
}
Authorizations
Body
Human readable name
Flexible expression of audience scope.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply union of their scopes.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
List of sub-expressions to apply union of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply union of their scopes.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
List of sub-expressions to apply union of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply union of their scopes.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
List of sub-expressions to apply union of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply union of their scopes.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
List of sub-expressions to apply union of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply union of their scopes.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
List of sub-expressions to apply union of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply union of their scopes.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
List of sub-expressions to apply union of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply union of their scopes.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
List of sub-expressions to apply union of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply union of their scopes.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
null/nil uuid or folder uuid
Position to give to be able to sort.
additional flags about audience
authored
, curated
, isP2
dataset codes
Response
Unique ID of saved audience
v1 ID of an audience if applicable or null
Human readable name
Flexible expression of audience scope.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply union of their scopes.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
List of sub-expressions to apply union of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply union of their scopes.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
List of sub-expressions to apply union of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply union of their scopes.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
List of sub-expressions to apply union of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply union of their scopes.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
List of sub-expressions to apply union of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply union of their scopes.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
List of sub-expressions to apply union of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply union of their scopes.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
List of sub-expressions to apply union of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply union of their scopes.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
List of sub-expressions to apply union of their scopes.
List of sub-expressions to apply intersection of their scopes.
List of sub-expressions to apply union of their scopes.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
To use negation of the expression.
Question code to define datapoint scope.
Datapoint codes to limit scopes of interest.
Suffixes to extend datapoint codes for more detailed responses. Array can be empty.
Minimal count of positive datapoints in one response.
when item was created
when item was updated
null/nil uuid or folder uuid
items are sorted by numeric position
Strings accessible or containsUnknownData describe overall permission of a user to an audience.
This field is kept for consistency with query-es route permissions response. It is not used in saved-data at all.
Error describes what kind of error occured if there was one. This field explains better errorType field.
Type of the error
dataset codes
additional flags about audience
authored
, curated
, isP2
curl --request POST \
--url https://api.globalwebindex.com/v2/saved/audiences \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Male with credit card and short-term loan",
"expression": {
"and": [
{
"question": "q2",
"datapoints": [
"q2_1"
]
},
{
"question": "gwi-ext.q1014a",
"datapoints": [
"q1014a",
"q1014b"
],
"suffixes": [
"1"
]
}
]
},
"folder_id": "b140035b-3adc-43bf-a39d-8e8005c8af2a",
"position": 128,
"datasets": [
"ds-core",
"ds-96c906f1"
]
}'
{
"data": {
"id": "8f568af7-a225-40fd-992f-839d8f0ed499",
"name": "Male with credit card and short-term load",
"expression": {
"and": [
{
"question": "q2",
"datapoints": [
"q2_1"
]
},
{
"question": "gwi-ext.q1014a",
"datapoints": [
"q1014a",
"q1014b"
],
"suffixes": [
"1"
]
}
]
},
"flags": [
"authored",
"curated",
"isP2"
],
"folder_id": "b140035b-3adc-43bf-a39d-8e8005c8af2a",
"position": 128.1,
"permissions": {
"audience_overall": "containsUnknownData"
},
"datasets": [
"ds-core",
"ds-96c906f1"
]
}
}