Skip to main content

Combine analysis and booking

Booking does not start with a Docmind upload. If the customer should get a Swiss posting, you send the file to Docbooks. Docbooks analyses it behind the scenes — classify, extract, then book. You wait for BOOKING_FINALISED and GET the booking report. Optional include=extraction embeds the extracted fields on that GET.

Call Docmind only when the extracted data is a product of its own: your screens need typed JSON (amounts, UID, due date) whether or not a booking runs.

One OAuth client can hold both scopes. Workspace ids are still different if you use both APIs.

Warning

A Docmind workspaceId is not a Docbooks workspaceId. Docpier must provision the Docbooks workspace against an extraction workspace before booking works. That link is not “the ids are equal.” Unprovisioned → 409. Ask support.

Business flow — Docbooks (usual)​

  1. The customer uploads a receipt in your product.
  2. You POST the file to a Docbooks workspace.
  3. Docbooks forwards the file and your Bearer token to Docmind, then produces the booking.
  4. You acknowledge BOOKING_FINALISED and GET the job. You do not POST the same file to Docmind first.

The booking token must include capture (docmind.capture / deprecated idp.capture) because Docbooks forwards it. You still do not call the Docmind HTTP API unless you want capture as a separate capability.

If you already hold a Docmind DocumentResponse — because the extracted data is one of your products — you can send that instead of the file and Docbooks skips extraction altogether. The token still needs both scopes; it is simply not forwarded onward. See extraction on Propose a booking.

When you also need Docmind​

Use Docmind in parallel when your product must show or store extraction independently of bookkeeping (inbox, DMS, ERP header fields). That is a second integration: another workspace, another 202, PROCESSING_FINALISED, GET typed JSON.

Do not pass a Docmind documentId into booking. If you also extract for your own UI, keep the original bytes — booking is always a file POST to Docbooks.

Note

One webhook URL is enough. Docpier POSTs to you; route on product then event. A Docbooks-only partner mainly sees BOOKING_FINALISED. Webhooks.

Scopes on the same token​

CallScopes
Book (POST)docbooks.bookings and docmind.capture — Docbooks forwards it to the extractor
Booking GETdocbooks.bookings and docmind.capture — Docbooks reads the extraction with it
List bookings / feedbackdocbooks.bookings
Extract via Docmind HTTP APIdocmind.capture (deprecated idp.capture still accepted)
Organisations and workspaces (until Management API)docbooks.onboarding and docmind.onboarding

Propose a booking. Extract a document — only if the extracted data is also your product.