Overview
A campaign groups line items that share attribution settings, flight dates and budget. It is the entity you create first, before adding the line items that control delivery. The campaigns endpoint is shared across campaign types. It exposes common fields through one contract instead of separate Sponsored Products and Onsite Display routes. ThecampaignType attribute is the discriminator. Type-specific fields are carried in the details object matching the type.
The objective and the budget belong to the details object, not to the campaign root. A
SponsoredProducts campaign sets its own objective; an OnsiteDisplay campaign created through this endpoint is always an impressions campaign, so it sets no objective and its budget is required.Endpoints Overview
Create a Campaign
Path parameter
The authenticated user must have permission to manage campaigns on the requested account.
Request attributes
All attributes below are nested underdata.attributes in the request envelope, and the resource type is CampaignCreateModel.
Attribution settings attributes
Defaults applied when a setting is omitted:
Schedule details attributes
A manual
SponsoredProducts campaign that runs indefinitely sends exactly 9999-12-30T00:00:00Z as its endDate. Any other far-future date, including a neighbouring one, is treated as a real end date.
An objective other than Manual spends its budget over a flight, so it needs a real end date and rejects that value. An OnsiteDisplay Auction campaign rejects it too.
Sponsored Products details attributes
Nested undersponsoredProductsDetails.
Onsite Display details attributes
Nested underonsiteDisplayDetails.
Budget attributes
Automatic pacing sets the daily amount itself, so it cannot be combined with a
Daily capping.
Sample request
OnsiteDisplay campaign carries its budget under onsiteDisplayDetails and sets no objective. Its budget is an amount only:
Response attributes
All attributes below are nested underdata.attributes in the response envelope, and the resource type is CampaignResponseModel. Alongside the attributes accepted on creation, the response carries:
The details object carries the stored budget back, with
amount and, for a manual SponsoredProducts campaign, the cappings and pacing it holds. Only capped periods are reported.
The details object that does not match the campaign type is returned as null.
Sample response
Get a Campaign
Path parameters
Response
Returns the campaign as aCampaignResponseModel. See Create a Campaign — Response attributes for the full field list.
Update a Campaign
Selectively updates a campaign. Only the fields you include in the request are changed — omitted fields remain unchanged.campaignType, buyType, billByRetailerId, and drawableBalanceIds cannot be changed after creation.
Path parameters
Request attributes
All attributes are nested underdata.attributes. The resource type is CampaignUpdateModel. All fields are optional — include only what you want to change.
Sample request
Response
Returns the updated campaign as aCampaignResponseModel.
Search Campaigns
Search campaigns under an account using optional filters and pagination.Budget details in search results come from a search index and may be eventually consistent with the values returned by the GET endpoint. If you need guaranteed up-to-date budget figures, fetch the campaign individually.
drawableBalanceIds is not included in search results.Path parameters
Request attributes
All attributes are nested underdata.attributes. The resource type is CampaignSearchModel. All fields are optional. Values within a single filter are ORed; distinct filters are ANDed.
Sample request
Response
Returns a paginated list of campaigns asCampaignResponseModel entries. See Create a Campaign — Response attributes for the full field list.
Responses
Validation failures returntype: validation and a code identifying the rule that rejected the request.