Retrieve a list of all Warehouses
You call thisinventoryinventory:selfinventory:warehouseinventory:warehouse:selflegacyscmui
const url = 'https://api.zentail.com/v1/warehouses';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.zentail.com/v1/warehouses \ --header 'Authorization: Bearer <token>'Returns a list of all Warehouses associated with this account. Warehouse IDs should be used when updating inventory using the API.
If the canUpdateInventory field is false you cannot use that warehouse to update inventory through the API. This is normally caused by warehouses that are managed by other inventory integrations, such as FBA or another third party logistics company.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”Success
object
object
A unique identifier for this warehouse, should be used when updating inventory through the API.
Unique identifier for the warehouse as recognized by the application.
If this is false, you would be unable to modify the inventory in this warehouse using the API. This is usually caused by the warehouse being managed by another service or 3PL.
Examplegenerated
{ "results": [ { "warehouseId": 1, "warehouseUniqueId": "example", "canUpdateInventory": true, "name": "example" } ]}Bad Request
object
Example
{ "errorCode": 400}Permission Denied
object
Example
{ "errorCode": 403}Not Found
object
Example
{ "errorCode": 404}Zentail Error
object
Example
{ "errorCode": 500}Zentail Error
object
Example
{ "errorCode": 503}