Product Targeting

Warning

Sponsored Product v3.0 is not available for Sandbox endpoint

Note

This documentation API 3.0

Endpoints available version 3.0

Method

Endpoint

Description

POST

/sp/targets/list

Listing product targets.

POST

/sp/targets

Creating product targets.

PUT

/sp/targets

Creating product targets.

POST

/sp/targets/delete

Deleting product targets.

POST

/sp/targets/categories/recommendations

Returns a list of category recommendations for the input list of ASINs.

POST

/sp/targets/products/count

Get number of targetable asins based on refinements provided by the user.

GET

/sp/targets/categories

Returns all targetable categories.

GET

/sp​/targets​/category​/{categoryId}​/refinements

Returns refinements according to category input.

class ad_api.api.sp.TargetsV3(account='default', marketplace: Marketplaces = Marketplaces.EU, credentials=None, proxies=None, verify=True, timeout=None, debug=False, access_token=None)
list_product_targets(self, version: int = 3, **kwargs) ApiResponse:

Listing product targets.

Request Body (optional)

Returns

ApiResponse

create_product_targets(self, version: int = 3, prefer: bool = False, **kwargs) ApiResponse:

Creating product targets.

Request Body (required)
campaignId’: string, {‘description’: ‘The number or recommendations returned in a single page.’}
adGroupId’: string, {‘description’: ‘The page number in the result set to return.’}
expression’ | ‘value’: string, {‘description’: ‘The expression value.’} | ‘type’: string, {‘description’: ‘[ queryBroadMatches, queryPhraseMatches, queryExactMatches, asinCategorySameAs, asinBrandSameAs, asinPriceLessThan, asinPriceBetween, asinPriceGreaterThan, asinReviewRatingLessThan, asinReviewRatingBetween, asinReviewRatingGreaterThan, asinSameAs, queryBroadRelMatches, queryHighRelMatches, asinSubstituteRelated, asinAccessoryRelated, asinAgeRangeSameAs, asinGenreSameAs, asinIsPrimeShippingEligible ]’}
state’: string, {‘description’: ‘The current resource state.’ , ‘Enum’: ‘[ enabled, paused, archived ]’}
expressionType’: string, {‘description’: ‘[ auto, manual ]’}
bid’: float, {‘description’: ‘The bid for ads sourced using the target. Min / Max 0.02 / 1000’}
Returns

ApiResponse

edit_product_targets(self, version: int = 3, prefer: bool = False, **kwargs) ApiResponse:

Updating product targets.

Request Body (required)
targetId’: string, (required) {‘description’: ‘The identifer of the campaign to which the keyword is associated.’}
state’: string, {‘description’: ‘The current resource state.’ , ‘Enum’: ‘[ enabled, paused, archived ]’}
bid’: float {‘description’: ‘Bid associated with this keyword. Applicable to biddable match types only.’}
expression
value’: string, The expression value.
type’: string, The type of nagative targeting expression. You can only specify values for the following predicates: Enum : [ASIN_BRAND_SAME_AS, ASIN_SAME_AS]
expressionType’ Enum : [AUTO, MANUAL]
Returns

ApiResponse

delete_product_targets(self, version: int = 3, **kwargs) ApiResponse:

Deleting product targets

Request Body (required)
targetIdFilter {} : Filter product targets by the list of objectIds include [string] : list of productTargetIds as String to be used as filter. MinItems : 0, MaxItems :1000
Returns

ApiResponse

list_products_targets_categories_recommendations(self, version: int = 3, prefer: bool = False, **kwargs) ApiResponse:

Returns a list of category recommendations for the input list of ASINs. Use this API to discover relevant categories to target. To find ASINs, either use the Product Metadata API or browse the Amazon Retail Website.

header Prefer:string | Used to indicate the behavior preferred by the client but is not required for successful completion of the request. Supported values will be updated in the future.

body: | REQUIRED {‘description’: ‘An array of asins objects.}’

asins’: list>*string*, {‘description’: ‘List of input ASINs. This API does not check if the ASINs are valid ASINs. maxItems: 10000.’}
includeAncestor’: boolean, {‘description’: ‘Enable this if you would like to retrieve categories which are ancestor nodes of the original recommended categories. This may increase the number of categories returned, but decrease the relevancy of those categories.’}

Returns:

ApiResponse

get_products_targets_count(self, version: int = 3, prefer: bool = False, **kwargs) ApiResponse:

Get number of targetable asins based on refinements provided by the user. Please use the GetTargetableCategories API or the GetCategoryRecommendationsForASINs API to retrieve the category ID. Please use the GetRefinementsByCategory API to retrieve refinements data for a category.

header Prefer:string | Used to indicate the behavior preferred by the client but is not required for successful completion of the request. Supported values will be updated in the future.

Returns:

ApiResponse

list_targets_categories(self, prefer: bool = False, **kwargs) ApiResponse:

Returns all targetable categories. This API returns a large JSON string containing a tree of category nodes. Each category node has the fields - category id, category name, and child categories.

header Prefer:string | Used to indicate the behavior preferred by the client but is not required for successful completion of the request. Supported values will be updated in the future.

Returns:

ApiResponse

list_products_targets_category_refinements(self, categoryId, prefer: bool = False, **kwargs) ApiResponse:

Get a targeting clause specified by identifier.

path categoryId:string | Required. The target identifier.
header Prefer:string | Used to indicate the behavior preferred by the client but is not required for successful completion of the request. Supported values will be updated in the future.

Returns:

ApiResponse