IntegrationStatus returns diagnostic checks for the caller's integration — whether warehouses are bound to it, when stock was last reported, and whether Zentail considers that reading stale.
You call thisinventory:self
const url = 'https://api.zentail.com/v2/inventory/status';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/status \ --header 'Authorization: Bearer <token>'If the integration implements WarehouseService, Zentail also asks it about each warehouse and folds those checks in, so one call answers “is this working” from both sides.
An inventory integration fails quietly: nothing errors when a poll loop stops, the numbers simply age. This is how that surfaces.
Authorizations
Section titled “Authorizations”Responses
Section titled “ Responses ”A successful response.
object
Zentail’s own observations and the integration’s last reported checks, in
one list. Read source to tell them apart; render them together, because
an operator asking “is this working” does not care who noticed.
object
Stable identifier, not prose — an operator or an alert matches on this, so it must not change when the wording does. Lower_snake_case by convention.
- CHECK_STATE_UNSPECIFIED: Zentail never sends this. Treat it as a check you cannot interpret rather than as a pass.
- CHECK_STATE_PASS: Healthy, nothing to do.
- CHECK_STATE_WARN: Working, but heading somewhere bad — stock arriving later than expected, a credential close to expiring. Worth looking at before it becomes a FAIL.
- CHECK_STATE_FAIL: Broken now. The quantities this check covers should not be trusted until it clears.
Prose for a human. Say what is wrong and what would fix it.
- CHECK_SOURCE_UNSPECIFIED: Not set. Zentail fills this in on every check it returns, so this value only appears on a check an integration sent and Zentail has not folded in.
- CHECK_SOURCE_ZENTAIL: Zentail observed this from the outside.
- CHECK_SOURCE_INTEGRATION: The integration reported this about itself.
Which warehouse this check is about, when it is about one. Set by Zentail as it folds a WarehouseStatus response in, and on a check reporting that a warehouse could not be reached.
Without it the fold is lossy: two warehouses returning the same check name are indistinguishable, and anything matching on name alone cannot say which one is broken. Empty on checks about the integration as a whole.
Example
{ "checks": [ { "state": "CHECK_STATE_UNSPECIFIED", "source": "CHECK_SOURCE_UNSPECIFIED" } ]}default
Section titled “default”An unexpected error response.
object
object
Examplegenerated
{ "code": 1, "message": "example", "details": [ { "@type": "example" } ]}