POST/location/{merchantLocationKey}/update_location_details
Use this call to update 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, timeZoneId, geoCoordinates, fulfillmentCenterSpecifications, locationTypes, locationWebUrl, locationInstructions and locationAdditionalInformation any number of times for any location type.
For warehouse and store inventory locations, address fields can be updated any number of times. Address fields cannot be updated for fulfillment center locations. However, if any address fields were omitted during the createInventoryLocation call, they can be added through this method.
Note: When updating a warehouse location to a fulfillment center, sellers can update any of the address fields a single time during the same call used to make this update. After this, they can no longer be updated.For store locations, the operating hours and/or the special hours can also be updated.
Whatever text is passed in for these fields in an updateInventoryLocation call will replace the current text strings defined for these fields.
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
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
Parameter | Type | Description |
---|---|---|
merchantLocationKey | string | This path parameter specifies the unique merchant-defined key (ID) for an inventory location that is to be updated. Use the getInventoryLocations method to retrieve merchant location keys. 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.
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.
Header | Type | Description |
---|---|---|
Content-Type | string | This 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.inventory
See OAuth access tokens for more information.
Request payload
Copy complete valid JSON to clipboardRequest fields
Input container/field | Type | Description |
---|---|---|
location | LocationDetails | This container is used to add any addition physical address and geographical coordinate information for a warehouse, store, or fulfillment center inventory location. Occurrence: Optional |
location.address | Address | This required container sets the physical address of an inventory location. Except in the case store or fulfillment center location, a full address is not a requirement when setting up a location. For warehouse locations, the fields required in this container are either of the following sets:
Occurrence: Required |
location.address.addressLine1 | string | The first line of a street address. This field is required for store and fulfillment center locations. A street address is not required for warehouse locations. Occurrence: Conditional |
location.address.addressLine2 | string | The second line of a street address. This field can be used for additional address information, such as a suite or apartment number. Occurrence: Conditional |
location.address.city | string | The city in which the inventory location resides. This field is required for store and fulfillment center locations. For warehouse locations, this field is conditionally required as part of a city and stateOrProvince pair if a postalCode is not provided. If a postalCode is provided, the city is derived from the provided postal code and this field is technically optional. Occurrence: Conditional |
location.address.country | CountryCodeEnum | The country in which the address resides, represented as two-letter ISO 3166 country code. For example, Occurrence: Required |
location.address.county | string | The county in which the address resides. Occurrence: Optional |
location.address.postalCode | string | The postal/zip code of the address. eBay uses postal codes to surface In-Store Pickup items within the vicinity of a buyer's location, and it also uses postal codes (origin and destination) to estimate shipping costs when the seller uses calculated shipping. This field is required for store and fulfillment center locations. Occurrence: Conditional |
location.address.stateOrProvince | string | The state/province in which the inventory location resides. This field is required for store and fulfillment center locations. For warehouse locations, this field is conditionally required as part of a city and stateOrProvince pair if a postalCode is not provided. If a postalCode is provided, the state or province is derived from the provided zip code and this field is technically optional. Occurrence: Conditional |
location.geoCoordinates | GeoCoordinates | This container is used to set the Global Positioning System (GPS) latitude and longitude coordinates for the inventory location. Occurrence: Conditional |
location.geoCoordinates.latitude | number | The latitude (North-South) component of the geographic coordinate. This field is required if a geoCoordinates container is used. Occurrence: Conditional |
location.geoCoordinates.longitude | number | The longitude (East-West) component of the geographic coordinate. This field is required if a geoCoordinates container is used. Occurrence: Conditional |
locationAdditionalInformation | string | This 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. Occurrence: Conditional |
locationInstructions | string | This 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. Occurrence: Conditional |
locationTypes | array of StoreTypeEnum | This container is used to update the location type(s) associated with an inventory location. Occurrence: Optional |
locationWebUrl | string | This 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. Occurrence: Conditional |
name | string | This 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 locations. For store 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: Optional |
operatingHours | array of OperatingHours | This 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 location is open. Note that if operating hours are already set for a location for a specific day of the week, whatever is set through an updateInventoryLocation call will override those existing hours. Occurrence: Conditional |
operatingHours.dayOfWeekEnum | DayOfWeekEnum | A dayOfWeekEnum value is required for each day of the week that the store location has regular operating hours. Occurrence: Conditional |
operatingHours.intervals | array of Interval | This container is used to define the opening and closing times of a store location'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 Occurrence: Conditional |
operatingHours.intervals.close | string | The close value is actually the time that the store location 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: Occurrence: Conditional |
operatingHours.intervals.open | string | The 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: Occurrence: Conditional |
phone | string | This 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. Occurrence: Optional |
specialHours | array of SpecialHours | This 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.date | string | A date value is required for each specific date that the store location has special operating hours. Occurrence: Conditional |
specialHours.intervals | array of Interval | This container is used to define the opening and closing times of a store location 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. Occurrence: Conditional |
specialHours.intervals.close | string | The close value is actually the time that the store location 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: Occurrence: Conditional |
specialHours.intervals.open | string | The 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: Occurrence: Conditional |
timeZoneId | string | This field is used to provide/update the time zone of the inventory location being created. This value should be in Olson format (for example Occurrence: Optional |
fulfillmentCenterSpecifications | FulfillmentCenterSpecifications | This container is used to update information about a fulfillment center's shipping specifications, such as the weekly cut-off time schedule for order handling and any cut-off overrides. Occurrence: Optional |
fulfillmentCenterSpecifications.sameDayShippingCutOffTimes | SameDayShippingCutOffTimes | Note: This container only applies to listings with same-day handling. Occurrence: Conditional |
fulfillmentCenterSpecifications.sameDayShippingCutOffTimes.overrides | array of Overrides | This container can be used to override the existing cut-off time(s), specified in the weeklySchedule container, for a specific date or date range. Occurrence: Optional |
fulfillmentCenterSpecifications.sameDayShippingCutOffTimes.overrides.cutOffTime | string | This field is used to override the cut-off time(s) specified in the weeklySchedule container. If an order is placed after this time in the specified date or date range, it will be handled by the seller on the following day. Occurrence: Conditional |
fulfillmentCenterSpecifications.sameDayShippingCutOffTimes.overrides.endDate | string | The end date of the cut-off time override in ISO 8601 format, which is based on the 24-hour Coordinated Universal Time (UTC) clock. Occurrence: Conditional |
fulfillmentCenterSpecifications.sameDayShippingCutOffTimes.overrides.startDate | string | The start date of the cut-off time override in ISO 8601 format, which is based on the 24-hour Coordinated Universal Time (UTC) clock. Occurrence: Conditional |
fulfillmentCenterSpecifications.sameDayShippingCutOffTimes.weeklySchedule | array of WeeklySchedule | This container is used to specify the weekly schedule for shipping and handling cut-off times. A cut-off time is required for each business day that the fulfillment center operates. Any orders made after the specified cutOffTime on the specified day(s) of the week will be handled on the next day. Occurrence: Conditional |
fulfillmentCenterSpecifications.sameDayShippingCutOffTimes.weeklySchedule.cutOffTime | string | This field specifies the cut-off times (in 24-hour format) for the business day(s) specified in the dayOfWeekEnum array. Occurrence: Conditional |
fulfillmentCenterSpecifications.sameDayShippingCutOffTimes.weeklySchedule.dayOfWeekEnum | array of DayOfWeekEnum | This comma-separated array defines the days of week for which the specified cutOffTime is used. Occurrence: Conditional |
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.
Status | Meaning |
---|---|
204 | Success |
400 | Bad Request |
404 | Not Found |
500 | Internal Server Error |
Error codes
For more on errors, plus the codes of other common errors, see Handling errors.
Code | Domain | Category | Meaning |
---|---|---|---|
25001 | API_INVENTORY | APPLICATION | System error. {additionalInfo} |
25800 | API_INVENTORY | REQUEST | Invalid {fieldName}. |
25801 | API_INVENTORY | REQUEST | Missing field {fieldName}. |
25802 | API_INVENTORY | REQUEST | Input error. {additionalInfo} |
25803 | API_INVENTORY | REQUEST | {fieldName} already exists. |
25804 | API_INVENTORY | REQUEST | Input error. {additionalInfo} |
25805 | API_INVENTORY | REQUEST | {fieldName} Not Found. |
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 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.
POSThttps://api.ebay.com/sell/inventory/v1/location/W********h/update_location_details
Output
A successful call returns the HTTP status code 204 No content. This method has no response payload.