Check readiness with a dry run
A dry run answers “would this Person be ready for this Workplace?” before you announce them. Dockt evaluates the request as it would a real Assignment and returns the Decision inline. It stores nothing: no Assignment, Engagement or Decision, no monitoring, no events and no usage.
Use a dry run for a what-if, such as choosing which worker to send to a site, or showing a worker what they still need before they apply. When the Person is actually expected at the Workplace, create the Assignment for real, possibly with a future start date.
Before you begin
Section titled “Before you begin”A dry run uses records as they are stored. Every reference must point to an existing record:
- The Workplace.
- The Person, created with
POST /v1/personsor earlier work. - The employer and
contracted_by, if you send them.
Use an API credential with account:write. Set DOCKT_API_BASE_URL and DOCKT_API_TOKEN as described in Authenticate your backend. The command uses curl and jq; replace the references with records in your Account.
A dry run never creates a Person or Company, and it rejects a Person’s attributes. Send them first with POST /v1/persons or PATCH /v1/persons/{personId}. Creating a Person starts registry lookups in the background. A dry run uses the results available when you send it; creating the Person does not guarantee those lookups have finished.
Send the dry run
Section titled “Send the dry run”Send POST /v1/assignments with "dry_run": true and the same fields as a real Assignment:
curl --fail-with-body --silent --show-error \ -X POST "$DOCKT_API_BASE_URL/v1/assignments" \ -H "Authorization: Bearer $DOCKT_API_TOKEN" \ -H 'Content-Type: application/json' \ --data '{ "dry_run": true, "evaluate_for": "2026-12-01", "workplace": { "external_ref": "plant-antwerp" }, "person": { "external_ref": "worker-4821" }, "employer": { "external_ref": "comp-77" }, "period": { "start": "2026-12-01", "end": null }, "attributes": { "assignment.posting_status": "posted", "assignment.employment_relationship": "employee" } }' | jq '.data | {object, person, employer, decision: (.decision | {result, summary, evaluated_for})}'evaluate_for is the date to evaluate for. It defaults to the later of today and the period’s start. Only a dry run accepts it.
Read the answer
Section titled “Read the answer”The response is 200 OK with an assignment_dry_run. The following example shows the resource inside data, with a selection of requirements:
{ "object": "assignment_dry_run", "workplace": { "id": "wpl_8Tn1", "external_ref": "plant-antwerp", "namespace": "api" }, "person": { "id": "per_7Hq2", "external_ref": "worker-4821", "namespace": "api" }, "employer": { "id": "cmp_3Lp9", "external_ref": "comp-77", "namespace": "api" }, "contracted_by": null, "roles": [], "period": { "start": "2026-12-01", "end": null }, "attributes": { "assignment.posting_status": { "value": "posted", "source": "customer" }, "assignment.employment_relationship": { "value": "employee", "source": "customer" } }, "decision": { "result": "incomplete", "summary": "1 requirement missing: Limosa declaration.", "evaluated_for": "2026-12-01", "requirements": [ { "rule_code": "posting_declaration", "title": "Limosa declaration", "source": { "type": "package", "package": "social_construction_be_v1", "version": "RELEASE" }, "status": "missing", "evidence": [], "provided_by": { "type": "person", "id": "per_7Hq2" }, "accepts": [{ "document_type": "limosa_l1" }, { "document_type": "limosa_exemption_evidence" }], "missing": "A Limosa declaration that names Plant Antwerp and covers 2026-12-01." } ], "findings": [], "input_requests": [], "inputs": { "policy_versions": [{ "id": "plv_5Rt8" }], "packages": [{ "code": "social_construction_be_v1", "version": "RELEASE" }] } }}The decision contains the result, summary, evaluation date, requirements, findings, input requests, and inputs. It has no object, id, target, or created_at fields. Only the requirements that aren’t met are shown here. Read it the same way: result, then requirements, findings and input_requests. Input requests about the Assignment carry owner.id: null, because no Assignment exists.
A dry run uses what Dockt already knows. Documents still processing, and registry lookups being refreshed, show as pending. A dry run never asks a registry itself.
Errors
Section titled “Errors”- An unknown Person or Company returns
422with typedry-run-reference-missing. - An unknown Workplace returns
404with typereference-not-found. - Person attributes in a dry run return
422with typereference-invalid. evaluate_forwithoutdry_runreturns422.
From dry run to Assignment
Section titled “From dry run to Assignment”When the worker is confirmed, send the same body without dry_run and evaluate_for, with your external_ref. Dockt creates the Assignment, evaluates it in the background, and sends decision.created.