Skip to main content

DELETE/listing/{listingId}/sku/{sku}/locations

This method allows sellers to remove all location mappings associated with a specific SKU within a listing.

The listingId and sku of the listing are passed in as path parameters.

Important! To remove all location mappings from a multiple-variation listing, this method must be used for each individual SKU in the listing.

Input

Resource URI

DELETE https://api.ebay.com/sell/inventory/v1/listing/{listingId}/sku/{sku}/locations

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
listingIdstringThis path parameter specifies the unique identifier of the listing that the SKU belongs to for which all mapped locations will be removed.

Use the getOffers method of the Inventory API or the GetMyEbaySelling method of the Trading API to retrieve all listing IDs for all active listings.

Occurrence: Required

skustringThis path parameter specifies the seller-defined SKU value of the item/variation for which location mappings will be removed. This SKU value must be defined in the listing specified in listingId parameter

Use the getOffers method of the Inventory API or the GetMyEbaySelling method of the Trading API to retrieve all SKUs for all active listings.

Occurrence: Required

HTTP request headers

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

All other standard RESTful request headers are optional. For more information on standard RESTful request headers, see the HTTP request headers- opens rest request components page table.

OAuth scope

This request requires an access token created with the client credentials 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.inventory

See OAuth access tokens for more information.

Request payload

This call has no payload.

Request fields

This call has no field definitions.

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
204No Content
400Bad Request
404Not Found
500Internal Server Error

Error codes

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

CodeDomainCategoryMeaning
25001API_INVENTORYAPPLICATIONAny System error. {additionalInfo}
25002API_INVENTORYREQUESTAny User error. {additionalInfo}
25904API_INVENTORYREQUESTInvalid listing ID or the listing does not belong to the seller.
25905API_INVENTORYREQUESTInvalid SKU value or the SKU value is not defined in the listing.

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: Remove all location mappings from a SKU

This method is used to remove all location mappings from a specified SKU within a listing.

Input

In the path parameter of the URI, specify the SKU for which you want to remove all location mappings using the listingId and sku values associated with the listing.

DELETEhttps://api.ebay.com/sell/inventory/v1/listing/1**********4/sku/g********1/locations

Output

If the call is successful, 204 No content is returned and all location mappings have been successfully removed from the SKU.