Skip to main content

PUT/negative_keyword/{negative_keyword_id}

Note: This method is only available for select partners who have been approved for the eBay priority strategy program. For information about how to request access to this program, refer to Priority Strategy Access Requests in the Promoted Listings Playbook. To determine if a seller qualifies for priority strategy, use the getAdvertisingEligibility method in Account API.
This method updates the status of an existing negative keyword.

Specify the negative_keyword_id as a path parameter, and specify the negativeKeywordStatus in the request body.

Input

Resource URI

PUT https://api.ebay.com/sell/marketing/v1/negative_keyword/{negative_keyword_id}

This method is supported in Sandbox environment. To access the endpoint, just replace the api.ebay.com root URI with api.sandbox.ebay.com

URI parameters

ParameterTypeDescription
negative_keyword_idstringThe unique identifier for the negative keyword.

This value is returned in the Location response header from the createNegativeKeyword method.

Occurrence: Required

HTTP request headers

All requests made to eBay REST operations require you to provide the Authorization HTTP header for authentication authorization.

The table below shows additional HTTP request headers that are either required, conditionally required, or strongly recommended for this method. Other standard HTTP request headers- opens rest request components page (not in this table) can also be used, but they are optional.

HeaderTypeDescription
Content-TypestringThis header indicates the format of the request body provided by the client. Its value should be set to application/json.

For more information, refer to HTTP request headers.

Occurrence: Required

OAuth scope

This request requires an access token created with the authorization code grant flow, using one or more scopes from the following list (please check your Application Keys page for a list of OAuth scopes available to your application):

https://api.ebay.com/oauth/api_scope/sell.marketing

See OAuth access tokens for more information.

Request payload

Copy complete valid JSON to clipboard

Request fields

Input container/fieldTypeDescription
negativeKeywordStatusNegativeKeywordStatusEnum

A field that defines the status of the negative keyword.

Occurrence: Required

Output

HTTP response headers

This call has no response headers.

Response payload

This call has no payload.

Response fields

This call has no field definitions.

HTTP status codes

This call can return one of the following HTTP status codes. For an overview of the status codes, see HTTP status codes in Using eBay RESTful APIs.

StatusMeaning
204Success
400Bad Request
403Forbidden
404Not Found
409Business error
500Internal Server error

Error codes

For more on errors, plus the codes of other common errors, see Handling errors.

CodeDomainCategoryMeaning
35001API_MARKETINGAPPLICATIONThere was a problem with an eBay internal system or process. Contact eBay Developer Technical Support for assistance.
35089API_MARKETINGBUSINESSWe are currently testing a premium ads product with a small invite-only group. We will share more information when we are ready to expand.
36340API_MARKETINGREQUESTNo negative keyword found for negative keyword id {negativeKeywordId}.
36342API_MARKETINGREQUESTNegativeKeywordStatus is missing or invalid. It is required for update.
36343API_MARKETINGREQUESTNegative keyword with negative keyword id {negativeKeywordId} is already archived and cannot be updated.

Warnings

This call has no warnings.

Samples

New to making API calls? Please see Making a Call.

Note: Identifiers, such as order IDs or user IDs, and personal data in these samples might be anonymized or may no longer be active on eBay. If necessary, substitute current, relevant eBay data in your requests.

Sample 1: Update a Negative Keyword

This example updates the status of a negative keyword.

Input

The inputs for this sample are the negative_keyword_id for the negative keyword for which the status shall be updated, as well as the updated negativeKeywordStatus, which is passed in the request body.

PUThttps://api.ebay.com/sell/marketing/v1/negative_keyword/1********5

Output

A successful call returns the HTTP status code 204 No Content. This method has no response payload.

Got thoughts? Click the feedback button – your insights help us improve!