Class SponsoredProductsAdGroupNegativeKeywordsOperation

Hierarchy

  • Operation
    • SponsoredProductsAdGroupNegativeKeywordsOperation

Constructors

Methods

  • Archive a single negative ad group-level keyword. Archived entities cannot be made active again. See developer notes for more information.

    Returns

    Parameters

    • keywordId: number

    Returns Promise<{ code: "NOT_FOUND" | "SUCCESS" | "INVALID_ARGUMENT" } & { description: undefined | string; details: undefined | string; keywordId: undefined | number }>

  • Creates one or more negative keywords. Successfully created keywords will be assigned a unique keywordId.

    Returns

    Parameters

    • keywords: { adGroupId: number; campaignId: number; keywordText: string; matchType: "negativeExact" | "negativePhrase"; state: "paused" | "enabled" | "archived" }[]

    Returns Promise<({ code: "NOT_FOUND" | "SUCCESS" | "INVALID_ARGUMENT" } & { description: undefined | string; details: undefined | string; keywordId: undefined | number })[]>

  • Retrieves a negative keyword by ID. Note that this call returns the minimal set of keyword fields, but is more efficient than getNegativeKeywordEx.

    Returns

    Parameters

    • keywordId: number

    Returns Promise<{ adGroupId: number; campaignId: number; keywordId: number; keywordText: string; matchType: "negativeExact" | "negativePhrase"; state: "paused" | "enabled" | "archived" }>

  • Retrieves a negative keyword and its extended fields by ID. Note that this call returns the complete set of keyword fields (including serving status and other read-only fields), but is less efficient than getNegativeKeyword.

    Returns

    Parameters

    • keywordId: number

    Returns Promise<{ adGroupId: number; campaignId: number; keywordId: number; keywordText: string; matchType: "negativeExact" | "negativePhrase"; state: "paused" | "enabled" | "archived" } & { creationDate: Date; lastUpdatedDate: Date; servingStatus: "CAMPAIGN_ARCHIVED" | "CAMPAIGN_PAUSED" | "ADVERTISER_PAYMENT_FAILURE" | "CAMPAIGN_OUT_OF_BUDGET" | "ACCOUNT_OUT_OF_BUDGET" | "AD_GROUP_ARCHIVED" | "AD_GROUP_PAUSED" | "TARGETING_CLAUSE_ARCHIVED" | "TARGETING_CLAUSE_PAUSED" | "TARGETING_CLAUSE_STATUS_LIVE" | "TARGETING_CLAUSE_POLICING_SUSPENDED" }>

  • Retrieves a list of negative keywords satisfying optional criteria.

    Returns

    Parameters

    • Optional params: { count: undefined | number; startIndex: undefined | number } & { adGroupIdFilter: undefined | number[]; campaignIdFilter: undefined | number[]; keywordText: undefined | string; matchTypeFilter: undefined | "negativeExact" | "negativePhrase"; stateFilter: undefined | "paused" | "enabled" | "archived" }

    Returns Promise<{ adGroupId: number; campaignId: number; keywordId: number; keywordText: string; matchType: "negativeExact" | "negativePhrase"; state: "paused" | "enabled" | "archived" }[]>

  • Retrieves a list of negative keywords with extended fields satisfying optional criteria.

    Returns

    Parameters

    • Optional params: { count: undefined | number; startIndex: undefined | number } & { adGroupIdFilter: undefined | number[]; campaignIdFilter: undefined | number[]; keywordText: undefined | string; matchTypeFilter: undefined | "negativeExact" | "negativePhrase"; stateFilter: undefined | "paused" | "enabled" | "archived" }

    Returns Promise<({ adGroupId: number; campaignId: number; keywordId: number; keywordText: string; matchType: "negativeExact" | "negativePhrase"; state: "paused" | "enabled" | "archived" } & { creationDate: Date; lastUpdatedDate: Date; servingStatus: "CAMPAIGN_ARCHIVED" | "CAMPAIGN_PAUSED" | "ADVERTISER_PAYMENT_FAILURE" | "CAMPAIGN_OUT_OF_BUDGET" | "ACCOUNT_OUT_OF_BUDGET" | "AD_GROUP_ARCHIVED" | "AD_GROUP_PAUSED" | "TARGETING_CLAUSE_ARCHIVED" | "TARGETING_CLAUSE_PAUSED" | "TARGETING_CLAUSE_STATUS_LIVE" | "TARGETING_CLAUSE_POLICING_SUSPENDED" })[]>

  • Updates one or more negative keywords. Keywords are identified using their keywordId.

    Returns

    Parameters

    • keywords: { keywordId: number; state: "paused" | "enabled" | "archived" }[]

    Returns Promise<({ code: "NOT_FOUND" | "SUCCESS" | "INVALID_ARGUMENT" } & { description: undefined | string; details: undefined | string; keywordId: undefined | number })[]>