v1

latestOpenAPI 3.1.0Apache 2.02026-07-24113269342.0 KB
Id capture

Add back side of ID

This endpoint is used for storing back side of id for further processing. Image quality check is performed during that call. Number of retries is not limited.

Once process-id is finished, this endpoint cannot be called for retries.

Note: Front-side of id should be uploaded before back side.

In case of passport or only front sided documents, this endpoint should not be called.

post/omni/add/back-id/v2

Query parameters

retryboolean

Flag stating that this is retry attempt for add/back-id

Headers

api-versionstring required

Request body

base64Imagestring

Image in base64 format. One of base64Image or imageUrl is required

imageUrlstring

URL of the image. One of base64Image or imageUrl is required

Example request

{
  "base64Image": "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEB...",
  "imageUrl": "http://..."
}

Response

In case there's some issue when calling the endpoint due to classification failed, an issue such as bad quality, or any of the fail reasons the response will always have the field:

  • classification
  • failReason
  • sharpness
  • glare
  • horizontalResolution

We recommend considering the call as failed if there's a failReason in the response or if the classification is false. Possible values for fail reason:

  • UNKNOWN_DOCUMENT_TYPE: document classification failed
  • WRONG_DOCUMENT_SIDE: can happen when uploading back side of id when front id is required or the other way around
  • WRONG_ONE_SIDED_DOCUMENT: uploading wrong document with only one side
  • WRONG_UNFOLDED_DOCUMENT: uploading unfolded document with unrecognizable sides
  • UNFOLDED_DOCUMENT_PAGE_MISMATCH: uploading unfolded document with mismatching sides
  • DOCUMENT_NOT_READABLE: document couldn't be read, probably due to image quality
  • UNABLE_TO_ALIGN_DOCUMENT: alignment failed
  • ID_TYPE_UNACCEPTABLE: invalid type of id
  • UNEXPECTED_ERROR_OCCURRED: unexpected error

Whenever the classification is done successfully the fields that will always be present are:

  • classification
  • sharpness
  • glare
  • horizontalResolution
  • readibility
  • typeOfId
  • sessionStatus

The remaining fields could be optional depending on the specific type of id and country of origin.

correctSharpnessboolean

It's true if the sharpness of the ID meets the requirements.

correctGlareboolean

It's true if the glare of the ID meets the requirements.

horizontalResolutioninteger

Value is based on the resolution of the cropped photo. Low value means after performing the crop we have a bad quality of image. We recommend to retry capture if value is below 155.

shadowConfidencenumber float

Value 0 means it is no shadow on the image and image quality is good, while value 1 represents bad quality of image with a lot of shadow. We recommend to retry capture if value is 1.

classificationboolean

If true, server classified image as a front side of an id. If false, server failed to classify image as valid front side of an id or passport and other parameters can be ignored.

readabilityboolean

If true, server can properly read ID. If false server failed to read some key places of the ID.

typeOfId'Unknown' | 'Passport' | 'Visa' | 'DriversLicense' | 'IdentificationCard' | 'Permit' | 'Currency' | 'ResidenceDocument' | 'TravelDocument' | 'BirthCertificate' | 'VehicleRegistration' | 'Other' | 'WeaponLicense' | 'TribalIdentification' | 'VoterIdentification' | 'Military' | 'TaxIdentification' | 'FederalID' | 'MedicalCard'
issueYearinteger

Issue year of the ID.

issueNamestring

Description of the ID. Could contain country code, state, type of ID, subtype of ID.

curpCheckboolean

Only for Mexican IDs. Flag stating if curp was properly read.

sessionStatus'Alive' | 'Closed' | 'Deleted'

Session Status

countryCodestring

Valid ISO alpha-2 or alpha-3 code of the ID issuing country.

statestring

Issuing state of the ID.

failReason'UNKNOWN_DOCUMENT_TYPE' | 'WRONG_DOCUMENT_SIDE' | 'WRONG_ONE_SIDED_DOCUMENT' | 'UNFOLDED_DOCUMENT_PAGE_MISMATCH' | 'WRONG_UNFOLDED_DOCUMENT' | 'DOCUMENT_NOT_READABLE' | 'UNABLE_TO_ALIGN_DOCUMENT' | 'ID_TYPE_UNACCEPTABLE' | 'UNEXPECTED_ERROR_OCCURRED' | 'DIGITAL_ID_REQUESTED_BUT_OTHER_PROVIDED'

Classification fail reason

skipBackIdCaptureboolean

Flag that signals if back id capture should be skipped or not.

forceFrontIdCaptureboolean

Flag that signals if front id capture must be executed after back.

showMandatoryConsentboolean

Render mandatory consent page based on this parameter value.

regulationTypestring

Regulation type for the mandatory consent (only if showMandatoryConsent set to true).

skipGlareFrontboolean

Flag that signals if front side glare should be ignored.

skipGlareBackboolean

Flag that signals if back side glare should be ignored.

documentIsOnTheEdgeboolean

Flag that signals if document is on the edge on the full frame image.

acceptedDocumentsstring[]

List of accepted documents for that particular country in case of ID_TYPE_UNACCEPTABLE failReason.

imageRedactedboolean

Flag that signals if image was redacted as part of the ID capture.

idFaceExtractionSkippedboolean

True when biometric face extraction from the front ID was skipped because the client passed extractIdFace=false. While this flag is true, face-match flows that require an ID-side template cannot run; the flag is cleared on a subsequent add/front-id call where extractIdFace is true (or omitted).

idQualityAttemptApprovedboolean

ID quality check result based on ML readability estimation. True if perFieldReadability >= 0.38, false otherwise. Only available for Mexican documents when feature is enabled.

isDocumentExpiredboolean

Flag indicating if the document side is expired.