Skip to main content

Enable capture 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 uses Docpier capture behind the scenes (classifies, extracts, then books). You wait for BOOKING_FINALISED and GET the booking report. Optional include=extraction embeds the captured fields on that GET.

Call Docmind only when capture 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 Docpier extraction, 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.

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 capture — required so Docbooks can call extraction
Booking GET / feedbackdocbooks.bookings
Extract via Docmind HTTP APIdocmind.capture (today still issued as idp.capture)
Organisations and workspaces (until Management API)docbooks.onboarding

Book a document. Extract a document — only if capture is also your product.