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
Responses
Validation failures returntype: validation and a code identifying the rule that rejected the request.