Skip to main content

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 referenced campaignId 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.
This endpoint replaces the following type-specific creation routes, which remain available in the meantime:

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 under data.attributes. Sample Request
Sample Response — 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 OK with that attribute set to null and a warning appended to the top-level warnings array.
  • adContent itself is null only when both products and creatives are unavailable; if either succeeds, adContent is present with the other field set to null.
  • 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 null without 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 under data.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
The response attributes are the same as for Create. Sample Response

Errors