Skip to content
Heey OCR.
DE

Form Autofill · for developers

One script.
One button. Done.

What your team needs for Form Autofill: the snippet, the field mapping in the portal and the check of every result on your server.

Form Autofill documentation

Integration

Form Autofill integration: script tag, portal, server checkThree steps. No new flow.

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.

2 · Add the snippet

One script tag and a button with data-deepocr-open in your form. Mapped values are written into the fields with the configured name.

3 · Check on the server

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

Form Autofill snippetPaste it. Map the fields.

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 once

Requirements

Form Autofill requirements: https, CSP, cameraWhat your page needs to allow.

  • Your page runs over https; browsers only open the camera there.
  • With a Content-Security-Policy, allow capture.heey-ocr.com in script-src and frame-src, plus capture.heey-ocr.com and api.deep-ocr.com in connect-src.
  • Do not block the camera with your own Permissions-Policy.
  • The test id (fa_test_…) works on localhost and the portal's test page and is free; the live id only on your approved domains.

Good to know

FAQ about security and data protectionClear answers. Before you start.

Do my customers need an app?

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.

How do I check the result on my server?

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.

Which document types are available?

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.

What happens to the photos?

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.