Offers published with the Inventory API become live eBay listings, and each offer must be associated with an inventory location.
Creating inventory locations
The createInventoryLocation call is used to create an inventory location. The unique identifier of the inventory location, referred to as a merchantLocationKey in the Inventory API calls, is passed in as part of the call URI for the createInventoryLocation call. A merchantLocationKey value cannot be changed once it is set, and its length cannot exceed 50 characters. In addition to the merchantLocationKey value that is passed in to the call URI, the required data for an inventory location includes the following:
- name: the name of the inventory location is passed into the name field.
- physical location: the physical location of the inventory location. At a minimum, the city, state, postal code, and country should be specified. A full address (with street name and number) is required for store locations. Store locations are typically only applicable for In-Store Pickup and Click and Collect inventory. A "warehouse" location is not necessarily an actual warehouse, but any location that has inventory.
The following fields in the createInventoryLocation call are only applicable to store locations:
- locationInstructions: these instructions are only applicable for In-Store and Click and Collect orders, and will assist buyers with an easy pickup experience.
- locationWebUrl: the URL for the store's website.
- phone: the phone number for the store.
- operatingHours: the daily business hours for the store.
- specialHours: the special business hours for the store on specific dates.
Updating an inventory location
Once an inventory location is established, you can update that inventory location with the updateInventoryLocation call. In this call, the inventory location is identified with its merchantLocationKey value, that is passed in as part of the call URI. The updateInventoryLocation call cannot be used to modify the merchantLocationkey value, its physical address, or its geographical coordinates. However, the following information can be updated: name, phone, operating and special hours, store website address, location pickup instructions, and additional information about the location. Note that any operating or special hours that are specified with an updateInventoryLocation call may overwrite the hours that are currently defined for the inventory location.
Retrieving inventory locations
A specific inventory location can be retrieved by using the getInventoryLocation call. The inventory location to retrieve is identified with its merchantLocationKey value, and this value is passed in as part of the call URI. A successful call will retrieve all of the defined details for that inventory location.
If a seller wants to retrieve all inventory locations defined for their account, the getInventoryLocations call. To limit the number of inventory location records that are retrieved on one page of data, and/or to control which page of data is retrieved, the seller will use the limit and offset query parameters. A successful call will retrieve all inventory locations defined for the seller's account.
Enabling and disabling inventory locations
Although the default behavior for a createInventoryLocation call is to enable that inventory location, it is possible to create an inventory location but start it out in the disabled mode. To do this, the seller will include the merchantLocationStatus field in the createInventoryLocation call, and set its value to DISABLED
. And to enable a disabled inventory location, the seller will just use the enableInventoryLocation call. Similarly, if a seller wants to disable an enabled inventory location, the disableInventoryLocation call can be used.
Deleting an inventory location
To delete an inventory location, the seller uses the deleteInventoryLocation call. The inventory location to delete is identified through its merchantLocationKey value, and this value is passed in as part of the call URI. Once an inventory location is deleted, it cannot be restored.