Skip to content

Plan your backend integration

Dockt is an API that your backend calls. Before you write code, decide how your records map to Dockt, which endpoints you use, and how your system learns about new Decisions.

You don’t need to reproduce Dockt’s rules. Your backend sends who works where and the documents you have, stores Dockt’s IDs, and acts on the Decisions.

Your system Dockt
A site, project or location A Workplace, with your site ID as external_ref
The rules for a client or country A Policy, shared by the Workplaces it applies to
A worker A Person, with your worker ID as external_ref
An employer, subcontractor or client A Company, deduplicated by registration number
A pre-announcement or site access request An Assignment, with your request ID as external_ref
A subcontract at a site An Engagement
A file about a worker or company A Document on the Person or Company
A reviewer’s verdict An Outcome

Use external_ref for your own IDs. For Persons, Companies, Workplaces and Assignments, sending the same reference again creates or updates the matching record. A Document upload with an existing reference returns that Document unchanged. Use an idempotency key when retrying a request to replay its first response. If you receive records from several systems, give each system its own namespace.

  1. Your application collects worker details or a file.
  2. Your backend sends it to Dockt with your API credential.
  3. Your backend stores the returned IDs and acts on the result.

Keep API credentials, webhook secrets and document files out of browser and mobile code. If a browser uploads a file to your product, send it to your backend first.

Most integrations use these endpoints:

Goal Endpoints
Confirm authentication GET /v1/auth/me
Look up packages, document types, qualifications and attributes /v1/compliance-packages, /v1/document-types, /v1/qualifications, /v1/attribute-definitions
Write rules /v1/policies, /v1/policy-versions
Describe sites /v1/workplaces
Describe workers and companies /v1/persons, /v1/companies
Announce work /v1/assignments, /v1/engagements
Upload files POST /v1/persons/{personId}/documents, POST /v1/companies/{companyId}/documents
Read results /v1/decisions, /v1/registry-checks
Record your team’s verdicts /v1/outcomes
Receive events /v1/notification-destinations
Take workers in from a source system /v1/account/connections, /v1/source-bindings, /v1/source-workers, /v1/source-intakes
Report usage /v1/usage, /v1/account/credits

Every route starts with /v1: Persons, Companies, Workplaces, Policies, work, Documents and Decisions, as well as browser sign-in and GET /v1/auth/me under /v1/auth, credits under /v1/account/credits, and connection management under /v1/account/connections. OpenAPI JSON describes them all.

The API also has console users under /v1/account/users and API credentials under /v1/api-credentials. You only need these management endpoints if your integration manages console access or creates and rotates credentials.

Dockt supports its REST API and OpenAPI JSON as the integration surface. Call the API with your HTTP client, or generate types and client code from OpenAPI.

For a TypeScript type file, run:

Terminal window
npx openapi-typescript https://api.dockt.com/openapi.json \
--root-types \
--root-types-no-schema-prefix \
--output src/dockt-schema.d.ts

Commit the generated file and review the OpenAPI diff before you replace it. A contract change then can’t silently change your build.

Call Dockt from TypeScript

Store Dockt IDs next to your own records. At minimum, keep:

  • The Workplace, Person, Company and Assignment IDs, or the external_ref and namespace you use for them.
  • Every uploaded Document ID.
  • The Decision ID your product acted on, and when.
  • The idempotency key of each create or upload.
  • The event IDs you have processed.

Don’t use a name, a filename or a date of birth to find a Dockt record. Use Dockt IDs or your own references.

Evaluation and document processing continue after your request returns. A 201 for an Assignment or a 202 for an upload means Dockt accepted the work. It is not a result.

Use this pattern in production:

  1. Store the returned ID before your backend reports success.
  2. Register a webhook endpoint and handle decision.created as the main signal.
  3. Fetch the Decision before an important action.
  4. Reconcile with API reads for anything you may have missed. Check both status=upcoming and status=open Assignments, and Engagements if you use them. Follow pagination for each collection.
  5. Apply your own deadline without turning elapsed time into a Dockt result.

Dockt can create new Decisions while work is open. Each earlier Decision stays unchanged. Plan for a decision.created at any time: a document can expire, a registry can answer differently, or a Policy can change.