Skip to main content

Overview

Availability: Available Targeting defines where and how a line item can serve. Each target has a target type and type-specific details. The Get Targets endpoint retrieves the ManualKeyword, PageType, and Category targets configured for a line item. The Create Targets endpoint creates ManualKeyword, PageType, and Category targets for a line item. The Update Targets and Delete Targets endpoints modify or remove those targets in bulk.
Geography targets are supported by the API but not yet documented here.

Targeting Types

All endpoints use Target resources. A target’s targetType determines the one target details object it contains. A target must contain exactly one details object that matches its targetType. Bid multipliers are supported only on non-negative targets. For ManualKeyword targets, bid multipliers are matched using the retailer’s default language. Create, Update, and Delete requests can contain up to 100 targets, may mix target types, and cannot contain the same target more than once.

Shared Target Attributes

Target Type Details

Target Request Attributes

Create, Update, and Delete use the same request shape:

Partial Success Across Target Types

All target endpoints support partial success by target type. An endpoint can return 200 OK even when one target type fails; inspect both errors and warnings before treating the response as complete.

Identifying Targets for Update and Delete

To update or delete targets, copy the target resources from data in a Get Targets response into the request’s data array. An Update request can change the mutable fields listed below. A Delete request can use the fetched target resources without changes. The response-only approvalStatus field can remain in a copied resource; it does not change approval status. The identity fields cannot be changed with Update. To change one, delete the existing target and create a new one.

Endpoints


Get Targets

Retrieves the ManualKeyword, PageType, and Category targets configured for the specified line item. Use offset and limit to page through the targets retrieved successfully. Prerequisites:
  • OAuth 2.0 bearer token with the RetailMedia_Campaign_Read scope
  • Access to the requested line item

Request Attributes

Response Attributes

Each resource in data is a Target. See Targeting types for its shared attributes and the details object for each target type. Sample Request
Sample Response — 200 OK

Responses

Partial Success

If one or more target types are available, Get returns 200 OK with those targets in data and describes any unavailable target types in errors. If retrieval fails for every supported target type, it returns a non-200 response with no target data. The metadata.count value is the total number of targets retrieved successfully before pagination. If offset is greater than or equal to metadata.count, data is empty. The errors and warnings arrays apply to the full response and are not affected by pagination. The following example shows a successful response when ManualKeyword targets are unavailable. The response still includes the available PageType and Category targets. Clients should process those targets and inspect errors before treating the response as complete. ManualKeyword targets unavailable — 200 OK

Create Targets

Creates ManualKeyword, PageType, and Category targets for the specified line item. Prerequisites:
  • OAuth 2.0 bearer token with the RetailMedia_Campaign_Manage scope
  • Access to the requested line item
See Target request attributes for the request fields.

Examples

Successful Request
Successful Response — 200 OK

Responses

Validation Errors

Create responses can include the following application-level validation errors in errors:

Partial Success Example

Partial-Success Request
Partial-Success Response — 200 OK
The error points to the first requested target, while the valid PageType target was created successfully.

Update Targets

Updates ManualKeyword, PageType, and Category targets for the specified line item. The request has PATCH-like semantics: only mutable fields supplied in the request are updated. See Identifying targets for Update and Delete for the fields that identify each target and the fields that can be updated. Prerequisites:
  • OAuth 2.0 bearer token with the RetailMedia_Campaign_Manage scope
  • Access to the requested line item
See Target request attributes for the request fields.

Example

Successful Request
Successful Response — 200 OK

Responses

Validation Errors

Update responses can include the following application-level validation errors in errors:

Delete Targets

Deletes ManualKeyword, PageType, and Category targets from the specified line item. See Identifying targets for Update and Delete for how to select targets to delete. Prerequisites:
  • OAuth 2.0 bearer token with the RetailMedia_Campaign_Manage scope
  • Access to the requested line item
See Target request attributes for the request fields.

Example

Successful Request
Successful Response — 200 OK
The response does not contain a data array. Use Get Targets to retrieve the targets remaining on the line item.

Responses

Deleting a PageType target can also remove Category targets associated only with that page type. The response then includes a category-targets-removed-with-page-type warning.

Validation Errors

Delete responses can include the following application-level validation errors in errors: