Campaign Negative Targeting Clauses
Warning
Sponsored Product v3 is not available for Sandbox endpoint
Note
This API is version 3.0
- class ad_api.api.sp.CampaignNegativeTargets(account='default', marketplace: Marketplaces = Marketplaces.EU, credentials=None, proxies=None, verify=True, timeout=None, debug=False, access_token=None)
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(self, version: int = 3, **kwargs) ApiResponse:
Deleting campaign negative targets.
- Request Body (required)
- SponsoredProductsDeleteSponsoredProductsCampaignNegativeTargetingClausesRequestContent {campaignNegativeTargetIdFilter* SponsoredProductsObjectIdFilter {Filter entities by the list of objectIdsinclude* (array) minItems: 0 maxItems: 1000 [string entity object identifier]}}
- Returns
ApiResponse
- create_campaign_negative_targets(self, version: int = 3, prefer: bool = False, **kwargs) ApiResponse:
Create campaign negative targets.
Param:
header Prefer* (string). The “Prefer” header, as defined in [RFC7240], allows clients to request certain behavior from the service. The service ignores preference values that are either not supported or not known by the service. Either multiple Prefer headers are passed or single one with comma separated values, both forms are equivalent Supported preferences: return=representation - return the full object when doing create/update/delete operations instead of ids- Request Body (required)
- SponsoredProductsCreateSponsoredProductsCampaignNegativeTargetingClausesRequestContent {campaignNegativeTargetingClauses* SponsoredProductsCreateCampaignNegativeTargetingClause {expression* (array) The NegativeTargeting expression. minItems: 0 maxItems: 1000 [SponsoredProductsCreateOrUpdateNegativeTargetingExpressionPredicate {type* (string) SponsoredProductsCreateOrUpdateNegativeTargetingExpressionPredicateType. The type of negative targeting expression. Enum: [‘ASIN_BRAND_SAME_AS’, ‘ASIN_SAME_AS’].value (string): The expression value}]campaignId* (string) The identifier of the campaign to which this target is associated.state* (string) SponsoredProductsCreateOrUpdateEntityState. Entity state for create or update operation. Enum: [ ENABLED, PAUSED ]}}
Request Body (optional)
- Returns
ApiResponse
- edit_negative_product_targets(self, version: int = 3, prefer: bool = False, **kwargs) ApiResponse:
Update campaign negative targets.
Param:
header Prefer* (string). The “Prefer” header, as defined in [RFC7240], allows clients to request certain behavior from the service. The service ignores preference values that are either not supported or not known by the service. Either multiple Prefer headers are passed or single one with comma separated values, both forms are equivalent Supported preferences: return=representation - return the full object when doing create/update/delete operations instead of ids- Request Body (required)
- SponsoredProductsUpdateSponsoredProductsCampaignNegativeTargetingClausesRequestContent {campaignNegativeTargetingClauses* SponsoredProductsUpdateCampaignNegativeTargetingClause {expression* (array) The NegativeTargeting expression. minItems: 0 maxItems: 1000 [SponsoredProductsCreateOrUpdateNegativeTargetingExpressionPredicate {type* (string) SponsoredProductsCreateOrUpdateNegativeTargetingExpressionPredicateType. The type of negative targeting expression. Enum: [‘ASIN_BRAND_SAME_AS’, ‘ASIN_SAME_AS’].value (string): The expression value}]targetId* (string) The target identifierstate* (string) SponsoredProductsCreateOrUpdateEntityState. Entity state for create or update operation. Enum: [ ENABLED, PAUSED ]}}
Request Body (optional)
- Returns
ApiResponse
- list_campaign_negative_targets(self, version: int = 3, **kwargs) ApiResponse:
List campaign negative targets.
- Request Body (required)
- SponsoredProductsListSponsoredProductsCampaignNegativeTargetingClausesRequestContent {campaignIdFilter SponsoredProductsReducedObjectIdFilter {Filter entities by the list of objectIdsinclude* (array) minItems: 0 maxItems: 100 [string entity object identifier]}campaignNegativeTargetIdFilter SponsoredProductsObjectIdFilter {Filter entities by the list of objectIdsinclude* (array) minItems: 0 maxItems: 1000 [string entity object identifier]}stateFilter SponsoredProductsEntityStateFilter {Filter entities by stateinclude* (array) minItems: 0 maxItems: 10 [SponsoredProductsEntityState (string) The current resource state. Enum: [ ENABLED, PAUSED, ARCHIVED, ENABLING, USER_DELETED, OTHER ]]}maxResults integer($int32) Number of records to include in the paginated response. Defaults to max page size for given APInextToken (string) token value allowing to navigate to the next response pageasinFilter SponsoredProductsAsinFilter {queryTermMatchType SponsoredProductsQueryTermMatchType (string): Match type for query filters. Enum: [ BROAD_MATCH, EXACT_MATCH ]include (array) maxItems: 100 [string]}includeExtendedDataFields (boolean) Whether to get entity with extended data fields such as creationDate, lastUpdateDate, servingStatus}
Request Body (optional)
- Returns
ApiResponse