The Campaign object contains the details of the campaign the advertiser would like to run, along with a list of units. It starts out as a proposal, then moves into a booked state once purchased.
The Campaign Object
The campaign can be of 2 types:
Direct
Rtb
In addition to standard data, the campaign object involves three other sub-objects: geography, resolutions, and units. These are detailed below.
Proposal Object
When submitting a campaign you use a proposal object like below
By default the API only supports U.S.-based inventory, but non-U.S. inventory can be included upon request.
The API currently supports three ways of targeting via geography:
Nielsen DMA IDs
U.S. ZIP Codes.
Market IDs
You can use both zip codes and DMAs/Markets in the same request.
This is the expected format for the geography object:
Important: Please note that DMA ids and Market ids are integers and zip codes are strings.
Endpoints
Create Campaign
create campaign
post
Header parameters
X-PARTNER-TOKENstringOptional
Body
campaign_typestring · min: 1Required
partner_idnotRequired
advertiser_idnotRequired
start_datestring · date · min: 1Required
end_datestring · date · min: 1Required
target_budget_centsnotRequired
Responses
200
successful
application/json
post
/v1/campaigns
200
successful
Get Campaign
List Campaigns
list campaigns
get
Query parameters
start_datedateOptional
end_datedateOptional
campaign_typeanyOptional
statusstringOptional
Header parameters
X-PARTNER-TOKENstringOptional
Responses
200
successful
application/json
get
/v1/campaigns
200
successful
Book a Campaign
When you book a campaign, in our system we'll execute against the proposed inventory matching your preferences.
You need to have approved creatives for the campaign in order to book an auction campaign. Our system will automatically match each unit with a matching creative based on the resolution.
You can submit more than one creative per unit and they will automatically alternate.
If there are units that don't have a matching creative resolution, the booking will not be completed and the endpoint and will return a 402 along with the resolutions that are missing.
Expected format:
{
direct_ids: [array of strings],
rtb_ids: [array of strings]
}
Expected format:
{
dma_ids: [array of integers],
market_ids: [array of integers],
zip_codes: [array of strings]
}
Example:
{
dma_ids: [501, 524], #=> e.g. New York, Atlanta,
market_ids: [737, 686] #=> e.g. New York, Atlanta
zip_codes: ["75225", "90291"]
}
POST /campaigns #=> Create campaign
GET /campaigns/:id #=> Get campaign details
GET /campaigns #=> List campaigns
POST /campaigns/:id/book #=> Book the campaign
GET /campaigns
Expects:
- start_date (optionally filter by start_date greater than or equal to)
- end_date (optionally filter by end_date less than or equal to)
- campaign_type (optionally filter by campaign type, accepts 'rtb' or 'direct')
- status (optionally filter by status)
Date format: YYYY-MM-DD
Returns: paginated array of campaign objects
POST /campaigns/:id/book
Expects
- id
Returns: the full campaign object of the new booked campaign.