ListWarehouses returns the warehouses bound to the caller's integration, and the identifier to use for each.
You call thisinventory:self
const url = 'https://api.zentail.com/v2/inventory/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/v2/inventory/warehouses \ --header 'Authorization: Bearer <token>'This is the discovery call. Every write keys on warehouse_unique_id, which is the caller’s own identifier rather than Zentail’s internal id, so without this a client would have to be told its identifiers out of band and would silently break when they changed. Call it once at startup.
Distinct from IntegrationStatus, which is prose for a human deciding whether the integration is healthy. This is structured data for a machine deciding what to send.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”A successful response.
object
Only warehouses the caller can actually name. A warehouse bound to the integration with no identifier set is omitted, because there is no value a caller could send to address it; IntegrationStatus is where that shows up as a problem to fix.
object
Send this as warehouse_unique_id on an InventoryUpdate. Never empty.
Operator-facing label, for logs and support conversations. Not a key, not stable, and not safe to match on.
Examplegenerated
{ "warehouses": [ { "warehouseUniqueId": "example", "name": "example" } ]}default
Section titled “default”An unexpected error response.
object
object
Examplegenerated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}