For the complete documentation index, see llms.txt. This page is also available as Markdown.

Document PAD Diagnostic

Service that allows verifying whether the support of an identity document is genuine or not through analysis of its image, in order to detect presentation attacks aimed at identity theft.

The validation result may return the following values:

  • Credible: The document is genuine.

  • Doubtful: It cannot be determined whether the document is genuine.

  • Spoof: The document does not appear to be genuine.

  • Error: The validation process encountered an error.

The result is provided in the field decision of the service response, along with the field reason which specifies the cause of unsatisfactory validations.

Image requirements

Minimum requirements

  • HD images, minimum resolution: 720px

  • Pixels showing the background around the document of at least 5% of its width

  • Minimum compression level: JPEG 70

  • The document text must be readable by an OCR

  • FullHD images, minimum resolution: 1080px

  • Document centered in the image and occupying more than 5% of the document

  • Without compression, with formats such as PNG

  • Well-lit photo without blur or light reflections

Endpoint

Headers

Name
Type
Required
Description

x-api-key

string

Yes

Access authorization API key.

family

string

No

Value: Onboarding. Required with the tracking service.

All calls to the Endpoints for Tracking with Identity Platform must contain the header family.

Request body

Content-Type: application/json

Parameters

Parameter
Type
Required
Description

frontSideImage

string

Yes

Image encoded in Base64 of the front side of the document to be validated.

backSideImage

string

Yes

Image encoded in Base64 of the back side of the document to be validated.

face

string

No

Image encoded in Base64 of the person's face to be validated (optional).

tokenized

boolean

Yes

Defines whether images are sent in tokenized format or in flat format.

countryCode

string

Yes

Code ISO Alpha-3 of the issuing country of the identity document.

idType

string

Yes

Type of document to validate. Possible values: PASSPORT, ID_CARD, RESIDENCE_PERMIT, DRIVERS_LICENSE, DRIVING_LICENSE, VISA

tracking

object

No

Object that represents the necessary tracking information.

tracking.extraData

string

No

Token generated by the Mobile/Web SDK. Contains tokenized tracking information with the Platform.

tracking.operationId

string

No

Operation identifier generated by the Mobile/Web SDK.

Request example

Responses

200 Success

Response parameters

Parameter
Type
Description

serviceTransactionId

string

Transaction identifier associated with the request processed by the API.

serviceResultCode

integer

Code indicating the overall result of the service execution.

serviceResultLog

string

Descriptive field of the execution result.

timestamp

string

Response timestamp (UTC) in the format ISO 8601.

serviceResult

object

Object with the validation result. See table below.

serviceDocumentData

string

JSON string with the data extracted by OCR from the identity document.

serviceTime

string

Processing time (milliseconds).

Response parameters — serviceResult.result

Parameter
Type
Nullable
Description

decision

string

No

Validation decision. Possible values: Credible, Doubtful, Spoof, Error. See PAD Diagnostic Validation Results.

reason

string

Yes

Rejection reason (present when the decision is not Credible). See PAD Diagnostic Rejection Reasons.

IQA

object

Yes

Image quality assessment data (Image Quality Assessment).

Response parameters — serviceResult (additional)

Parameter
Type
Description

api_version

string

Version of the API used for processing.

processing_modules_time

string

Runtime of the processing modules.

Service Result Code

The serviceResultCode indicates the overall result of the service execution:

serviceResultCode
Description
HTTP code

0

The service execution was successful, the module processed the request correctly.

200

PAD Diagnostic Validation Results

The PAD (Presentation Attack Detection) diagnostic service returns the validation results in the field decision:

decision
Description

Credible

The document is genuine.

Doubtful

It cannot be determined whether the document is genuine.

Spoof

The document does not appear to be genuine.

Error

The validation process encountered an error.

PAD Diagnostic Rejection Reasons

When the validation result is not satisfactory, the field reason provides specific details:

reason
Description

Screen_Replay_Attack

An attacker presents an image or video of a document to the camera.

Black_and_White_Printed_Copy_Attack

Detection of documents printed on paper in grayscale or black and white.

Photo_Replacement_Attack

The data region appears genuine but the portrait region has a printed photograph on top. It does not detect digital manipulations.

SECURITY_PHOTO_CHECK

The portrait photo on the identity document is manipulated.

SECURITY_DATA_CHECK

The document data show alterations in their content.

SECURITY_OCR_CHECK

The comparison of common data between the front and back of the identity document fails.

NOT_PROCESSED_OCR

The OCR data could not be extracted from the identity document.

NOT_PROCESSED_PHOTO_CHECK

The portrait photo verification of the identity document could not be performed.

NOT_PROCESSED_DATA_CHECK

The verification of the identity document field values could not be performed.

Response example — Successful validation

Response example — Error

400 Bad Request

401 Unauthorized

403 Forbidden

502 Bad Gateway

504 Gateway Timeout

Last updated