1 · Configure in the portal
Create a configuration under Form Autofill: which documents, appearance, which result field goes into which form field, and the websites it may run on.
Form Autofill · for developers
What your team needs for Form Autofill: the snippet, the field mapping in the portal and the check of every result on your server.
Integration
Create a configuration under Form Autofill: which documents, appearance, which result field goes into which form field, and the websites it may run on.
One script tag and a button with data-deepocr-open in your form. Mapped values are written into the fields with the configured name.
Send session id and token from deepocr:complete with the form. Your server reads the result from the API and accepts only completed sessions of your own live id.
Snippet
Copy the snippet with your id from the portal. The events tell your page when the scan is complete, cancelled or failed.
<script src="https://capture.heey-ocr.com/v1/form-autofill.js"
data-form-autofill-id="fa_live_…" async></script>
<form>
<button type="button" data-deepocr-open>Scan vehicle registration</button>
<input name="kennzeichen">
<input name="fin">
</form>button.addEventListener("deepocr:complete", (ev) => {
// ev.detail.session: { id, token } → send both with the form
});
button.addEventListener("deepocr:cancel", () => {});
button.addEventListener("deepocr:error", (ev) => console.warn(ev.detail.code));curl https://api.heey-ocr.com/v1/form-autofill/sessions/cs_… \
-H "Authorization: Bearer <capture_token>"
# accept only status "completed", your own form_autofill_id, each session onceRequirements
Good to know
No. Form Autofill runs in the browser. On a laptop the dialog shows a QR code that opens the camera on the phone; on a phone the camera starts directly. The photos go straight from the phone to Heey OCR, and the fields appear in the form on the device where it was opened.
The form receives a session id and a token together with the values. Your server sends both to the API and gets the read result back, so values typed in by hand can be told apart from values read from the document.
Every structured document type of the API, for example vehicle registration, ID document, invoice, receipt, bank statement or payslip, plus full text as an add-on. A configuration can ask for up to five documents with up to five pages each, and documents can be optional.
They are processed only in the EU and stored encrypted until they are read. A document's photos are deleted as soon as it has been handed over for reading, and the extracted values are available for a short time only. Unfinished sessions expire after 60 minutes and are deleted together with their photos. Nothing is used to train models.