Passport Service

Service description

Passport Service allows to validate a passport by processing an image, verifying its authenticity and responding with information about the document.

POST ~/api/passport


Tag Type Required Description
file file yes Support jpg, jpeg or png images.


Tag Type Required Description
apiKey string yes Customer key.
Response data
Name Type Description
valid boolean True or False result of global verification.
name string Name
lastname string Second Name
nationality string Passport Nacionality
dateOfBirth string Person's Date of birth
sex string Person's sex
issuingCountry string Place of origin
placeExpedicion string Place where the document was issued
code string Error code
message string Error message

JSON example

  "valid": "boolean",
  "data": {
    "name": "string",
    "lastName": "string",
    "nationality": "string",
    "dateOfBirth": "string",
    "sex": "string",
    "expirationDate": "string",
    "documentNumber": "string",
    "issuingCountry": "string",
    "placeExpedition": "string"
  "warnings": [
      "code": "string",
      "message": "string"

Error and Warning messages

Code Message Description
PI001 Something broke! We got a unspected error and will be fixed as soon as posible.
PI005 Document Analysis error: Could not find document in image provided Our models can't detect the document in the given image.
PI006 The file format is incorrect The service suppot jpg, jpeg and png file formats.
PI007 The field "file" is required Make a request without a file will response with a bad request message.
PI008 Filesize must be less than 5MB The filesize of the given image must be small than 5 MB.
PI009 Image resolution must be bigger than 1000x600px The minimum resolution for the image must be 1000x600.
PI010 The OCR cannot be performed. Please, resend the image with greater clarity and quality The OCR process cannot be performed due a document with a poor image quality.
PI011 In order to get a better verification result please provide a document in horizontal orientation The service perform a better result with documents in horizontal orientation.
PI012 The passport document is expired The service detect that the passport document is expired.
PI013 The person is under age The service detect that the person is under age.