ADNUNTIUS
Search…
Targeting object
The targeting object is provided as part of the API call when creating line items and creatives. The basic structure of this object is shown below:
1
{
2
"targeting": {
3
"deviceTargets": [],
4
"adUnitTarget": {},
5
"userSegmentTargets": [],
6
"dateTarget": {},
7
"geospatialTargets": [],
8
"keyValueTargets": [],
9
"siteTarget": {},
10
"adUnitMatchingLabelTargets": [],
11
"categoryTargets": [],
12
"namedLocationTarget": {},
13
"dayPartingTargets": [],
14
"retargetingTargets": [],
15
"keywordTargets": [],
16
"ipAddressTarget": {},
17
"siteGroupTarget": {}
18
}
19
}
Copied!
Fields:
Name
Restriction
Description
deviceTargets
Array
adUnitTarget
Object
userSegmentTargets
Array
dateTarget
Object
geospatialTargets
Array
keyValueTargets
Array
siteTarget
Object
adUnitMatchingLabelTargets
Array
categoryTargets
Array
namedLocationTarget
Object
dayPartingTargets
Array
retargetingTargets
Array
keywordTargets
Array
ipAddressTarget
Object
siteGroupTarget
Object

Device targets

1
{
2
"deviceTargets": [
3
{
4
"targetedBrands": [
5
"ACER"
6
],
7
"targetedOSes": [
8
"ANDROID"
9
],
10
"targetedDeviceTypes": [
11
"DESKTOP"
12
]
13
},
14
{
15
"targetedBrands": [],
16
"targetedOSes": [],
17
"targetedDeviceTypes": [
18
"MOBILE"
19
]
20
}
21
]
22
23
}
Copied!
The device targets can be found with it's endpoint /devices.
Name
Data type
Values
targetedBrands
String
UNKNOWN, DESKTOP, APPLE, NOKIA, HTC, SAMSUNG, SONY_ERICSSON, LG, MOTOROLA, RIM, HUAWEI, ZTE, ASUS, PANASONIC, FUJITSU, SHARP, NEC, KYOCERA, ACER
targetedOSes
String
UNKNOWN, WINDOWS_PHONE, WINDOWS, MACINTOSH, IOS, ANDROID, LINUX, SUNOS, BSD, SYMBIAN, BLACKBERRY
targetedDeviceTypes
String
DESKTOP, TABLET, MOBILE

Ad unit targets

1
{
2
"adUnitTarget": {
3
"adUnits": [
4
{ "id": "d5f6mxj3jbhytmzg" },
5
{ "id": "jpbnjqy597pvygbm" }
6
]
7
}
8
}
Copied!
The id of the ad units can be found at this endpoint: /adunits.

Segment targets

1
{
2
"userSegmentTargets": [
3
{
4
"userSegments": [
5
{ "id": "xxxxxxxxxxxx" }
6
],
7
"notUserSegments": [
8
{ "id": "yyyyyyyyyyyy" }
9
]
10
},
11
{
12
"userSegments": [
13
{ "id": "xxxxxxxxxxxx" }
14
],
15
"notUserSegments": [
16
{ "id": "yyyyyyyyyyyy" }
17
]
18
}
19
]
20
}
Copied!
The id of the segments can be found here at this endpoint: /segments.
When posting targeting data only the id of the adunit is required.

Date targets

1
{
2
"dateTarget": {
3
"dateRanges": [
4
{
5
"first": "2018-01-02T00:00:00",
6
"second": "2018-01-10T23:30:00"
7
},
8
{
9
"first": "2018-01-11T00:00:00",
10
"second": "2018-01-12T00:00:00"
11
},
12
{
13
"first": "2018-01-11T00:00:00",
14
"second": "2018-01-11T23:30:00"
15
}
16
],
17
"timeZoneSetting": "SYSTEM"
18
},
19
}
Copied!
All dates must be specified as follows: yyyy-mm-ddThh:mm:ss.
Name
Data type
Values
dateTarget
Object
The date target object.
dateRanges
Array
An array containing the range objects.
first
String
Start of the date range.
second
String
End of the date range.

Geospatial targets

