Demand Key-Value Targeting API

Once keys have been created, you can apply key-value targeting to demand tags. Targeting on Key-Value pairs can be done on an AND and OR basis. Any combination of Key-Value pairs with the same group ID will follow AND logic. OR logic will be applied for targeting of different groups.

Visit the Demand page for more information on Key-Value Targeting on a Demand Tag.

Add Key-Value Targeting

SDK 

API

POST /api/v0/demand_tags/<demand_tag_id>/demand_tag_keys/<id>

Headers

Body (example)

{
   "group": "1",
   "key_id": "27",
   "list_type": "white_list",
   "value_ids": [53]

}


Required parameters: group, key_id, list_type, value_ids

Response

Status code 200

Get Key-Value Targeting

SDK

API

GET /api/v0/demand_tags/<demand_tag_id>/demand_tag_keys

Headers

Response

Status code 200

Edit Key-Value Targeting

SDK

API

PUT /api/v0/demand_tags/<demand_tag_id>/demand_tag_keys/<id>

Headers

Body (example)

{
   "group": "1",
   "key_id": "27",
   "list_type": "white_list",
   "value_ids": [53, 54]

}


Response

Status code 200