| Element | How it works |
|---|
| POST /front | Analyzes the front and returns the uuid that links it to the back |
|---|
| POST /back | Analyzes the back and cross-checks it with the front, using that uuid as relatedUuid |
|---|
| GET /listTemplates | The supported documents. With /{templateId}/details, which fields to expect from each one, and with /{templateId}/images, anonymized sample images |
|---|
| GET /version | Checks connectivity. The status code is evaluated, not the body |
|---|
| Authentication | Api-Key header. Each service has its own key, per environment |
|---|
| Base URL | VU provides it along with the key, depending on the environment |
|---|
| Input | info as a business reference and image in base64. On the back, also relatedUuid |
|---|
| Output | uuid, id (the document type), front and back with the data, crossMatchConfidence, code and message |
|---|
RequestPOST /back
// Header: Api-Key: <your service key>
{
"info": "onboarding-12345",
"image": "<photo of the back in base64, no prefix>",
"relatedUuid": "<the uuid returned by POST /front>"
}
{
"info": "onboarding-12345",
"image": "<photo of the back in base64, no prefix>",
"relatedUuid": "<the uuid returned by POST /front>"
}
"frontBackTemplateValidation": trueThe back matches the front. You review the data's consistency and decide."frontBackTemplateValidation": falseIt's the back of another document. You don't accept."message": "Cant get document fields"On the front: the document couldn't be read. You request another capture.
The decision ruleYour backend
// Front: accepting requires all three conditions.
const frontOk =
status === 200 &&
body.message === "Operation end successfully." &&
body.id !== "unknown";
// Back: on top of the above.
const backOk = body.back.frontBackTemplateValidation === true;
// And you check body.crossMatchConfidence before trusting the data.
const frontOk =
status === 200 &&
body.message === "Operation end successfully." &&
body.id !== "unknown";
const backOk = body.back.frontBackTemplateValidation === true;
A 200 doesn't mean extracted data
A photo with no readable document also responds 200, with the message "Cant get document fields" and the document type as "unknown". And a back that doesn't match the front responds 200 with "Operation end successfully.". If you decide on the status code alone, you accept unreadable documents and documents assembled from the sides of two different documents.