1
{
2
"geospatialTargets": [
3
{
4
"definition": {
5
"type": "GeometryCollection",
6
"geometries": [
7
{
8
"type": "Polygon",
9
"coordinates": [
10
[
11
[
12
17.9914856,
13
59.32968705
14
],
15
[
16
18.08074951,
17
59.34999583
18
],
19
[
20
18.13568115,
21
59.30866518
22
],
23
[
24
18.08074951,
25
59.28622753
26
],
27
[
28
17.9914856,
29
59.32968705
30
]
31
]
32
]
33
}
34
]
35
}
36
},
37
{
38
"definition": {
39
"type": "GeometryCollection",
40
"geometries": [
41
{
42
"type": "Polygon",
43
"coordinates": [
44
[
45
[
46
17.93380737,
47
59.24100683
48
],
49
[
50
17.93380737,
51
59.27610573
52
],
53
[
54
18.06976318,
55
59.27610573
56
],
57
[
58
18.06976318,
59
59.24100683
60
],
61
[
62
17.93380737,
63
59.24100683
64
]
65
]
66
]
67
}
68
]
69
}
70
}
71
],
72
}
Copied!
The polygons follow the format of GeoJson.

Key value targets

1
{
2
"keyValueTargets": [
3
{
4
"entries": {
5
"key3": [
6
"value-3"
7
]
8
},
9
"notEntries": {}
10
},
11
// OR
12
{
13
"entries": {
14
"key4": [
15
"value-4"
16
]
17
},
18
"notEntries": {}
19
},
20
// OR
21
{
22
"entries": {
23
"key": [
24
"value"
25
],
26
// AND
27
"otherKey": [
28
"othervalue"
29
]
30
},
31
// AND NOT
32
"notEntries": {
33
"key2": [
34
"value-2"
35
]
36
}
37
}
38
]
39
}
Copied!
  • OR values are separated byt objects in the initial array.
  • AND values are separated with keys within entries
  • AND-NOTare speccified with notEntries as listed above.

Site targets

1
{
2
"siteTarget": {
3
"sites": [
4
{ "id": "6vjwynnz2ptrvdcc" }
5
{ "id": "6lk3nvdkaai8a3jn" }
6
]
7
}
8
}
Copied!
The id of the sites can be found at this endpoint: /sites.
When posting targeting data only the id of the site is required.

Ad unit matching label targets

1
{
2
"adUnitMatchingLabelTargets": [
3
{
4
"matchingLabels": [
5
"adunitLabel1"
6
]
7
},
8
{
9
"matchingLabels": [
10
"adunitLabel2"
11
]
12
}
13
]
14
}
Copied!
The ad unit matching labels has to be present on the ad unit for the matching label targeting to work.
For matching labels to work you will need to divide the targeting into separate objects as specified above.

Category targets

1
{
2
"categoryTargets": [
3
{
4
"categories": [
5
"sport"
6
],
7
"notCategories": []
8
},
9
// OR
10
{
11
"categories": [
12
"color/blue"
13
],
14
"notCategories": []
15
},
16
// OR
17
{
18
"categories": [
19
"color/red/crimson",
20
//AND
21
"sports"
22
],
23
// AND NOT
24
"notCategories": [
25
"andnot"
26
]
27
}
28
]
29
}
Copied!
  • OR values are separated byt objects in the initial array.
  • AND values are added within the array.
  • AND-NOTare speccified with notEntries as listed above.

Location targets

1
{
2
3
"namedLocationTarget": {
4
"locations": [
5
{ "id": 1172995 },
6
{ "id": 9373443 }
7
]
8
}
9
}
Copied!
The id of the location can be found at this endpoint: /location.
When posting targeting data only the id of the location is required.

Day parting targets

1
{
2
"dayPartingTargets": [
3
{
4
"daysOfWeek": [
5
"TUESDAY",
6
"FRIDAY",
7
"WEDNESDAY",
8
"SATURDAY",
9
"MONDAY",
10
"THURSDAY",
11
"SUNDAY"
12
],
13
"hoursOfDay": [
14
1,
15
19,
16
20,
17
5,
18
21,
19
22,
20
23
21
],
22
"timeZoneSetting": "SYSTEM"
23
},
24
{
25
"daysOfWeek": [
26
"TUESDAY",
27
"WEDNESDAY",
28
"MONDAY",
29
"THURSDAY"
30
],
31
"hoursOfDay": [
32
2,
33
3,
34
23
35
],
36
"timeZoneSetting": "USER"
37
}
38
]
39
}
Copied!
you can add multiple dayparts by adding multiple objects.
The daypart object is divided in these paramters:
Name
Data type
Values
daysOfWeek
Array
"MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"
hoursOfDay
Array
An array containing numbers 0 for 00:00 - 00:59, 1 for 01:00 - 01:59 etc. up to 23 for 23:00 - 23:59.
timeZoneSetting
String
"USER" for user time zone and "SYSTEM" for the system time zone.

Keyword targets

