Extract Document Data Web
This service returns all the data extracted from an identification document by applying OCR to the MRZ code, PDF, barcode, and fields visible in other areas of the document, according to the model defined for each country. For passports, OCR is applied exclusively to the MRZ code due to its standardized format.
Integration
This service is used for implementations of the SelphID Web Widget or to submit open images from any platform. When using the SelphID Web widget, the images generated by the widget are obtained from an array of images.
Endpoint
POST /services/extractDocumentDataWebHeaders
x-api-key
string
Yes
Authorization API key for access.
family
string
No
Value: OnBoarding. Required with the Tracking service.
Request body
Content-Type: application/json
Parameters
tokenFrontDocument
string
Yes
Image encoded in Base64 of the front side of the document, with the MIME type header removed.
tokenBackDocument
string
No
Image encoded in Base64 of the back side of the document, with the MIME type header removed.
countryCode
string
Yes
Country code in ISO 3166-1 alpha-3. For passports, only tokenFrontDocument with countryCode set to "PSP".
decompose
boolean
No
Indicates whether to obtain the facial image present in the document and a signature crop. (*) Check with the Latam Support team for enabled countries.
tracking
object
No
Object representing the required tracking information.
tracking.extraData
string
No
Token generated by the SDK Mobile/Web. Contains tracking information tokenized with the Platform.
tracking.operationId
string
No
Operation identifier generated by the SDK Mobile/Web.
Example Request
Responses
200 Success
Response Parameters
serviceResultCode
integer
Code indicating the overall result of the service execution. See Service Result Code
serviceResultLog
string
Descriptive field for the result of the service execution. Details about the module are included in case of an error or exception.
serviceTime
string
Total service execution time (milliseconds).
serviceDocument
string
Object representing the captured document. Its properties are all fields extracted by the OCR process, including the facial image present in the document. See serviceDocument fields, which also lists the possible values for countryCode and DOC_MODEL.
serviceTransactionId
string
Transaction identifier associated with the request processed by the API.
Service Result Code
The serviceResultCode indicates the overall result of the service execution:
0
The service execution was successful; the module processed the request correctly.
200
Response example
400 Bad Request
401 Unauthorized
403 Forbidden
413 Payload Too Large
The request exceeds the maximum allowed size. The gateway rejects it without processing it: the response does not include serviceResultCode or serviceTransactionId. See Request size limit.
Request larger than 6 MB and up to 10 MB (Content-Type: application/json):
Request larger than 10 MB (10,485,760 bytes) (Content-Type: text; charset=utf-8, plain text, not JSON):
502 Bad Gateway
504 Gateway Timeout
Last updated