API reference / Admin

get/v1/admin/stats

Queue and revenue totals

Operation
adminStats
Authentication
API key

Counts by status, and captured versus merely authorised. The authorised figure is the one to watch: it is money held on a customer’s card while we wait on a government.

Request

Responses

200Totals.
systemsobject
by_statusobjectrequired

How many applications sit in each status. A record rather than a list, and sparse: a status nobody is in is absent rather than zero. Read a missing key as zero.

payment_recovery_countintegerrequired

Latest unpaid payment attempts at least 30 minutes old; used for the checkout recovery work badge.

awaiting_reviewobject[]required

Paid applications we have not finished reviewing, oldest hold first, capped at eight. The counts elsewhere say how much is held and how many applications that is. This says **who** — money held on our clock, a customer waiting, and the only queue here with nobody else in it. `under_review` is included because an application somebody opened and did not finish is more stuck than one nobody has touched.

pipelineobjectrequired

The two queues behind the scenes, each with a depth **and an age**. Depth alone cannot answer "is the worker alive": a queue reads `queued: 1` whether the sweep is mid-run or the process has not started for a week, and those want opposite responses. The age is the half that tells them apart.

moneyAdminMoneyrequired
billingobjectrequired

Reported rather than hardcoded in the dashboard, so the banner cannot lie.

undelivered_notificationsobjectrequired

Messages we owe that did not land. `failed` retries itself; `abandoned` and `skipped` never will, which is why they are counted apart rather than summed.

ageing_authorisationsAdminAgeingAuthorisation[]required

The five authorisations held longest, oldest first. A total says how much is exposed; this says what to act on next, which is why it carries the reference.

expiringobjectrequired

How many authorisations are inside the monitor’s warning window. Counted here rather than derived by the dashboard, so it cannot disagree with the alerts.

400The request body or query failed validation.
errorobjectrequired
401No key, an unknown key, a revoked key, or a key whose tenant is not active. All four return an identical body on purpose: distinguishing them would let a caller discover which partners we have.
errorobjectrequired
403`projects:write` is required. No partner key is ever issued this scope.
errorobjectrequired
404Not found, or not yours. A resource belonging to another tenant answers 404 rather than 403, because 403 would confirm the record exists.
errorobjectrequired

Example

curl
curl -X GET https://api.haavisa.com/v1/admin/stats \
  -H "Authorization: Bearer $HAAVISA_API_KEY"

More in Admin

Something unclear? The eligibility guide explains the model behind the answers; the errors guide covers the envelope.