Kredibel API
  • Home
  • Knowledge Base
    • Security
    • Scoring Engine
    • Blacklist & Whitelist
    • Team Management
  • API Guide
  • Getting Started
  • Environment
  • Authorization
  • Responses & Errors
  • API References
    • Account Screening
      • Watchlist Screening
      • Bank Account
      • Phone Number
      • Email Address
      • IP Address
    • Electronic Certificate
      • Certificate Issuance
    • Identity Verification [Deprecated]
      • Biometric Verification
      • Demography Verification
      • Full Verification
    • Text Recognition
      • National Identity
      • Driver License
      • Passport
    • Face Recognition
      • Face Comparison
    • Billing
      • Credit
Powered by GitBook
On this page
  • Endpoints
  • Headers
  • Request
  • Response
  • Errors

Was this helpful?

  1. API References
  2. Text Recognition

Passport

Text recognition on Passport.

This service supports almost all type of passports from around the world

Endpoints

Method

URL

POST

$vision/v1/ocr/id/passport

Headers

Header

Value

Content-Type

application/json

Authorization

Request

The OCR inference time may vary. It depends on many factors, one of them is the image size. We recommend you to resize the image before sending it to Kredibel system.

Field

Type

Description

image

(Required)

<base64:image>

Image binary encoded in base64 without <data:image/png;>. - Supports: JPG, JPEG, PNG - Max Size: 2MB - Recommended size: 1024x768

cardDetect

Boolean

(Default: true)

Use card detection model

passCardDetect

Boolean

(Default: true)

If false, when identity card is not detected on the image it will return an error message

flipImage

Boolean

(Default: false)

If true, the system will flip your image

checkFlipImage

Boolean

(Default: false)

If true, the system will check whether your image is flipped or not

You just need to declare image field in order to use this service.

{
  "image": "/9j/..."
}
{
  "image": "string",
  "cardDetect": true,
  "passCardDetect": true,
  "flipImage": true,
  "checkFlipImage": true
}

Response

result

Field

Type

Description

identityId

String

Identity id

indicator

String

Indicator

country

String

Country

countryCode

String

Country code

fullName

String

Full name

nationality

String

Nationality

nationalityCode

String

Nationality code

birthDate

String

Date of birth

sex

String

["male", "female"]

Sex

personalNumber

String

Personal number

expirationDate

Date

(dd-mm-yy)

Expiration date

information

Field
Type
Description

tilt

Float

Tilt degree (0-360) on identity card. If it is upside-down, then the value is 180.

cardDetected

Boolean

Return true if out system detected identity card on the image.

{
  "message": "string",
  "data": {
    "id": "string",
    "result": {
      "identityId": "string",
      "indicator": "string",
      "country": "string",
      "countryCode": "string",
      "fullName": "string",
      "nationality": "string",
      "nationalityCode": "string",
      "birthDate": "string",
      "sex": "string",
      "personalNumber": "string",
      "expirationDate": "string"
    },
    "information": {
        "tilt": float,
        "cardDetected": boolean
    }
  }
}

Errors

Error 4XX

Error Type
Description
Is charged?

invalid_base64_encoding

Invalid base64 encoding.

false

card_not_found

There is no identity card found in the image. This error only raised if you set passCardDetect = False.

true

text_not_found

There is no text found in the image.

true

invalid_document_type

The document sent does not appear to be the right identity type.

true

parsing_failed

System fail to parse identity card.

true

{
   "errors":{
      "errorId": <log_id:uuid>,
      "errorType": <error_type:str>
   },
   "message": <message:str>
}

Error 5XX

For every 5XX http code response, there will be no charge.

PreviousDriver LicenseNextFace Recognition

Last updated 2 years ago

Was this helpful?

Bearer

Please read this to know more about response.

page <Responses & Errors>
YOUR_API_KEY