1
{
2
"keywordTargets": [
3
{
4
//AND
5
"keywords": [
6
"games",
7
"gambling"
8
],
9
"notKeywords": []
10
},
11
{
12
"keywords": [
13
"car"
14
],
15
"notKeywords": [
16
"ferrari",
17
"mazda"
18
]
19
},
20
{
21
"keywords": [
22
"sport"
23
],
24
"notKeywords": []
25
}
26
]
27
}
Copied!
  • OR values are separated byt objects in the initial array.
  • AND values are added within the array.
  • AND-NOTare speccified with notEntries as listed above.

Retargeting targets

1
{
2
"retargetingTargets": [
3
{
4
"entries": {
5
"or-key": [
6
"or-value"
7
]
8
},
9
"notEntries": {}
10
},
11
// OR
12
{
13
"entries": {
14
"the-key": [
15
"value"
16
],
17
// AND
18
"and-key": [
19
"and-value"
20
]
21
},
22
// AND NOT
23
"notEntries": {
24
"and-not-key": [
25
"and-not-value"
26
]
27
}
28
}
29
]
30
}
Copied!
  • OR values are separated byt objects in the initial array.
  • AND values are added within the array.
  • AND-NOTare speccified with notEntries as listed above.

IP targets

1
{
2
"ipAddressTarget": {
3
"addresses": [
4
"205.112.45.0/24",
5
"118.16.78.34"
6
]
7
},
8
}
Copied!
Contains addresses which is a comma seperated array of IP values. You can add multiple IP addresses by separating each individual one by a comma. For instance, inputting 118.16.78.34, 205.112.45.0/24 will match any of 118.16.78.34 and 205.112.45.0 through to 205.112.45.255. The IP targets follow the CIDR notation.

Site group targets

1
{
2
"siteGroupTarget": {
3
"siteGroups": [
4
{ "id": "8zh8lh7n81s6l2m7" },
5
{ "id": "j38bl01t2pbtmzkg" }
6
]
7
}
8
}
Copied!
The id of the sites can be found at this endpoint: /sitegroups.
When posting targeting data only the id of the site is required.

Examples

