API ReferenceAnnouncementsCommunity Discussion
API ReferenceCommunity DiscussionAnnouncementsSubscribeLog In
API Reference

Audience Targeting Flow

When working with audience targeting, several objects and endpoints are used.

A typical flow is shown below. Schema definitions are provided in subsequent topics.

Flow

  1. View high level targeting details for a given campaign via the campaigns endpoint. Each audience targeting field uses a Multi-Targeting Object. A state of "EXISTS" indicates that targeting exists, and href stores a reference to the actual targeting.
GET /backstage/api/1.0/demo-advertiser/campaigns/1234
{
   "id": 1234
   // Additional fields omitted...
   "audience_segments_multi_targeting": {
      "state": "EXISTS",
      "value": null,
      "href": "https://backstage.taboola.com/backstage/api/1.0/demo-advertiser/campaigns/1234/targeting/audience_segments"
   }
   // Etc...
}

  1. Update audience targeting by passing an Audience Targeting Object to the relevant targeting endpoint. Note: updates overwrite existing targeting details.
POST /backstage/api/1.0/demo-advertiser/campaigns/1234/targeting/audience_segments
{
    "collection": [
        {
            "collection": [
                158354,
                84965,
                15495,
                167,
                1687024,
                3119
            ],
            "type": "INCLUDE"
        }
    ]
}
{
    "collection": [
        {
            "collection": [
                158354,
                84965,
                15495,
                167,
                1687024,
                3119
            ],
            "type": "INCLUDE"
        }
    ]
}

  1. Fetch audience targeting details via the above targeting endpoint (using GET). As a convenience, a reference to this endpoint is stored in the Campaign object, under the relevant targeting field (see point 1).
GET /backstage/api/1.0/demo-advertiser/campaigns/1234/targeting/audience_segments
{
    "collection": [
        {
            "collection": [
                158354,
                84965,
                15495,
                167,
                1687024,
                3119
            ],
            "type": "INCLUDE"
        }
    ]
}

📘

Flow Summary

  • Within the Campaign Object, each targeting field uses a Multi-Targeting Object to display high-level targeting details.
  • Within the Multi-Targeting Object, href stores a reference to the actual targeting endpoint.
  • The targeting endpoint expects an Audience Targeting Object.