Books by finzkoDevelopers

Account, whoami & ping

First-call checks and organization discovery: is the API reachable, what does my token resolve to, and which organizations can I address.

GET/pingLiveness probenone

No token needed. Use it to check DNS, TLS and the rate-limit headers before you try anything else. Without a token the call is counted in the anonymous 60-per-minute-per-IP bucket (see Rate limits).

curl "$BASE/ping"

200 OK
{
  "code": 0,
  "message": "success",
  "ping": { "ok": true, "server_time": "2026-05-11T10:00:00.123456", "api_version": "v1" }
}

server_time is UTC but has no Z suffix.

GET/whoamiWhat the server resolved from your tokentoken only (no scope check)

Needs a valid token, but no particular scope. Use it as the first call after you mint a token.

curl -H "Authorization: Bearer $PAT" "$BASE/whoami"

200 OK
{
  "code": 0,
  "message": "success",
  "token": {
    "token_id": "5a9f1c…",
    "org_id": "org_abc",
    "user_id": "usr_xyz",
    "scopes": ["AIBooks.contacts.READ"],
    "tier": "DEFAULT"
  }
}

org_id can be null for a multi-org OAuth token that is not bound to one organization; see the Multi-org guide. tier is DEFAULT or PARTNER. A bad token returns 401 with auth.missing_token, auth.invalid_token, auth.revoked_token or auth.expired_token.

GET/organizationsOrganizations the token can accesstoken only (no scope check)

Lists the organizations the token's user is an active member of, sorted by name, with the user's role in each. For a single-org token it is that one organization; for a multi-org token it is every organization. Pass an organization_id from this list as ?organization_id= on other endpoints.

200 OK
{
  "code": 0,
  "message": "success",
  "organizations": [
    { "organization_id": "org_abc", "name": "Sharma Traders", "role": "OWNER", "is_current": true },
    { "organization_id": "org_def", "name": "Sharma Exports", "role": "ACCOUNTANT", "is_current": false }
  ],
  "page_context": { "per_page": 2, "has_more_page": false }
}

Not paginated. is_current is true for the organization the token is bound to, and false for all of them on a multi-org token.

POST/echoIdempotency replay testtoken only (no scope check)

A diagnostic for checking your retry handling. Each fresh call returns a new random request_id. Send the same Idempotency-Key twice and the second response is the first one replayed: identical request_id, plus an Idempotency-Replay: true header. It changes nothing in your books. The key is optional on this route; without it every call returns a different request_id.

POST /echo
Authorization: Bearer aibk_pat_…
Idempotency-Key: test-1
Content-Type: application/json

{ "note": "hello" }

200 OK
{
  "code": 0,
  "message": "success",
  "echo": { "request_id": "b5c1…", "note": "hello", "token_id": "5a9f1c…" }
}

Body: note (optional string). Unknown fields return 422 validation.failed.