Documentation
Error reference
Every non-2xx response from the CardVault Identify API shares one predictable shape. Discriminate on ok — false means something went wrong before we could return a result.
The ApiErrorBody shape
error.typeOne of the six error types below — the stable value to branch your error handling on.
error.codeA finer-grained machine-readable code within that type (e.g. missing_field, invalid_key) — useful for logging, not required for branching.
error.messageHuman-readable detail, safe to log but not guaranteed stable across versions — don't pattern-match on it.
error.paramPresent on invalid_request_error — names the specific request field that failed validation.
Error types
A hard-to-identify card is never an error
An honest miss — needsReview: true, card: null — is a normal 200 OK from /api/v1/identify, not one of the error types on this page. Only request problems, auth failures, and infrastructure faults produce an ApiErrorBody.