ID Verification
The ID Verification API performs OCR on identity documents (passports and national ID cards) and returns the parsed personal data along with an overall document status. It is a standalone service — it does not require a KYC submission or any customer onboarding state.
Overview
Use this endpoint when you want to verify an identity document on its own — for example, to embed Azakaw's ID parsing capability in your own portal without going through Azakaw's onboarding UI.
For each request the API will:
- Run OCR on the uploaded document image.
- Extract MRZ fields (name, document number, date of birth, expiry date, etc.) when present.
- Return an overall document status indicating whether the document was recognised and parsed successfully.
Authentication
All requests to this API require authentication using a bearer token in the Authorization header:
Authorization: Bearer your-token-here
For details on how to obtain an authentication token, please refer to the Authentication documentation. Tokens issued by AppSessionManager carry a services: External claim that this endpoint requires.
Verify an ID Document
POST {base_url}/ExtIdVerification/Verify
Request
The request must be sent as multipart/form-data.
| Field | Type | Required | Description |
|---|---|---|---|
FileContent | File | Yes | The document image. Supported formats: JPG, PNG, BMP, TIFF, PDF. |
DocumentTypeId | string | Yes | The type of document being verified. See Supported Document Types. Must not be NA. |
Example
curl --location '{base_url}/ExtIdVerification/Verify' \
--header 'Authorization: Bearer your-token-here' \
--form 'FileContent=@"/path/to/passport.jpg"' \
--form 'DocumentTypeId=Passport'
Response
{
"version": null,
"statusCode": 200,
"messages": [
"Processed successfully"
],
"result": {
"mrzType": "ID-3",
"documentType": "Passport",
"documentSubtype": null,
"documentDescription": "Passport",
"documentFormat": 2,
"issuingCountry": "GBR",
"issuingCountryCode": "GBR",
"lastName": "DOE",
"givenName": "JOHN",
"nativeGivenName": "JOHN",
"nativeLastName": "DOE",
"documentNumber": "L898902C3",
"documentNumberVerified": true,
"documentNumberCheck": "6",
"nationality": "GB",
"birthDate": "1990-01-01",
"birthDateVerified": true,
"birthDateCheck": "7",
"sex": "M",
"expiryDate": "2030-01-01",
"expiryDateVerified": true,
"expiryDateCheck": "1",
"personalNumber": null,
"personalNumberVerified": null,
"personalNumberCheck": null,
"checksumVerified": true,
"checksum": "6",
"mrzLine1": "P<GBRDOE<<JOHN<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\nL898902C36GBR9001017M3001011<<<<<<<<<<<<<<06",
"mrzLine2": null,
"mrzLine3": null,
"isVerifyRequestSuccesful": true,
"documentOverallStatus": "Valid"
}
}
In the current implementation, mrzLine1 contains the full MRZ — both lines (for TD3/passports) or all three lines (for TD1/ID cards) — joined by \n. The mrzLine2 and mrzLine3 fields are reserved for future use and return null today.
Response Fields
The result object contains the parsed document data:
| Field | Type | Description |
|---|---|---|
documentOverallStatus | string | Valid or NotValid. Overall verdict on the document. |
isVerifyRequestSuccesful | boolean | true when the document was recognised and validated. |
mrzType | string | MRZ format (e.g. ID-3 for passports, ID-1 for ID cards). |
documentType | string | The document type submitted in the request. |
documentSubtype | string | Refinement of the document type when available. |
documentDescription | string | Human-readable description from the parser. |
documentFormat | int | Vendor-specific numeric format identifier. For the standard MRZ classification (TD1 / TD2 / TD3) use mrzType instead. |
issuingCountry | string | Issuing country/state code as printed in the MRZ (ICAO alpha-3, e.g. GBR). |
issuingCountryCode | string | Raw MRZ issuing country code, including filler characters (<) if any. |
lastName | string | Family name extracted from the document. |
givenName | string | Given name(s) extracted from the document. |
nativeGivenName | string | Given name in the document's native script. |
nativeLastName | string | Family name in the document's native script. |
documentNumber | string | Document/passport number. |
documentNumberVerified | boolean | true when the document number passes its MRZ check digit. |
documentNumberCheck | string | The check digit read from the MRZ. |
nationality | string | Holder's nationality, normalized to ISO 3166-1 alpha-2 (e.g. GB). Note that issuingCountry is alpha-3 — they typically describe the same country in different formats. |
birthDate | string (YYYY-MM-DD) | Date of birth. |
birthDateVerified | boolean | true when the date of birth passes its MRZ check digit. |
birthDateCheck | string | The check digit for the date of birth. |
sex | string | Single character from the MRZ: M (male), F (female), or < (unspecified). Some issuers use X as a variant of <. |
expiryDate | string (YYYY-MM-DD) | Document expiry date. |
expiryDateVerified | boolean | true when the expiry date passes its MRZ check digit. |
expiryDateCheck | string | The check digit for the expiry date. |
personalNumber | string | Optional personal/national number when present in the MRZ. |
personalNumberVerified | boolean | Verification flag for personalNumber. |
personalNumberCheck | string | The check digit for personalNumber. |
checksumVerified | boolean | true when the MRZ final/composite check digit is valid. |
checksum | string | The MRZ final/composite check digit. |
mrzLine1 | string | Full MRZ as printed on the document, lines separated by \n (see note above). |
mrzLine2 | string | Currently null; the full MRZ is in mrzLine1 (see note above). |
mrzLine3 | string | Currently null; the full MRZ is in mrzLine1 (see note above). |
Any field that is not present on the document — or could not be extracted — is returned as null.
Document Status Values
documentOverallStatus can have the following values:
| Status | Description |
|---|---|
Valid | The document was recognised by the parser. |
NotValid | The document was not recognised. Typical causes: image illegible, document type not supported by the parser, the image is a known specimen (sample / demonstration images are flagged this way), or MRZ check digits failed. Inspect the per-field *Verified flags for detail. |
Supported Document Types
Pass one of the following values in DocumentTypeId:
| Value | Description |
|---|---|
Passport | International passport (TD3 / ID-3). |
IdCardFront | Front side of a national ID card. |
IdCardBack | Back side of a national ID card. Only useful when the MRZ is printed on the back of the card (varies by country). |
For best results submit the side of the document that contains the MRZ.
Rate Limit
This endpoint is rate-limited at 5 requests per second. Excess requests return HTTP 429 Too Many Requests.
Error Handling
| Status | Meaning |
|---|---|
200 | Request processed. Inspect result.documentOverallStatus to know whether the document was recognised. |
400 | Validation failure — e.g. FileContent missing or empty, DocumentTypeId missing or set to NA. |
401 | Missing or invalid Bearer token. |
403 | Token does not carry the required services: External claim. |
413 | Uploaded file exceeds the configured size limit. |
429 | Rate limit exceeded. |
500 | Unexpected server error. |
Error responses follow the standard envelope:
{
"version": null,
"statusCode": 400,
"messages": [
"FileContent is empty."
],
"result": null
}
Best Practices
- Image quality. Submit clear, well-lit images with all four corners visible. Avoid glare on the MRZ.
- Format. JPG and PNG produce the best results; PDFs are accepted (first page is processed).
- Idempotency. Each call is independent. If you need to retry, retry the full request — there is no resumable state.
- Status interpretation. Treat
documentOverallStatus = Validtogether withisVerifyRequestSuccesful = trueas a successful verification. AValidstatus alone does not guarantee MRZ check digits passed — check the per-field*Verifiedflags when stricter validation is required.