Managing Inventory Locations
Offers published with the Inventory API become active eBay listings, and each offer must be associated with an inventory location.
Creating Inventory Locations
The Create Inventory Location 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 Create Inventory Location 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 and warehouse locations. Store and warehouse locations are typically only applicable for In-Store Pickup and Click and Collect inventory, but these 'local pickup' options are not available with the initial release of the Inventory API.
The following fields in the Create Inventory Location 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 a specific date.
Updating an Inventory Location
Once an inventory location is established, you can update that inventory location with the Update inventory Location call. In this call, the inventory location is identified with its merchantLocationKey value, that is passed in as part of the call URI. The Update inventory Location 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 Update inventory Location 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 Get Inventory Location 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 Get Inventory Locations 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 Create Inventory Location call is to enabled 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 Create Inventory Location call, and set its value to
DISABLED. And to enabled a disabled inventory location, the seller will just use the Enable Inventory Location call. Similarly, if a seller wants to disable an enabled inventory location, the Disable Inventory Location call can be used.
Deleting an Inventory Location
To delete an inventory location, the seller uses the Delete Inventory Location 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.