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
Expected format:{ direct_ids: [array of strings], rtb_ids: [array of strings]}
The Geography Object
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:
Code
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"]}
Important: Please note that DMA ids and Market ids are integers and zip codes are strings.
Endpoints
Code
POST /campaigns #=> Create campaignGET /campaigns/:id #=> Get campaign detailsGET /campaigns #=> List campaignsPOST /campaigns/:id/book #=> Book the campaign
GET /campaigns/:idReturns: the full campaign object
List Campaigns
GET /v1/campaigns
list campaigns
Code
{"openapi":"3.0.3","info":{"title":"API V1","version":"v1"},"servers":[{"url":"https://{defaultHost}","variables":{"defaultHost":{"default":"api.adquick.com"}}}],"paths":{"/v1/campaigns":{"get":{"summary":"list campaigns","parameters":[{"name":"X-PARTNER-TOKEN","in":"header","schema":{"type":"string"}},{"name":"start_date","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"end_date","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"current_page","in":"query","required":false,"description":"Desired page number (between 1 and `total_pages` returned in `pagination`).","schema":{"type":"integer","minimum":1}},{"name":"campaign_type","in":"query","required":false,"description":"Filter by campaign type","schema":{"type":"string","enum":["rtb","direct"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"successful","content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string","minLength":1},"campaign_type":{"type":"string","minLength":1},"advertiser_id":{"type":"integer"},"start_date":{"type":"string","format":"date","minLength":1},"end_date":{"type":"string","format":"date","minLength":1},"target_budget_cents":{"type":"integer"},"placements":{"type":"object","properties":{"direct_ids":{"type":"array","items":{"type":"string"}},"rtb_ids":{"type":"array","items":{"type":"string"}}}},"geographies":{"type":"object","properties":{"dma_ids":{"type":"array","nullable":true,"items":{"type":"integer"}},"zip_codes":{"type":"array","nullable":true,"items":{"type":"string"}},"market_ids":{"type":"array","nullable":true,"items":{"type":"integer"}}}},"media_types":{"type":"object","properties":{"direct_ids":{"type":"array","items":{"type":"string"}},"rtb_ids":{"type":"array","items":{"type":"string"}}}}},"required":["token","campaign_type","advertiser_id","start_date","end_date","target_budget_cents"]}},"pagination":{"type":"object","properties":{"current_page":{"type":"integer"},"next_page":{"type":"integer","nullable":true},"prev_page":{"type":"integer","nullable":true},"total_pages":{"type":"integer"},"total_entries":{"type":"integer"}},"required":["current_page","next_page","prev_page","total_pages","total_entries"]}},"required":["records","pagination"]}}}}}}}}}
Code
GET /campaignsExpects:- 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-DDReturns: paginated array of campaign objects
Book a Campaign
When you book a campaign, in our system we'll execute against the proposed inventory matching your preferences.
Code
POST /campaigns/:id/bookExpects- idReturns: the full campaign object of the new booked campaign.
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.