Skip to content

Conventions

This page collects the cross-cutting rules every endpoint follows. Skim it once so the rest of the docs feel familiar.

  • Verification endpoints accept and return application/json.
  • POST /login accepts application/x-www-form-urlencoded (OAuth2 password flow). Every other endpoint is JSON.
  • Responses always include a Content-Type: application/json; charset=utf-8 header.
CodeMeaning
200The request succeeded. The body contains a data envelope for verification calls, or a top-level resource for other calls.
400Validation failed — your request body is missing a required field or contains an invalid value. The detail field names the problem.
401Token is missing, expired, or invalid. Re-authenticate.
402Insufficient units. Top up your wallet before retrying.
403Token is valid, but the user lacks permission for this action.
404The referenced resource does not exist. Most common on /verify-nin/requery with an unknown reference_id.
422Pydantic validation error — typically a malformed payload (wrong type, missing field).
429Rate-limited — slow down and retry with backoff.
5xxRandaVerify is having a bad day. Retry with exponential backoff; if it persists, contact support with your reference_id.

The error body shape is consistent:

{ "detail": "Insufficient units in organisation wallet" }

Verification responses use camelCase for NIMC-sourced fields (e.g. dateOfBirth, firstname, residenceAddressLine1) but RandaVerify normalises them to a consistent snake-friendly schema before returning. You always receive:

FieldSource aliases
ninnin, NIN, identityNumber
fnamefirstname, firstName, fname
mnamemiddlename, middleName, mname
lnamesurname, lastName, lname
dobdateOfBirth, birthdate, dob
phonetelephoneno, mobile, phone, phone1
residenceAdressresidence_AdressLine1, address (note original NIMC mis-spelling preserved)
residenceTowntown, city
residenceLgaresidence_lga, lga
residenceStatestate
stateOfOriginself_origin_state, birthState
lgaOfOriginself_origin_lga, birthLga
imagephoto, base64 JPEG

This way you do not need to know which key NIMC happened to use — RandaVerify returns the same shape every time.

Every verification produces a reference_id of the form REF-XXXXXXXXXXXX. Persist it. You can:

  • Look the record up again later with /verify-nin/requery (no unit charged).
  • Quote it to support when reporting an issue.
  • Use it as your idempotency key for retry-safe persistence on your side.
  • Phone numbers are Nigerian 11-digit format beginning with 0 (e.g. 08012345678).
  • Dates of birth are dd-mm-yyyy (e.g. 03-09-1999) on the demography request side. The dob returned in responses uses the same format.

NIMC validates every verification against a fixed list of allowed reasons. Always fetch the current list from GET /nimc-reasons and pass the key (not the human label) in your request:

Terminal window
curl https://api.randaverify.com/nimc-reasons -H "Authorization: Bearer $TOKEN"
{
"data": [
{ "key": "corporate", "label": "Corporate", "description": "..." },
{ "key": "nyscCheck", "label": "NYSC Check", "description": "..." },
{ "key": "telecommunicationSimReg", "label": "Telecom SIM Reg", "description": "..." }
]
}
  • Every successful verification debits one unit from your org wallet.
  • A failed verification does not debit your wallet (you only pay for results).
  • A re-query does not debit your wallet (idempotent retrieval).
  • You can check your current balance via GET /meorganisation (the unit count is available in admin contexts; for the standard officer flow, see your wallet via the portal).