Skip to main content

PUT/listing/{listingId}/sku/{sku}/locations

This method allows sellers to map multiple fulfillment center locations to single-SKU listing, or to a single SKU within a multiple-variation listing. This allows eBay to leverage the location metadata associated with a seller’s fulfillment centers to calculate more accurate estimated delivery dates on their listing.

Note: While location mappings can be created for listings on any eBay marketplace, the improved delivery date estimate feature is currently only supported for US-based fulfillment centers shipping domestically within the US.
The listing for which the locations will be mapped is specified through the listingId and sku values associated with the item. Note that only a single SKU value can be identified; if the seller wishes to map locations to multiple/all SKU values in a multiple-variation listing, this method must be called for each of those SKUs within the listing.

Note: Sellers should keep track of listingId/sku pairs that have been used for location mapping, as there is no programmatic way to retrieve or delete these pairs at this time.
In the case of replacing/updating existing location mappings, the this method will do a complete replacement of the location mappings associated with a SKU. This means that each existing location mappings that the seller wants to continue to associate with the SKU are required in the update call, regardless of if they are affected by the update.

This method is only supported for inventory locations that have FULFILLMENT_CENTER as one of their locationTypes. For more information on fulfillment center locations, see Create a fulfillment center location.

For more information on location mapping features, see Multi-warehouse program in the Selling Integration Guide.

Note: Only listings with SKU values are supported. Sellers using listings creating through the Trading API can add a SKU value to their single variation listing through the Item.SKU field during listing creation or by using the ReviseItem family of calls.

Input

Resource URI

PUT 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 for which multiple fulfillment center locations will be mapped to a SKU within that listing.

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 multiple fulfillment center locations will be mapped. 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 listing IDs 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.

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 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

Copy complete valid JSON to clipboard

Request fields

Input container/fieldTypeDescription
locationsarray of LocationAvailabilityDetails

This array represents a collection of fulfillment center locations mapped to a SKU.

Note: Only the first 50 locations mapped to a SKU will be considered when calculating estimated delivery dates. Sellers can set up more than 50 locations using this method, but only the first 50 locations will be considered for calculating the estimates.

Occurrence: Required

locations.merchantLocationKeystring

The unique identifier of a seller’s fulfillment center location where inventory is available for the item or item variation.

Note: When creating a location mapping using the createOrReplaceSkuLocationMapping method, the value entered in this field must be associated with a location with the FULFILLMENT_CENTER location type, or an error will occur. Sellers can check the locationTypes array in the response of the getInventoryLocations method to see if their location has a value of FULFILLMENT_CENTER.

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
204No Content
400Bad Request
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}
25900API_INVENTORYREQUESTOne or more inventory locations could not be found for the seller.
25901API_INVENTORYREQUESTMissing a location. Please specify one or more inventory locations.
25902API_INVENTORYREQUESTOne or more duplicate inventory locations were specified. Unique inventory locations must be used.
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.
25906API_INVENTORYREQUESTThe provided inventory location must be a Fulfillment Center. Please use a Fulfillment Center location or use updateInventoryLocation to change location type to FULFILLMENT_CENTER.

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: Map fulfillment center locations to a SKU

This method is used to map fulfillment center locations to a singe SKU within a listing. This allows listings to have an improved estimated delivery date based on the nearest mapped fulfillment center location.

Input

In the path parameter of the URI, specify the SKU for which you want to map the fulfillment center locations using the listingId and sku value associated with the listing. Then, pass in the merchantLocationKey for each fulfillment center in the locations array of the request body.

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

Output

If the call is successful, HTTP status code 204 No content is returned. This method has no response payload.