Assignments and Engagements
Dockt checks a worker or company in the context of a site and a period. The API represents this work with two records:
- An Assignment is a Person working at a Workplace, optionally for an employer, in zero or more roles, for a period. It answers: may this person do this work here, for this company?
- An Engagement is a Company working at a Workplace for the Company that contracted it, for a period. It answers: may this company work here?
Each piece of work gets its own Decisions, evaluated against the Workplace’s Policy.
Assignments
Section titled “Assignments”Create an Assignment with POST /v1/assignments, typically when your system pre-announces a worker for a site:
{ "external_ref": "preannouncement-9031", "workplace": { "external_ref": "plant-antwerp" }, "person": { "external_ref": "worker-4821", "attributes": { "person.first_name": "Jan", "person.last_name": "Peeters" } }, "employer": { "external_ref": "comp-77", "name": "Alfa Welding BV", "country": "BE", "registration_number": "BE0123456789" }, "contracted_by": { "external_ref": "main-contractor-1", "name": "Bouwgroep NV", "country": "BE" }, "roles": ["welder"], "period": { "start": "2026-11-03", "end": null }, "attributes": { "assignment.employment_relationship": "employee", "assignment.posting_status": "local" }}| Field | Required | Notes |
|---|---|---|
external_ref, namespace |
No | Your pre-announcement ID. Sending it again updates this Assignment (200). |
workplace |
Yes | A reference to an existing Workplace. |
person |
Yes | A reference. With external_ref and attributes, it creates or updates the Person. |
employer |
No | A reference. With name, country and registration_number, it creates the Company if it is new. |
contracted_by |
No | The Company that contracted the employer at this Workplace. Needs an employer. |
roles |
No | Role codes that the Policy’s jobs recognise. |
period |
No | start defaults to today at the Workplace. end may be null while unknown. |
attributes |
No | assignment.* codes. |
A newly created Assignment has latest_decision: null. Updating an existing Assignment can return its earlier Decision while the new evaluation is pending. Evaluation runs in the background, and the result arrives as a decision.created event. Without an external_ref or a replayed idempotency key, each create produces a new Assignment.
Status and period
Section titled “Status and period”status follows from the period: upcoming before it starts, open while it runs, and ended after it ends. Dockt monitors upcoming and open Assignments.
Several Assignments can be open at once, for the same Person at one Workplace or several. Dockt does not infer when work ends. An Assignment becomes ended after the end date you provide. Erasing a Person also ends their work. Set period.end with PATCH /v1/assignments/{assignmentId} when the work ends.
The employer
Section titled “The employer”The employer is optional. Without one, the Assignment has no Engagement and no company checks run. If evaluation needs an employer, the Decision is incomplete and includes an input request for the employer field. For example, Dockt needs the employer to check whether an A1 social security certificate applies to the work. Add it later with PATCH /v1/assignments/{assignmentId}.
When a worker moves to another employer at the same Workplace, create a new Assignment. End the old one when you know the date.
roles select the Policy’s jobs. An Assignment gets the general rules plus the rules of every job its roles match. A role the Policy doesn’t know makes the Decision incomplete with a role_unknown finding. Changing the roles re-evaluates the Assignment.
Update
Section titled “Update”PATCH /v1/assignments/{assignmentId} changes employer, contracted_by, roles, period and attributes. Every change re-evaluates the Assignment.
Engagements
Section titled “Engagements”An Engagement is one link in the subcontracting network: “Company S works for Company M at this Workplace”. Create one to vet a Company before any of its workers arrive:
{ "external_ref": "contract-5521", "workplace": { "external_ref": "plant-antwerp" }, "company": { "external_ref": "comp-77", "name": "Alfa Welding BV", "country": "BE", "registration_number": "BE0123456789" }, "contracted_by": { "external_ref": "main-contractor-1", "name": "Bouwgroep NV", "country": "BE" }, "period": { "start": "2026-11-01", "end": "2027-03-31" }}- There is one Engagement per Workplace, Company and
contracted_by. Creating one that exists returns it (200) with its period widened to cover the one you sent. - Leave
contracted_byout for a Company you contract yourself. - A renewed contract is a
PATCH /v1/engagements/{engagementId}with the newperiod, which replaces the old one. - An Assignment that names an employer gets its Engagement from the employer, the Workplace and
contracted_by. Dockt finds or creates it. The Assignment shows it underengagement.
An Engagement is evaluated against the Policy’s rules with applies_to: "engagement", such as company declarations and registrations. It reads the Company’s documents and registry results, and the Company, Engagement and Workplace attributes. When the Policy has no rules about companies, Dockt stores no Decision for the Engagement.
The subcontracting network
Section titled “The subcontracting network”You describe each contracting relationship with an Engagement. Dockt follows those relationships to build the subcontracting network, to any depth. A Company can work at one Workplace for several contracting Companies, so the links form a network:
- Dockt works out whether a Company works for you directly or indirectly, and how deep it sits in the chain (the longest path counts). Package rules use these facts, such as the Belgian limit on chain depth.
- A loop, where A works for B and B works for A at the same Workplace, adds a
subcontracting_loopfinding for review. - When the network identifies contracting Companies above the employer, a document’s named client must match one of them. For example, Dockt compares a Limosa declaration’s service recipient with those Companies. Another client adds a
client_outside_networkfinding for review. - While an employer’s Engagement has a
non_compliantDecision, the Decisions of its workers’ Assignments add anengagement_not_compliantfinding. Each Assignment keeps its own result.
How Decisions stay current
Section titled “How Decisions stay current”Dockt evaluates work again whenever something it depends on changes:
- The Person’s or Company’s attributes or documents change, or a registry answers differently.
- The work’s own fields or attributes change.
- A Company in its chain changes, or an Engagement above it is created or changed.
- The Workplace changes, or a new version of its Policy or base Policy is activated.
- Time passes: a requirement enters its warning period, evidence expires, the work starts or ends, or registries are due a re-check.
A re-evaluation creates a new Decision only when the result, requirements, findings or input requests changed. Otherwise it updates last_evaluated_at. Every new Decision is sent as a decision.created event.
List and filter
Section titled “List and filter”GET /v1/assignmentsfilters byworkplace,person,employer,status,result(of the latest Decision), andexternal_refwith an optionalnamespace.qsearches the Person’s or employer’s name, or an exact reference or ID. For work taken in from a Connection,on_rosterandseen_on_site_sincefilter by the site’s roster and check-ins.- Each Assignment fed by a Connection site reports
activity: the last day the worker was active and itsbasis. Sites that record presence, such as Conneqtr’s check-ins, give the last day on site (site_presence, null until the worker is recorded there); other sites give the last day their roster listed the worker (roster).active_sincefilters by that day, andorder_by=last_active_onlists the most recently active work first, with work that has no activity day last. Work sent through the API has no activity. GET /v1/engagementsfilters byworkplace,company,contracted_by,statusandresult, andqsearches the Company’s name, registration number, or an exact reference or ID.GET /v1/assignments/countsandGET /v1/engagements/countstake the same filters and count every match by the result of its latest Decision, withnot_evaluatedfor work without one.
Check readiness without creating work
Section titled “Check readiness without creating work”Send "dry_run": true with POST /v1/assignments to see the Decision an Assignment would get, without storing anything.