Campaign Negative Keywords
Warning
Sponsored Product v3 is not available for Sandbox endpoint
Note
This API is version 3.0
- class ad_api.api.sp.CampaignNegativeKeywordsV3(account='default', marketplace: Marketplaces = Marketplaces.EU, credentials=None, proxies=None, verify=True, timeout=None, debug=False, access_token=None)
Endpoints available
Method
Endpoint
Description
POST
/sp/campaignNegativeKeywords/delete
Delete campaigns negative keywords
POST
/sp/campaignNegativeKeywords/list
List campaigns negative keywords
POST
/sp/campaignNegativeKeywords
Create campaigns negative keywords
PUT
/sp/campaignNegativeKeywords
Update campaigns negative keywords
- delete_campaign_negative_keyword(self, version: int = 3, **kwargs) ApiResponse:
Delete Campaign negative keywords
- Request Body
- SponsoredProductsDeleteSponsoredProductsCampaignNegativeKeywordsRequestContent {campaignNegativeKeywordIdFilter* SponsoredProductsObjectIdFilter {Filter entities by the list of objectIdsinclude* (array). minItems: 0. maxItems: 1000 [entity object identifier (string)]}}
- Returns
ApiResponse
- list_campaign_negative_keywords(self, version: int = 3, **kwargs) ApiResponse:
List Campaign negative keywords
- Request Body
- SponsoredProductsListSponsoredProductsCampaignNegativeKeywordsRequestContent {campaignIdFilter* SponsoredProductsReducedObjectIdFilter {Filter entities by the list of objectIdsinclude* (array). minItems: 0. maxItems: 1000 [entity object identifier (string)]}campaignNegativeKeywordIdFilter* SponsoredProductsObjectIdFilter {Filter entities by the list of objectIdsinclude* (array). minItems: 0. maxItems: 1000 [entity object identifier (string)]}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 pageincludeExtendedDataFields (boolean) Whether to get entity with extended data fields such as creationDate, lastUpdateDate, servingStatus. Enum: [ BROAD_MATCH, EXACT_MATCH ]campaignNegativeKeywordTextFilter* SponsoredProductsKeywordTextFilter {Filter by keywordTextqueryTermMatchType SponsoredProductsQueryTermMatchType (string): Match type for query filters.include (array). minItems: 0. maxItems: 1000 [entity object identifier (string)]}matchTypeFilter* (array). [Restricts results to resources with the selected matchType.SponsoredProductsNegativeMatchType (string) Enum: [‘NEGATIVE_EXACT’, ‘NEGATIVE_PHRASE’, ‘NEGATIVE_BROAD’, ‘OTHER’]]}
- Returns
ApiResponse
- create_campaign_negative_keywords(self, version: int = 3, prefer: bool = False, **kwargs) ApiResponse:
Create Campaign negative keywords
header Prefer:boolean | 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.- Request Body
- SponsoredProductsCreateSponsoredProductsCampaignNegativeKeywordsRequestContent {campaignNegativeKeywords* (array) minItems: 0 maxItems: 1000 [SponsoredProductsCreateCampaignNegativeKeyword {campaignId* (string): The identifier of the campaign to which the keyword is associated.matchType* SponsoredProductsCreateOrUpdateNegativeMatchType (string) Enum: [‘NEGATIVE_EXACT’, ‘NEGATIVE_PHRASE’, ‘NEGATIVE_BROAD’]state* SponsoredProductsCreateOrUpdateEntityState (string): Entity state for create or update operation Enum: [‘ENABLED’, ‘PAUSED’]keywordText* (string): The keyword text.}]}
- Returns
ApiResponse
- edit_campaign_negative_keywords(self, version: int = 3, prefer: bool = False, **kwargs) ApiResponse:
Update Campaign negative keywords
header Prefer:boolean | 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.- Request Body
- SponsoredProductsUpdateSponsoredProductsCampaignNegativeKeywordsRequestContent {campaignNegativeKeywords* (array) minItems: 0 maxItems: 1000 [SponsoredProductsUpdateCampaignNegativeKeyword {keywordId* (string): entity object identifier.state* SponsoredProductsCreateOrUpdateEntityState (string): Entity state for create or update operation Enum: [‘ENABLED’, ‘PAUSED’]}]}
- Returns
ApiResponse