Identra API Documentation
Overview
The Identra API allows you to verify identity documents, such as passports and driver’s licenses, by submitting them for analysis. This guide details the usage of the /api/validate endpoint.
Endpoint
POST /api/validate
This endpoint processes identity documents submitted as multipart form data. It returns the verification results, including information extracted from the document and the verification status.
Request
Headers:
Content-Type: multipart/form-dataX-Api-Key: <Insert API Key>
Body:
file(required): The identity document to be validated. This should be uploaded as a file in the request body.
Example Request:
curl -X POST https://api.identra.com/api/validate \
-H "X-Api-Key=example-key"
-F "file=@path_to_your_file.jpg"Response
The API returns a JSON object containing the following fields:
| Field | Type | Description |
|---|---|---|
id_number | string | The ID number extracted from the document. |
birth_date | string | The date of birth of the individual (format: YYYY/MM/DD). |
issuance_date | string | The date the document was issued (format: YYYY/MM/DD). |
expiry_date | string | The expiration date of the document (format: YYYY/MM/DD). |
birth_place | string | The place of birth of the individual. |
country | string | The country of the document. |
gender | string | The gender of the individual (if available). |
given_names | string | The first names of the individual. |
surname | string | The last name of the individual. |
mrz | string | Machine Readable Zone data (if available). |
is_forgery | boolean | Indicates whether the document is detected as a forgery. |
forgery_confidence | float | Confidence level of the forgery detection (0 to 1). |
forgery_comment | string | Additional comments regarding the forgery assessment. |
image_legible | boolean | Indicates if the document image is legible. |
image_quality | float | Quality score of the document image (0 to 1). |
accept | boolean | Indicates if the document is accepted as valid. |
decline_comment | string | Comments explaining why the document was declined (if applicable). |
Example Response:
{
"id_number": "MORGA753116SM9IJ",
"birth_date": "1976/03/11",
"issuance_date": "2021/01/01",
"expiry_date": "2030/12/31",
"birth_place": "UNITED KINGDOM",
"country": "UNITED KINGDOM",
"gender": "",
"given_names": "SARAH MEREDYTH",
"surname": "MORGAN",
"mrz": "",
"is_forgery": true,
"forgery_confidence": 0.9,
"forgery_comment": "Sample watermark present",
"image_legible": true,
"image_quality": 0.9,
"accept": false,
"decline_comment": "Document is a specimen."
}Error Handling
If the request fails, the API will return a JSON object with an error message. Common error codes include:
| Status Code | Description |
|---|---|
| 400 | Bad Request: The request was malformed. |
| 401 | Unauthorized: Invalid API key or token. |
| 415 | Unsupported Media Type: Ensure the file type is valid. |
Example Error Response:
{
"error": "Invalid file type. Please upload a valid image."
}