Identification Document API
The Identification Document API is used to process and validate identification documents and passports. Each call requires an api key to be present in the http header.
Supported document types
Averse (av) is always the front of given document
Reverse (rev) is always the back of given document
Type selfie is used for selfie comparison
Country | Passport | National ID | Other |
---|---|---|---|
LT | lt_pass_av | lt_id_av | |
SE | se_pass_av | se_id_sk_av (skatteverket) | se_drive_av (körkort) |
NO | no_pass_av | no_id_av | |
DK | dk_pass_av | ||
FI | fi_pass_av | fi_id_av | |
UK | uk_pass_av | uk_drive_av (drivers license) | |
LV | lv_pass_pi_av | lv_id_av | |
NL | nl_pass_av | nl_id_av | |
GR | gr_pass_av | ||
FR | fr_pass_av | fr_id_av | fr_carte_av (carte vitale) |
ES | es_pass_av | es_id_av | es_cata_av |
IT | it_pass_av | it_id_av | |
DE | de_pass_av | de_id_av | |
CZ | cz_pass_av | cz_id_av | |
PL | pl_pass_av | pl_id_av | |
BE | be_pass_av | be_id_nl_av | |
RO | ro_pass_av | ro_id_av | |
AT | at_pass_av | at_id_av | |
PT | pt_pass_av | pt_id_av | |
HU | hu_pass_av | hu_id_av | |
BG | bg_pass_av | bg_id_av | |
RS | rs_pass_av | rs_id_av | |
SK | sk_pass_av | sk_id_av | |
SI | si_pass_av | si_id_av | |
IE | ie_pass_av | ie_id_av | |
EE | ee_pass_av | ee_id_av | |
HR | hr_pass_av | hr_id_av | |
MT | mt_pass_av | mt_id_av | |
CY | cy_pass_av | cy_id_av | |
selfie |
Perform OCR reading and validation of a document
Example request:
Replace API_KEY with your own api key.
Document should be the document file contents as a base64 encoded string.
Digest should be a sha1 digest of the document file contents.
Type is one of the supported document types
Note that there is a 6MB request size limit. If you need to process more than one document, see Upload documents at the bottom of this guide
Example request:
curl https://api.identiway.com/docs/validate
-X POST
-H "Content-type: application/json"
-H "x-api-key: API_KEY"
-d @- << EOF
{
"document": "base64...",
"digest": "sha1...",
"type": "sv_id_av"
}
EOF
Example response:
{
"status" : "completed",
"valid" : true,
"validation_score" : 100.0,
"ocr_texts" : ["string"],
"ocr_labels" : [{
"description" : "string",
"score" : 100.0,
}],
"data": {
"first_name" : "string",
"last_name" : "string",
"birthdate" : "string",
"sex" : "string",
"personal_number" : "string",
"document_number" : "string",
"document_expires" : "string",
"document_valid" : true
}
}
Perform OCR reading and deep validation of one or more documents (supports selfie)
Example request:
curl https://api.identiway.com/docs/process
-X POST
-H "Content-type: application/json"
-H "x-api-key: API_KEY"
-d @- << EOF
{
"documents": [
{
"document": "base64...",
"digest": "sha1...",
"type": "sv_id_av"
},
{
"document": "base64...",
"digest": "sha1...",
"type": "sv_id_rev"
},
{
"document": "base64...",
"digest": "sha1...",
"type": "selfie"
}
],
"first_name": "optional",
"last_name": "optional",
"personal_number": "optional"
}
EOF
Example response:
{
"status" : "completed",
"validation_score" : 100.0,
"verification_score" : 100.0,
"document_validations" : {
"selfie" : {
"sv_id_av" : {
"isIdentical" : false,
"confidence" : 27.84
},
"sv_id_rev" : {
"isIdentical" : false,
"confidence" : 0.0
}
},
"sv_id_av" : {
"type" : 97,
"type_validity" : 96.0,
"required_type_validity" : 100.0,
"data": 100.0
},
"sv_id_rev" : {
"type": 98.0,
"type_validity" : 98.0,
"required_type_validity" : 100.0
}
},
"data": {
"first_name" : "string",
"last_name" : "string",
"birthdate" : "string",
"sex" : "string",
"personal_number" : "string",
"document_number" : "string",
"document_expires" : "string",
"document_valid" : true
}
}
Upload documents
To upload documents prior to processing, you can use the upload_links method to generate file keys and secure upload links to upload your documents. In the process method you can provide file_key instead of contents to process an uploaded document.
Example request:
curl https://api.identiway.com/docs/upload_links
-X POST
-H "Content-type: application/json"
-H "x-api-key: API_KEY"
-d @- << EOF
{
"count": 2
}
EOF
Example response:
{
"links" : [
{
"file_key": "file_key",
"put_url": "https://...",
"expires_in": 3600
},
{
"file_key": "file_key",
"put_url": "https://...",
"expires_in": 3600
}
]
}
Uploading to a put url
Example request:
curl \
--request PUT \
--upload-file selfie.jpg \
'put_url'
Perform OCR reading and deep validation using file keys
Example request:
curl https://api.identiway.com/docs/process
-X POST
-H "Content-type: application/json"
-H "x-api-key: API_KEY"
-d @- << EOF
{
"documents": [
{
"file_key": "file_key",
"digest": "sha1...",
"type": "sv_id_av"
},
{
"file_key": "file_key",
"digest": "sha1...",
"type": "sv_id_rev"
},
{
"file_key": "file_key",
"digest": "sha1...",
"type": "selfie"
}
],
"first_name": "optional",
"last_name": "optional",
"personal_number": "optional"
}
EOF
Example response:
{
"status" : "completed",
"validation_score" : 100.0,
"verification_score" : 100.0,
"document_validations" : {
"selfie" : {
"sv_id_av" : {
"isIdentical" : false,
"confidence" : 27.84
},
"sv_id_rev" : {
"isIdentical" : false,
"confidence" : 0.0
}
},
"sv_id_av" : {
"type" : 97,
"type_validity" : 96.0,
"required_type_validity" : 100.0,
"data": 100.0
},
"sv_id_rev" : {
"type": 98.0,
"type_validity" : 98.0,
"required_type_validity" : 100.0
}
},
"data": {
"first_name" : "string",
"last_name" : "string",
"personal_number" : "string",
"document_number" : "string",
"document_expires" : "string",
"document_valid" : true
}
}
Updated 2 days ago