API reference / Documents
/v1/documents/{id}/completeReport that an upload finished, and get the verdict
- Operation
completeDocumentUpload- Authentication
- API key
Verifies the object and answers with the verdict in the same request. The presigned PUT this follows pins neither content type nor length, so the size and type declared when the slot was requested are claims — this reads them back from storage and checks them against the rules for the document type. A `200` with `status: "invalid"` means the document was seen and rejected; `validation_notes` says why.
Request
Parameters
idpathrequiredstringResponses
document_idstringrequiredstatusstringrequiredThe verdict, read back from the stored object: `valid` or `invalid`. Anything that fails the rules for its document type — a missing object, the wrong content type, too large — is `invalid`, and the reason is in `validation_notes`.
validation_notesstringWhy the document failed, in the applicant’s terms. Present only when `status` is `invalid`.
errorobjectrequirederrorobjectrequirederrorobjectrequirederrorobjectrequiredExample
curl -X POST https://api.haavisa.com/v1/documents/<id>/complete \
-H "Authorization: Bearer $HAAVISA_API_KEY"More in Documents
Something unclear? The eligibility guide explains the model behind the answers; the errors guide covers the envelope.