inventory APIv1.6.0

updateInventoryLocation

POST
/location/{merchantLocationKey}/update_location_details

Use this call to update non-physical location details for an existing inventory location. Specify the inventory location you want to update using the merchantLocationKey path parameter.

You can update the following text-based fields: name, phone, locationWebUrl, locationInstructions and locationAdditionalInformation. Whatever text is passed in for these fields in an updateInventoryLocation call will replace the current text strings defined for these fields. For store inventory locations, the operating hours and/or the special hours can also be updated.

The merchant location key, the physical location of the store, and its geo-location coordinates can not be updated with an updateInventoryLocation call

In addition to the authorization header, which is required for all eBay REST API calls, the following table includes another request header that is mandatory for the updateInventoryLocation call, and two other request headers that are optional:


Header Description Required? Applicable Values
Accept Describes the response encoding, as required by the caller. Currently, the interfaces require payloads formatted in JSON, and JSON is the default. No application/json
Content-Language Use this header to control the language that is used for any returned errors or warnings in the call response. No en-US
Content-Type The MIME type of the body of the request. Must be JSON. Yes application/json

Unless one or more errors and/or warnings occurs with the call, there is no response payload for this call. A successful call will return an HTTP status value of 204 No Content.

Input

Resource URI (production)

POST https://api.ebay.com/sell/inventory/v1/location/{merchantLocationKey}/update_location_details

URI parameters

ParameterTypeDescription
merchantLocationKeystringA unique merchant-defined key (ID) for an inventory location. This value is passed in the call URI to indicate the inventory location to be updated.

Max length: 36

Occurrence: Required

HTTP request headers

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

OAuth scope

This request requires an access token created with the authorization code grant flow, using one scope from the following list:

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

eBayUser

See OAuth access tokens for more information.

Input container/fieldTypeDescription
locationAdditionalInformationstringThis text field is used by the merchant to provide/update additional information about an inventory location. Whatever text is passed in this field will replace the current text string defined for this field. If the text will not change, the same text should be passed in once again.

Max length: 256

Occurrence: Conditional

locationInstructionsstringThis text field is generally used by the merchant to provide/update special pickup instructions for a store inventory location. Although this field is optional, it is recommended that merchants provide this field to create a pleasant and easy pickup experience for In-Store Pickup and Click and Collect orders. If this field is not included in the call request payload, eBay will use the default pickup instructions contained in the merchant's profile (if available). Whatever text is passed in this field will replace the current text string defined for this field. If the text will not change, the same text should be passed in once again.

Max length: 1000

Occurrence: Conditional

locationWebUrlstringThis text field is used by the merchant to provide/update the Website address (URL) associated with the inventory location. The URL that is passed in this field will replace any other URL that may be defined for this field.

Max length: 512

Occurrence: Conditional

namestringThis text field is used by the merchant to update the name of the inventory location. This name should be a human-friendly name as it will be in In-Store Pickup and Click and Collect listings. A name is not required for warehouse inventory locations. For store inventory locations, this field is not immediately required, but will be required before an offer enabled with the In-Store Pickup or Click and Collect capability can be published. So, if the seller omitted this field in the createInventoryLocation call, it is required for an updateInventoryLocation call. The name that is passed in this field will replace any other name that may be defined for this field.

Occurrence: Conditional

operatingHoursarray of OperatingHoursThis container is used to provide/update the regular operating hours for a store location during the days of the week. A dayOfWeekEnum field and an intervals container will be needed for each day of the week that the store location is open. Note that if operating hours are already set for an inventory location for a specific day of the week, whatever is set through an updateInventoryLocation call will override those existing hours.

Occurrence: Conditional

operatingHours.dayOfWeekEnumDayOfWeekEnumA dayOfWeekEnum value is required for each day of the week that the store location has regular operating hours.

This field is returned if operating hours are defined for the store location.

Occurrence: Required

