Marketplace DSP API
/API Reference/- Set Campaign Targetings
Targeting Options
Get Campaign Targetings
Set Campaign Targetings
Set targetings on a campaign.
To set targetings, provide a list of targeting option objects in the targetings field. Each object represents a single targeting type. When you set a campaign's targetings using this API, the new values replace all existing targetings.
In each option, a venue is targeted when it meets any of the conditions (OR logic). When you include multiple targeting options, a venue is targeted only when it meets the conditions of all the options (AND logic).
Example:
{
"targetings": [
{
"deal_targeting_option": {
"deal_ids": [
"OaQqQrsnSIS89FkQFzrR3w",
"w7_lwxwiSl6Kwg_tUxIXkA",
"4LLHNrnvTTWD4I3XG0TNHw"
]
}
},
{
"venue_type_targeting_option": {
"venue_type_ids": [
"1",
"3"
],
"exclude": false
}
},
{
"venue_targeting_option": {
"venue_targeting_ids": [
"tVcQWUFuTJ2OAr88vwi-Dg-XN3GJTIIOI",
"tVcQWUFuTJ2OAr88vwi-Dg-MHIYWB5RHX",
"7rLsD2w8SfmOwNGotS4o_g-NYC9093RD"
],
"exclude": true
}
}
]
}In this example, the campaign will target venues that are:
- included in any of the three deal IDs
- AND are in the Transit (1) OR Outdoor (3) venue type categories
- AND is NOT any of the two specific venues specified
To remove all of a campaign’s targetings, send an empty list in the targetings field:
{
"targetings": []
}Note: You can't remove targetings from an activated campaign.
Security
SessionCookie
- https://platform-api.vistarmedia.com/api/dsp/v1https://platform-api.vistarmedia.com/api/dsp/v1/campaigns/{campaign_id}/targetings
curl -i -X PUT \
'https://platform-api.vistarmedia.com/api/dsp/v1/campaigns/{campaign_id}/targetings' \
-H 'Content-Type: application/json' \
-H 'Cookie: YOUR_API_KEY_HERE' \
-d '{
"targetings": [
{
"venue_targeting_option": {
"venue_targeting_ids": [
"tVcQWUFuTJ2OAr88vwi-Dg-XN3GJTIIOI",
"tVcQWUFuTJ2OAr88vwi-Dg-MHIYWB5RHX",
"k6BCwQDOTJmcZYhgTV_9wA-FL056FMCCS01",
"k6BCwQDOTJmcZYhgTV_9wA-AZ120AACLD01",
"4500pvspR3SlFLXP0iU17A-BAR-112617",
"7rLsD2w8SfmOwNGotS4o_g-NYC9093RD"
],
"exclude": false
},
"deal_targeting_option": {
"deal_ids": [
"OaQqQrsnSIS89FkQFzrR3w",
"w7_lwxwiSl6Kwg_tUxIXkA",
"4LLHNrnvTTWD4I3XG0TNHw"
]
},
"publisher_targeting_option": {
"publisher_ids": [
"kxYItBGFSsCtRbK6j0usXw"
],
"exclude": false
},
"venue_type_targeting_option": {
"venue_type_ids": [
"3",
"105",
"801"
],
"exclude": false
}
}
]
}'Response
{ "targetings": [ { … }, { … }, { … } ] }