Negative Product Targeting
Deprecated since version 4.0.2.
Warning
There is a new version 3 of Sponsored Product API, please check the `migration guide`_.
- class ad_api.api.sp.NegativeTargets(account='default', marketplace: Marketplaces = Marketplaces.EU, credentials=None, proxies=None, verify=True, timeout=None, debug=False, access_token=None)
- create_negative_targets(**kwargs)
create_products_targets(self, **kwargs) -> ApiResponse:
Creates one or more targeting expressions.
body: | REQUIRED {‘description’: ‘An array of asins objects.}’
‘campaignId’: number, {‘description’: ‘The identifier of the campaign to which this negative target is associated.’}‘adGroupId’: number, {‘description’: ‘The identifier of the ad group to which this negative target is associated.’}‘state’: number, {‘description’: ‘The current resource state. [ enabled, paused, archived ]’}‘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 ]’}‘expressionType’: string, {‘description’: ‘[ auto, manual ]’}Returns:
ApiResponse
- delete_negative_targets(self, targetId, \*\*kwargs) ApiResponse
Archives a negative targeting clause.
path targetId:number | Required. The target identifier.
Returns:
ApiResponse
- edit_negative_targets(self, \*\*kwargs) ApiResponse:
Updates one or more negative targeting clauses.
body: | REQUIRED {‘description’: ‘An array of asins objects.}’
‘campaignId’: number, {‘description’: ‘The identifier of the campaign to which this negative target is associated.’}‘adGroupId’: number, {‘description’: ‘The identifier of the ad group to which this negative target is associated.’}‘state’: number, {‘description’: ‘The current resource state. [ enabled, paused, archived ]’}‘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 ]’}‘expressionType’: string, {‘description’: ‘[ auto, manual ]’}Returns:
ApiResponse
- get_negative_target(**kwargs)
get_negative_targets(self, targetId, **kwargs) -> ApiResponse
Get a negative targeting clause specified by identifier.
path targetId:number | Required. The target identifier.
Returns:
ApiResponse
- get_negative_target_extended(self, targetId, \*\*kwargs) ApiResponse
Get a negative targeting clause specified by identifier.
path targetId:number | Required. The target identifier.
Returns:
ApiResponse
- list_negative_targets(self, \*\*kwargs) ApiResponse
Gets a list of negative targeting clauses filtered by specified criteria.
query startIndex:integer | Optional. 0-indexed record offset for the result set. Default value : 0
query count:integer | Optional. Number of records to include in the paged response. Defaults to max page size.
query stateFilter:string | Optional. The returned array is filtered to include only ad groups with state set to one of the values in the specified comma-delimited list. Available values : enabled, paused, archived, enabled, paused, enabled, archived, paused, archived, enabled, paused, archived Default value : enabled, paused, archived.
query campaignIdFilter:string | Optional. A comma-delimited list of campaign identifiers.
query adGroupIdFilter:string | Optional. Restricts results to keywords associated with ad groups specified by identifier in the comma-delimited list.
query targetIdFilter:string | Optional. A comma-delimited list of target identifiers.
Returns:
ApiResponse
- list_negative_targets_extended(self, \*\*kwargs) ApiResponse
Gets a list of negative targeting clauses filtered by specified criteria.
query startIndex:integer | Optional. 0-indexed record offset for the result set. Default value : 0
query count:integer | Optional. Number of records to include in the paged response. Defaults to max page size.
query stateFilter:string | Optional. The returned array is filtered to include only ad groups with state set to one of the values in the specified comma-delimited list. Available values : enabled, paused, archived, enabled, paused, enabled, archived, paused, archived, enabled, paused, archived Default value : enabled, paused, archived.
query campaignIdFilter:string | Optional. A comma-delimited list of campaign identifiers.
query adGroupIdFilter:string | Optional. Restricts results to keywords associated with ad groups specified by identifier in the comma-delimited list.
query targetIdFilter:string | Optional. A comma-delimited list of target identifiers.
Returns:
ApiResponse