A GET request for a targeting object:
1
{
2
"targeting": {
3
"deviceTargets": [
4
{
5
"targetedBrands": [
6
"ACER"
7
],
8
"targetedOSes": [
9
"ANDROID"
10
],
11
"targetedDeviceTypes": [
12
"DESKTOP"
13
]
14
},
15
{
16
"targetedBrands": [],
17
"targetedOSes": [],
18
"targetedDeviceTypes": [
19
"MOBILE"
20
]
21
}
22
],
23
"adUnitTarget": {
24
"adUnits": [
25
{
26
"id": "d5f6mxj3jbhytmzg",
27
"name": "demo.adnuntius.com - 300 x 250",
28
"url": "/api/v1/adunits/d5f6mxj3jbhytmzg"
29
},
30
{
31
"id": "jpbnjqy597pvygbm",
32
"name": "demo.adnuntius.com - 980x240 - Panorama 02",
33
"url": "/api/v1/adunits/jpbnjqy597pvygbm"
34
}
35
]
36
},
37
"userSegmentTargets": [
38
{
39
"userSegments": [
40
{
41
"id": "xxxxxxxxxxxx",
42
"name": "Travel",
43
"description": "People interested in travel"
44
}
45
]
46
},
47
{
48
"userSegments": [
49
{
50
"id": "xxxxxxxxxxxx",
51
"name": "culture",
52
"description": "People interested in culture"
53
}
54
]
55
}
56
],
57
"dateTarget": {
58
"dateRanges": [
59
{
60
"first": "2018-01-02T00:00:00",
61
"second": "2018-01-10T23:30:00"
62
},
63
{
64
"first": "2018-01-11T00:00:00",
65
"second": "2018-01-12T00:00:00"
66
},
67
{
68
"first": "2018-01-11T00:00:00",
69
"second": "2018-01-11T23:30:00"
70
}
71
],
72
"timeZoneSetting": "SYSTEM"
73
},
74
"geospatialTargets": [
75
{
76
"definition": {
77
"type": "GeometryCollection",
78
"geometries": [
79
{
80
"type": "Polygon",
81
"coordinates": [
82
[
83
[
84
17.9914856,
85
59.32968705
86
],
87
[
88
18.08074951,
89
59.34999583
90
],
91
[
92
18.13568115,
93
59.30866518
94
],
95
[
96
18.08074951,
97
59.28622753
98
],
99
[
100
17.9914856,
101
59.32968705
102
]
103
]
104
]
105
}
106
]
107
}
108
},
109
{
110
"definition": {
111
"type": "GeometryCollection",
112
"geometries": [
113
{
114
"type": "Polygon",
115
"coordinates": [
116
[
117
[
118
17.93380737,
119
59.24100683
120
],
121
[
122
17.93380737,
123
59.27610573
124
],
125
[
126
18.06976318,
127
59.27610573
128
],
129
[
130
18.06976318,
131
59.24100683
132
],
133
[
134
17.93380737,
135
59.24100683
136
]
137
]
138
]
139
}
140
]
141
}
142
}
143
],
144
"keyValueTargets": [
145
{
146
"entries": {
147
"key3": [
148
"value-3"
149
]
150
},
151
"notEntries": {}
152
},
153
{
154
"entries": {
155
"key4": [
156
"value-4"
157
]
158
},
159
"notEntries": {}
160
},
161
{
162
"entries": {
163
"key": [
164
"value"
165
],
166
"otherKey": [
167
"othervalue"
168
]
169
},
170
"notEntries": {
171
"key2": [
172
"value-2"
173
]
174
}
175
}
176
],
177
"siteTarget": {
178
"sites": [
179
{
180
"id": "6vjwynnz2ptrvdcc",
181
"name": "demo.adnuntius.com",
182
"url": "/api/v1/sites/6vjwynnz2ptrvdcc"
183
},
184
{
185
"id": "6lk3nvdkaai8a3jn",
186
"name": "Other site for My test account",
187
"url": "/api/v1/sites/6lk3nvdkaai8a3jn"
188
}
189
]
190
},
191
"adUnitMatchingLabelTargets": [
192
{
193
"matchingLabels": [
194
"adunitLabel1"
195
]
196
},
197
{
198
"matchingLabels": [
199
"adunitLabel2"
200
]
201
}
202
],
203
"categoryTargets": [
204
{
205
"categories": [
206
"sport"
207
],
208
"notCategories": []
209
},
210
{
211
"categories": [
212
"color/blue"
213
],
214
"notCategories": []
215
},
216
{
217
"categories": [
218
"color/red/crimson",
219
"sports"
220
],
221
"notCategories": [
222
"andnot"
223
]
224
}
225
],
226
"namedLocationTarget": {
227
"locations": [
228
{
229
"id": 1172995,
230
"type": "CITY",
231
"name": "Norrköping",
232
"context": "Östergötland, Sweden, Europe"
233
},
234
{
235
"id": 9373443,
236
"type": "CITY",
237
"name": "Norrköping Ö",
238
"context": "Östergötland, Sweden, Europe"
239
}
240
]
241
},
242
"dayPartingTargets": [
243
{
244
"daysOfWeek": [
245
"SATURDAY",
246
"WEDNESDAY",
247
"THURSDAY",
248
"FRIDAY",
249
"SUNDAY",
250
"MONDAY",
251
"TUESDAY"
252
],
253
"hoursOfDay": [
254
0,
255
16,
256
1,
257
17
258
],
259
"timeZoneSetting": "SYSTEM"
260
}
261
],
262
"retargetingTargets": [
263
{
264
"entries": {
265
"or-key": [
266
"or-value"
267
]
268
},
269
"notEntries": {}
270
},
271
{
272
"entries": {
273
"the-key": [
274
"value"
275
],
276
"and-key": [
277
"and-value"
278
]
279
},
280
"notEntries": {
281
"and-not-key": [
282
"and-not-value"
283
]
284
}
285
}
286
],
287
"keywordTargets": [
288
{
289
"keywords": [
290
"games",
291
"gambling"
292
],
293
"notKeywords": []
294
},
295
{
296
"keywords": [
297
"car"
298
],
299
"notKeywords": []
300
},
301
{
302
"keywords": [
303
"sport"
304
],
305
"notKeywords": []
306
}
307
],
308
"ipAddressTarget": {
309
"addresses": [
310
"205.112.45.0/24",
311
"118.16.78.34"
312
]
313
},
314
"siteGroupTarget": {
315
"siteGroups": [
316
{
317
"id": "8zh8lh7n81s6l2m7",
318
"name": "Additional site group",
319
"url": "/api/v1/sitegroups/8zh8lh7n81s6l2m7"
320
},
321
{
322
"id": "j38bl01t2pbtmzkg",
323
"name": "General Site Group",
324
"url": "/api/v1/sitegroups/j38bl01t2pbtmzkg"
325
}
326
]
327
}
328
}
329
}
Copied!