API reference / Documents
/v1/documents/photoRender a correctly sized passport photograph
- Operation
renderPassportPhoto- Authentication
- API key
Send the image as the request body with a `Content-Type` of `image/jpeg` or `image/png`, and name the destination in the query. Returns the cropped, background-replaced photograph as base64.
**Stateless.** The bytes are read into memory, passed to the rendering service, and returned. Nothing is written to storage and no row is created, which is deliberate: a passport photograph is the one document whose retention raises the hardest questions in this product.
**`compliant` is always `false`.** The pipeline verifies exactly one thing for itself, that a single face was detected. Everything else an immigration officer looks at is unmeasured and is listed under `human_review`, never as a passing check. A `200` carrying `errors` means the photograph was seen and could not be used, which is a different outcome from a failure to reach the service.
Request
Parameters
destination_iso3queryrequiredstringResponses
compliantbooleanrequiredone of:
errorsstring[]requiredwarningsstring[]requiredchecksobjectrequiredhuman_reviewstring[]requiredprocessingobjectnullrequiredinput_dimensionsobjectnullrequiredrender_target_sourcestringrequireddestination_iso3stringrequiredone of: ETHSOMDJIKEN
photo_base64stringnullrequiredhd_photo_base64stringnullrequirederrorobjectrequirederrorobjectrequirederrorobjectrequirederrorobjectrequirederrorobjectrequiredExample
curl -X POST https://api.haavisa.com/v1/documents/photo \
-H "Authorization: Bearer $HAAVISA_API_KEY"?destination_iso3=<destination_iso3>More in Documents
Something unclear? The eligibility guide explains the model behind the answers; the errors guide covers the envelope.