Whether the card rail can be reached, and what is queued for it
const url = 'https://api.aerandil.com/v1/payments/rail/health';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.aerandil.com/v1/payments/rail/health \ --header 'Authorization: Bearer <token>'The card rail’s reading — asks the processor nothing: rail is up (the last request was answered), down (it was not, since down_since: a transport failure, a 5xx or a 429 — failure says which kind, as this kernel last heard it) or unknown (nothing asked yet). Since 2026-10-21 rail, down_since, since and seen_by are every replica’s shared reading — each kernel publishes the transitions it hears — so two replicas answer the same banner; last_success_at, last_failure_at and failure stay this kernel’s own. A 401 (the platform’s key refused) moves the reading neither up nor down. With the open queue at the house (property_id, else the desk’s own house, else the tenant): the instructions still to be taken when the rail is back (queued, by kind, the oldest’s time) and those given up on in the last week (abandoned). Counts are cached for a few seconds. 501 unless AERANDIL_STRIPE_ENABLED=1.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The house whose queue is counted.
Responses
Section titled “Responses”The rail’s health and the open queue.
object
object
Example
{ "failure": "unreachable", "rail": "up"}Headers
Section titled “Headers”Always no-store. Object and link state is live data and is never cacheable.
The bearer authenticated but does not hold the scope this operation requires.
Structured error wrapper. Every non-2xx response from any Aerandil endpoint serialises to this shape; the HTTP status carries the failure class (4xx/5xx), the body adds a stable code for programmatic dispatch plus a human-readable message.
object
object
Stable, programmatic error code (e.g. unauthorized, forbidden, not_found, invalid_body, invalid_url, precondition_failed, no_secondary_key). Clients dispatch on code, not on the message (which may be localised or contextualised in future versions).
Request-id correlation handle echoed on the request-id response header — support teams correlate without scraping logs.
Human-readable explanation of the failure.
Per-error structured detail. The shape varies by code (e.g. forbidden_action carries {"action": "..."}; precondition_failed carries {"current_version": N}).
Examplegenerated
{ "error": { "code": "example", "instance_id": "example", "message": "example", "parameters": "example" }}No card rail is configured on this deployment.
Structured error wrapper. Every non-2xx response from any Aerandil endpoint serialises to this shape; the HTTP status carries the failure class (4xx/5xx), the body adds a stable code for programmatic dispatch plus a human-readable message.
object
object
Stable, programmatic error code (e.g. unauthorized, forbidden, not_found, invalid_body, invalid_url, precondition_failed, no_secondary_key). Clients dispatch on code, not on the message (which may be localised or contextualised in future versions).
Request-id correlation handle echoed on the request-id response header — support teams correlate without scraping logs.
Human-readable explanation of the failure.
Per-error structured detail. The shape varies by code (e.g. forbidden_action carries {"action": "..."}; precondition_failed carries {"current_version": N}).
Examplegenerated
{ "error": { "code": "example", "instance_id": "example", "message": "example", "parameters": "example" }}