Campaign Negative Targeting Clauses

Warning

Sponsored Product v3 is not available for Sandbox endpoint

Note

This API is version 3.0

Documentation: https://advertising.amazon.com/API/docs/en-us/sponsored-products/3-0/openapi/prod

Specification: https://d1y2lf8k3vrkfu.cloudfront.net/openapi/en-us/dest/SponsoredProducts_prod_3p.json

class ad_api.api.sp.CampaignNegativeTargets(account: str = 'default', marketplace: Marketplaces = Marketplaces.EU, credentials: Dict[str, str] | None = None, proxies: Dict[str, str] | None = None, verify: bool = True, timeout: int | None = None, debug: bool = False, access_token: str | None = None, verify_additional_credentials: bool = True)

Endpoints available

Method

Endpoint

Description

DELETE

/sp/campaignNegativeTargets/delete

Deletes Campaign Negative Targeting Clauses

POST

/sp/campaignNegativeTargets

Create Campaign Negative Targeting Clauses

PUT

/sp/campaignNegativeTargets

Updates Campaign Negative Targeting Clauses

POST

/sp/campaignNegativeTargets/list

List Campaign Negative Targeting Clauses

delete_campaign_negative_targets(version: int = 3, **kwargs) → ApiResponse

Deleting campaign negative targets.

Request Body (required)
SponsoredProductsDeleteSponsoredProductsCampaignNegativeTargetingClausesRequestContent {
campaignNegativeTargetIdFilter* SponsoredProductsObjectIdFilter {
Filter entities by the list of objectIds
include* (array) minItems: 0 maxItems: 1000 [
string entity object identifier
]
}
}
Returns

ApiResponse

create_campaign_negative_targets(version: int = 3, prefer: bool = False, **kwargs) → ApiResponse

Create campaign negative targets.

Keyword Args

  • prefer (bool): send Prefer: return=representation so create and update return the full object rather than only the ids. [optional]

Request Body (required)

  • campaignNegativeTargetingClauses (array): the clauses to create.

    Each clause carries:

    • campaignId (string): the campaign the target belongs to.

    • state (string): ENABLED or PAUSED.

    • expression (array): one predicate with type and value. type is ASIN_BRAND_SAME_AS or ASIN_SAME_AS.

Returns

ApiResponse

edit_negative_product_targets(version: int = 3, prefer: bool = False, **kwargs) → ApiResponse

Update campaign negative targets.

Keyword Args

  • prefer (bool): send Prefer: return=representation so create and update return the full object rather than only the ids. [optional]

Request Body (required)

  • campaignNegativeTargetingClauses (array): the clauses to update.

    Each clause carries:

    • targetId (string): the target to update.

    • state (string): ENABLED or PAUSED.

    • expression (array): one predicate with type and value. type is ASIN_BRAND_SAME_AS or ASIN_SAME_AS.

Returns

ApiResponse

list_campaign_negative_targets(version: int = 3, **kwargs) → ApiResponse

List campaign negative targets.

Request Body (optional)

  • campaignIdFilter (object): narrow to those campaigns. Carries include, a list of campaign ids.

  • campaignNegativeTargetIdFilter (object): narrow to those targets. Carries include, a list of target ids.

  • stateFilter (object): narrow by state. Carries include, a list drawn from ENABLED, PAUSED, ARCHIVED, ENABLING, USER_DELETED and OTHER.

  • asinFilter (object): narrow by ASIN. Carries include, a list of ASINs, and queryTermMatchType, either BROAD_MATCH or EXACT_MATCH.

  • maxResults (integer): page size. Defaults to the API maximum.

  • nextToken (string): pagination token.

  • includeExtendedDataFields (boolean): also return creationDate, lastUpdateDate and servingStatus.

Returns

ApiResponse