Overview
A line item is a unit within a campaign that controls how ads are delivered. It identifies the retailer where ads can run and holds delivery settings for its campaign type. A campaign can contain multiple line items. The line item core endpoints are shared across campaign types. They expose common fields through one contract instead of separate Sponsored Products and Onsite Display routes. The referencedcampaignId determines the line-item type. Type-specific fields are carried in a matching details object alongside the common attributes. Include only the details object supported by the campaign type.
The long-term goal is to support line-item core operations across campaign types. Initial documented support targets Onsite Display Auction campaigns and uses
onsiteDisplayDetails. Additional details objects will be documented as support is added.Endpoints
Get a Line Item
Retrieves a consolidated view of a line item: its core fields, targeting, ad content (products and creatives), and bidding settings.Path Parameters
Response Attributes
All attributes below are nested underdata.attributes.
Sample Request
200 OK
Partial Availability
core is always required: if it cannot be retrieved, the endpoint returns a non-200 response with no data, forwarding the downstream error and status code unchanged.
targeting, adContent.products, adContent.creatives, and bidding are independently optional:
- If one of these is temporarily unavailable (for example, a downstream dependency failure), the response still returns
200 OKwith that attribute set tonulland a warning appended to the top-levelwarningsarray. adContentitself isnullonly when bothproductsandcreativesare unavailable; if either succeeds,adContentis present with the other field set tonull.- If a scope does not apply to the line item’s type (for example, requesting creatives for a line item type that does not support them), the attribute is
nullwithout a warning, since the scope does not apply rather than being unavailable.
Clients should always inspect the
warnings array, even on a 200 OK response, since it can indicate that part of the consolidated view is incomplete.
Errors
Create a Line Item Core
Creates a line-item core entity under an existing campaign.Request Attributes
The resource
type is line-item. Do not send response-only fields such as lineItemId, type, budgetStatus, effectiveFlightDates, or conquestingSettings inside attributes.
Sample Request
Response Attributes
All attributes below are nested underdata.attributes. Alongside the attributes accepted on creation, the response carries read-only fields such as the following enum fields.
Sample Response
Errors
Update a Line Item Core
Updates an existing line item. This is a partial update: only the fields included in the request body are changed. Omitted fields keep their current values.campaignId and retailerId cannot be changed after creation.
Path Parameters
Request Attributes
The resource
type is line-item. Do not send response-only fields such as lineItemId, type, budgetStatus, effectiveFlightDates, or conquestingSettings inside attributes.
Sample Request