New Ad
POST {{campaign_url}}/lineItems/:lineItemId/ads
Create a new ad
You can create a new ad (i.e., assign creatives to a line item) by sending this POST
request. To define creatives to assign to the LI specified by lineItemId
, open the body tab and edit the JSON object.
Request Body (Definitions)
*Optional element
JSON Object Key | Description | Type |
---|---|---|
name | Name of this ad/LI-creative assignment. | string |
creatives | Creative to be assigned to the LI. | comma-separated array containing one or more creative DTOs |
*rotation (Only available if creatives contains more than one creative structure) | Method by which the LI's creatives should be rotated during ad delivery. Weighted: Display creatives based on the frequency set (i.e., creative's weight value divided by the total weight of all creatives). Optimized: Serve creatives in proportion to a click/action rate. Best-performing: Serve creatives based goals set at the IO level. Best-performing creative is served 75% of the time and others served evenly for the remaining 25%. Allowed values: random, weighted, optimized, bestPerforming | string |
creative
DTO
Key | Description | Type |
---|---|---|
creativeId | ID associated with a creative. | string |
weight (Only available if rotation method is defined as weighted) | How often the creative should be served, considering the weight of other creatives assigned to the LI. | float |
Request Body
{"name"=>"2022 summer ad", "creatives"=>[{"creativeId"=>"{{creativeId}}", "weight"=>0.75}, {"creativeId"=>"1608815587", "weight"=>0.25}], "rotation"=>"weighted"}
RESPONSES
status: Created
{"data":[{"id":"53427015","resourceType":"ad","adFormat":"standard","adSizeId":"3","advertiserId":"1608792487","createdAt":"2022-09-19T17:48:18Z","clientStatus":"play","hasCompanion":false,"insertionOrderId":"1608792488","packageId":"1608792594","lineItemId":"1608801242","updatedAt":"2022-09-19T17:48:18Z","workflowStatus":"approved","creatives":[{"creativeId":"1608815594"}],"name":"single creative ad","rotation":"random"}],"errors":[]}