operatingHours.intervalsarray of IntervalThis container is used to define the opening and closing times of a store's working day (defined in the dayOfWeekEnum field). An intervals container is needed for each day of the week that the store location is open. If a store location closes for lunch (or any other period during the day) and then reopens, multiple open and close pairs are needed

This container is returned if operating hours are defined for the store location.

Occurrence: Required

operatingHours.intervals.closestringThe close value is actually the time that the store closes. Local time (in Military format) is used. So, if a store closed at 8 PM local time, the close time would look like the following: 20:00:00. This field is conditionally required if the intervals container is used to specify working hours or special hours for a store.

This field is returned if set for the store location.

Occurrence: Required

operatingHours.intervals.openstringThe open value is actually the time that the store opens. Local time (in Military format) is used. So, if a store opens at 9 AM local time, the close time would look like the following: 09:00:00. This field is conditionally required if the intervals container is used to specify working hours or special hours for a store.

This field is returned if set for the store location.

Occurrence: Required

phonestringThis text field is used by the merchant to provide/update the phone number for the inventory location. The phone number that is passed in this field will replace any other phone number that may be defined for this field.

Max length: 36

Occurrence: Conditional

specialHoursarray of SpecialHoursThis container is used to provide/update the special operating hours for a store location on a specific date, such as a holiday. The special hours specified for the specific date will override the normal operating hours for that particular day of the week. If special hours have already been set up for an inventory location, specifying special hours through an updateInventoryLocation call will only add to the list, unless the date(s) used are the same special date(s) already set up, in which case, the special hours set up through the updateInventoryLocation call will override the existing special hours.

Occurrence: Conditional

specialHours.datestringA date value is required for each specific date that the store location has special operating hours. The date is actually expressed as a time stamp specified in ISO 8601 format, which uses the 24-hour Coordinated Universal Time (UTC) clock. The following examples show (1) the format of the time-stamp, and (2) an example time value in ISO 8601 format:

Format: yyyy-MM-ddThh:mm:ssZ
Example: 2016-10-19T00:09:00Z

This field is returned if set for the store location.

Occurrence: Conditional

specialHours.intervalsarray of IntervalThis container is used to define the opening and closing times of a store on a specific date (defined in the date field). An intervals container is needed for each specific date that the store has special operating hours. These special operating hours on the specific date override the normal operating hours for the specific day of the week. If a store location closes for lunch (or any other period during the day) and then reopens, multiple open and close pairs are needed.

This container is returned if set for the store location.

Occurrence: Required

specialHours.intervals.closestringThe close value is actually the time that the store closes. Local time (in Military format) is used. So, if a store closed at 8 PM local time, the close time would look like the following: 20:00:00. This field is conditionally required if the intervals container is used to specify working hours or special hours for a store.

This field is returned if set for the store location.

Occurrence: Required

specialHours.intervals.openstringThe open value is actually the time that the store opens. Local time (in Military format) is used. So, if a store opens at 9 AM local time, the close time would look like the following: 09:00:00. This field is conditionally required if the intervals container is used to specify working hours or special hours for a store.

This field is returned if set for the store location.

Occurrence: Required

Output

HTTP response headers

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
404Not Found
500Internal Server Error

Error codes

CodeDomainCategoryMeaning
25001API_INVENTORYAPPLICATIONSystem error. {additionalInfo}
25800API_INVENTORYREQUESTInvalid {fieldName}.
25801API_INVENTORYREQUESTMissing field {fieldName}.
25802API_INVENTORYREQUESTInput error. {additionalInfo}
25804API_INVENTORYREQUESTInput error. {additionalInfo}
25805API_INVENTORYREQUEST{fieldName} Not Found.

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 an Inventory Location

This example updates an existing inventory location.

Input

Specify the inventory location you want to update using the merchanteLocationKey path parameter. Supply an entirely new location object in your request because this call overwrites the existing location details. Call getInventoryLocation to reetrieve the complete details of the current location.
POST
https://api.ebay.com/sell/inventory/v1/location/warehouse-1/update_location_details

Output

If the call is successful, eBay returns an HTTP status code of 204 No Content, with an empty payload.