GET/location
This call retrieves all defined details for every inventory location associated with the seller's account. There are no required parameters for this call and no request payload. However, there are two optional query parameters, limit and offset. The limit query parameter sets the maximum number of locations returned on one page of data, and the offset query parameter specifies the page of data to return. These query parameters are discussed more in the URI parameters table below.
The authorization
HTTP header is the only required request header for this call.
A successful call will return an HTTP status value of 200 OK.
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 |
---|---|---|
offset | integer | Specifies the number of locations to skip in the result set before returning the first location in the paginated response. Combine offset with the limit query parameter to control the items returned in the response. For example, if you supply an offset of Default: 0 Occurrence: Optional |
limit | integer | The value passed in this query parameter sets the maximum number of records to return per page of data. Although this field is a string, the value passed in this field should be a positive integer value. If this query parameter is not set, up to 100 records will be returned on each page of results. Min: 1 Occurrence: Optional |
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 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.readonly
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
Response fields
Output container/field | Type | Description |
---|---|---|
href | string | The URI of the current page of results from the result set. Occurrence: Conditional |
limit | integer | The number of items returned on a single page from the result set. Occurrence: Conditional |
next | string | The URI for the following page of results. This value is returned only if there is an additional page of results to display from the result set. Occurrence: Conditional |
offset | integer | The number of results skipped in the result set before listing the first returned result. This value is set in the request with the offset query parameter. Note: The items in a paginated result set use a zero-based list where the first item in the list has an offset of Occurrence: Conditional |
prev | string | The URI for the preceding page of results. This value is returned only if there is a previous page of results to display from the result set. Occurrence: Conditional |
total | integer | The total number of items retrieved in the result set. Occurrence: Conditional |
locations | array of InventoryLocationResponse | An array of one or more of the merchant's inventory locations. Occurrence: Conditional |
locations.location | Location | This container provides location details of an inventory location. The address container will always be returned, but it will not always have a complete street address. Except in the case of a store or fulfillment center location, a full address is not a requirement when setting up an inventory location. The geoCoordinates container will only be returned if the merchant provided geographical coordinates. The locationId field is always returned, but this value is only used internally by eBay. Occurrence: Always |
locations.location.address | Address | The address container is always returned in getInventoryLocation/getInventoryLocations calls. Except in the case of a store or fulfillment center location, a full address is not a requirement when setting up an inventory location. Occurrence: Always |
locations.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 |
locations.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 |
locations.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 |
locations.location.address.country | CountryCodeEnum | The country in which the address resides, represented as two-letter ISO 3166 country code. For example, Occurrence: Always |
locations.location.address.county | string | The county in which the address resides. Occurrence: Conditional |
locations.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 |
locations.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: Always |
locations.location.geoCoordinates | GeoCoordinates | This container displays the Global Positioning System (GPS) latitude and longitude coordinates for the inventory location. Occurrence: Conditional |
locations.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 |
locations.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 |
locations.location.locationId | string | A unique eBay-assigned ID for the location. Occurrence: Always |
locations.locationAdditionalInformation | string | This text field provides additional information about an inventory location. This field is returned if it is set for the location. Occurrence: Conditional |
locations.locationInstructions | string | This text field is used by the merchant to provide special pickup instructions for the store location. This field can help create a pleasant and easy pickup experience for In-Store Pickup and Click and Collect orders. If this field was not set up through a createInventoryLocation or a updateInventoryLocation call, eBay will use the default pickup instructions contained in the merchant's profile. Occurrence: Conditional |
locations.locationTypes | array of StoreTypeEnum | This container defines the function of the inventory location. Typically, a location will serve as a store, warehouse, or fulfillment center, but in some cases, an inventory location may be more than one type. Occurrence: Always |
locations.locationWebUrl | string | This text field shows the Website address (URL) associated with the inventory location. This field is returned if defined for the location. Occurrence: Conditional |
locations.merchantLocationKey | string | The unique identifier of the inventory location. This identifier is set up by the merchant when the location is first created with the createInventoryLocation call. Occurrence: Always |
locations.merchantLocationStatus | StatusEnum | This field indicates whether the inventory location is enabled (inventory can be loaded to location) or disabled (inventory can not be loaded to location). The merchant can use the enableInventoryLocation call to enable a location in disabled status, or the disableInventoryLocation call to disable a location in enabled status. Occurrence: Always |
locations.name | string | The name of the inventory location. This name should be a human-friendly name as it will be displayed in In-Store Pickup and Click and Collect listings. For store inventory locations, this field is not required for the createInventoryLocation call, but a store inventory location must have a defined name value before an In-Store Pickup and Click and Collect enabled offer is published. So, if the seller omits this field in the createInventoryLocation call, it will have to be added later through a updateInventoryLocation call. Occurrence: Conditional |
locations.operatingHours | array of OperatingHours | This container shows the regular operating hours for a store location during the days of the week. A dayOfWeekEnum field and an intervals container is shown for each day of the week that the location is open. Occurrence: Conditional |
locations.operatingHours.dayOfWeekEnum | DayOfWeekEnum | A dayOfWeekEnum value is required for each day of the week that the store location has regular operating hours. Occurrence: Conditional |
locations.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 |
locations.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 |
locations.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 |
locations.phone | string | The phone number for an inventory location. This field will typically only be returned for store locations. Occurrence: Always |
locations.specialHours | array of SpecialHours | This container shows the special operating hours for a store or fulfillment center location on a specific date or dates. Occurrence: Conditional |
locations.specialHours.date | string | A date value is required for each specific date that the store location has special operating hours. Occurrence: Conditional |
locations.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 |
locations.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 |
locations.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 |
locations.timeZoneId | string | This field specifies the time zone of the inventory location being created. This value should be in Olson format (for example Occurrence: Conditional |
locations.fulfillmentCenterSpecifications | FulfillmentCenterSpecifications | This container provides information about a fulfillment center's shipping specifications, such as the weekly cut-off time schedule for order handling and any cut-off time overrides. Occurrence: Conditional |
locations.fulfillmentCenterSpecifications.sameDayShippingCutOffTimes | SameDayShippingCutOffTimes | Note: This container only applies to listings with same-day handling. Occurrence: Conditional |
locations.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: Conditional |
locations.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 |
locations.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 |
locations.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 |
locations.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 |
locations.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 |
locations.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 |
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 |
---|---|
200 | Success |
400 | Bad Request |
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} |
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: Get all Fulfillment Policies
Sellers can create one or more inventory locations. This call returns all the locations that have been set up by the seller.
Input
This call does not use a request payload.
GEThttps://api.ebay.com/sell/inventory/v1/location
Output
If the call is successful, eBay returns an HTTP status code of 200 OK and a list of the seller locations.