Skip to main content

The flow in five steps

1

Verify connectivity

GET /version with your Api-Key. It must return 200. Check the status code, not the body. If it fails, the problem is URL, network or proxy — there is nothing to debug on the API side yet.
2

Prepare the capture

A photo of the document, well lit, without glare, with all four borders inside the frame. Base64 without the data: prefix.
3

Send the front

POST /front with info and image. Keep the returned uuid: it is the transaction identifier and the link to the back.
4

Send the back (if the template has one)

If the front returned hasBackSide: true, call POST /back with the same info, the back image, and the front’s uuid as relatedUuid.
5

Decide with the rule in the positive

Front: 200 + "Operation end successfully." + id !== "unknown". Back: additionally frontBackTemplateValidation === true, then review crossMatchConfidence. Details in the introduction.

The request body

Never send relatedUuid in /front. That field belongs to /back only; including it in /front produces a deterministic 500. And despite what the /back error message suggests, documentId does not replace relatedUuid — only relatedUuid links the transaction.

Image requirements

To convert an image to base64:

The template catalog

Template ids follow VU-<ISO3>-<TYPE>-<NN> — ID national id, IDF foreigner id, PA passport, DL driver’s license.
GET /{templateId}/details is the authoritative source for which fields to expect in viz — the set varies per template. Wire your parser against the template’s details, not against one sample response.
A Bad relatedUuid error immediately after a successful front can be replication lag: wait one second and retry once. If it persists, the relatedUuid is genuinely wrong.

Timeouts and retries

Responses weigh ~1 MB. They embed the normalized document, the cropped face and — with MRZ — the MRZ strip, all in base64. Size your buffers and do not log raw response bodies.

Before going to production

  1. GET /version returns 200 from your production connectivity.
  2. Your acceptance condition requires 200 and message: "Operation end successfully." and id !== "unknown" (front), plus frontBackTemplateValidation === true (back).
  3. You tested a mismatched back and your system rejects it.
  4. You tested a photo with no document and your system asks for a new capture instead of accepting empty fields.
  5. Your captures are ≥ 480 × 480 px and the base64 has no data: prefix.
  6. relatedUuid is sent on /back only, never on /front.
  7. Your logs never persist raw error bodies (the 422 echoes your request, image included) nor response images.
  8. Read timeout ≥ 30 s; retries only for sporadic 5xx, with backoff.
  9. Your parser reads the fields declared by GET /{templateId}/details for each template you accept.
  10. You send your own info per operation and log the uuid of every response.

Next: Responses

The extracted fields, the cross-validations between front and back, and the two 200s that do not approve anything.
Last modified on September 9, 2026