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_pass_rev

lt_id_av
lt_id_rev

SE

se_pass_av
se_pass_rev

se_id_sk_av (skatteverket)
se_id_sk_rev (skatteverket)
se_id_po_av (polisen)
se_id_po_rev (polisen)

se_drive_av (körkort)
se_drive_rev (körkort)

NO

no_pass_av
no_pass_rev

no_id_av
no_id_rev

DK

dk_pass_av
dk_pass_rev

FI

fi_pass_av
fi_pass_rev

fi_id_av
fi_id_rev

UK

uk_pass_av
uk_pass_rev

uk_drive_av (drivers license)
uk_drive_rev (drivers license)

LV

lv_pass_pi_av
lv_pass_pi_rev
lv_pass_ne_av
lv_pass_ne_rev

lv_id_av
lv_id_rev

NL

nl_pass_av
nl_pass_rev

nl_id_av
nl_id_rev

GR

gr_pass_av
gr_pass_rev

FR

fr_pass_av
fr_pass_rev

fr_id_av
fr_id_rev

fr_carte_av (carte vitale)
fr_carte_rev (carte vitale)

ES

es_pass_av
es_pass_rev

es_id_av
es_id_rev

es_cata_av
es_cata_rev

IT

it_pass_av
it_pass_rev

it_id_av
it_id_rev

DE

de_pass_av
de_pass_rev

de_id_av
de_id_rev

CZ

cz_pass_av
cz_pass_rev

cz_id_av
cz_id_rev

PL

pl_pass_av
pl_pass_rev

pl_id_av
pl_id_rev

BE

be_pass_av
be_pass_rev

be_id_nl_av
be_id_nl_rev
be_id_fr_av
be_id_fr_rev

RO

ro_pass_av
ro_pass_rev

ro_id_av
ro_id_rev

AT

at_pass_av
at_pass_rev

at_id_av
at_id_rev

PT

pt_pass_av
pt_pass_rev

pt_id_av
pt_id_rev

HU

hu_pass_av
hu_pass_rev

hu_id_av
hu_id_rev

BG

bg_pass_av
bg_pass_rev

bg_id_av
bg_id_rev

RS

rs_pass_av
rs_pass_rev

rs_id_av
rs_id_rev

SK

sk_pass_av
sk_pass_rev

sk_id_av
sk_id_rev

SI

si_pass_av
si_pass_rev

si_id_av
si_id_rev

IE

ie_pass_av
ie_pass_rev

ie_id_av
ie_id_rev

EE

ee_pass_av
ee_pass_rev

ee_id_av
ee_id_rev

HR

hr_pass_av
hr_pass_rev

hr_id_av
hr_id_rev

MT

mt_pass_av
mt_pass_rev

mt_id_av
mt_id_rev

CY

cy_pass_av
cy_pass_rev

cy_id_av
cy_id_rev

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
  }
}