Resolve missing evidence
A Decision can be incomplete when the worker hasn’t uploaded everything yet, or Dockt needs a value your system knows. This guide shows how to read what is missing, provide it, and follow the next Decision.
Before you begin
Section titled “Before you begin”Use a credential with account:read and account:write. Set DOCKT_API_BASE_URL and DOCKT_API_TOKEN by following Authenticate your backend. The commands use curl and jq. Set DOCKT_DECISION_ID to the Decision you are resolving, and DOCKT_ASSIGNMENT_ID to its Assignment.
1. Read what is missing
Section titled “1. Read what is missing”Start from a decision.created event, or from an Assignment’s latest_decision. Fetch the Decision and keep what needs action:
curl --fail-with-body --silent --show-error \ -H "Authorization: Bearer $DOCKT_API_TOKEN" \ "$DOCKT_API_BASE_URL/v1/decisions/$DOCKT_DECISION_ID" | jq '.data | { result, missing: [.requirements[] | select(.status == "missing") | {rule_code, title, provided_by, accepts, missing}], input_requests }'Two lists tell you what to do:
- A requirement with status
missingneeds evidence.acceptslists the document types that would satisfy it,provided_bynames the Person or Company who has to provide it, andmissingis a sentence you can show. - An input request needs a value. It names the
ownerand theattributecode orfieldname, with what a form needs to ask for it.
For a pending requirement, Dockt is still processing a file or refreshing a registry lookup. Wait for the next result rather than asking the worker for the same evidence. Apply your own timeout if processing takes longer than your workflow allows.
2. Send values your system already knows
Section titled “2. Send values your system already knows”Answer input requests from your own data first. Send each value to the record that owns it:
owner.type |
Send it with |
|---|---|
person |
PATCH /v1/persons/{personId} with attributes |
company |
PATCH /v1/companies/{companyId} with attributes |
workplace |
PATCH /v1/workplaces/{workplaceId} with attributes |
assignment |
PATCH /v1/assignments/{assignmentId} with attributes, or the named field such as employer or period.end |
engagement |
PATCH /v1/engagements/{engagementId} with attributes or period |
For an input request for assignment.employment_relationship, send the known value to the Assignment:
curl --fail-with-body --silent --show-error \ -X PATCH "$DOCKT_API_BASE_URL/v1/assignments/$DOCKT_ASSIGNMENT_ID" \ -H "Authorization: Bearer $DOCKT_API_TOKEN" \ -H 'Content-Type: application/json' \ --data '{ "attributes": { "assignment.employment_relationship": "employee" } }'A value about a Person serves every Workplace. Dockt asks for a date of birth once, not once per site.
In the Dockt console, the latest Decision on an Assignment or Engagement page lets users with write access answer each request in place.
Only ask a user when your system doesn’t have the value. Use the request’s label, value_type, options and cardinality to build the field, and reason to explain why it is needed. Don’t send guessed values.
3. Ask for the missing documents
Section titled “3. Ask for the missing documents”Show the worker which documents are missing, using each requirement’s title and missing. Upload what they provide to the Person or Company named in provided_by. For this example, set DOCKT_PERSON_ID to that Person’s ID and save their file as dimona.pdf:
curl --fail-with-body --silent --show-error \ -X POST "$DOCKT_API_BASE_URL/v1/persons/$DOCKT_PERSON_ID/documents" \ -H "Authorization: Bearer $DOCKT_API_TOKEN" \ -H 'Idempotency-Key: worker-4821-dimona-2026-11' \ -F 'file=@dimona.pdf;type=application/pdf' \ -F 'document_type=dimona' | jq '.data | {id, status}'Declare document_type with one of the requirement’s accepts codes when you know which document the user uploaded. If Dockt can’t read the file, Dockt still uses the declared type as evidence and marks the requirement review_required for a person to review.
Don’t assign a file to a requirement. Dockt decides which requirements each Document satisfies, for every piece of the subject’s work.
4. Follow the round trip
Section titled “4. Follow the round trip”After you provide evidence, Dockt evaluates the affected work again:
- The upload returns
202with the Documentprocessing. The requirement shows aspendingin the next Decision if one is created meanwhile. document.processedarrives when Dockt has read the file.- Dockt evaluates the work again. If the result, requirements, findings or input requests changed, a new Decision is created and
decision.createdarrives. - Read the new Decision and update the result, requirements, findings, and input requests. The event’s change lists summarize selected changes; they are not a complete field-by-field diff.
Webhooks can arrive out of order. Use the work’s latest_decision to identify its current result. If processing fails, handle document.failed and read the Document’s error.
Repeat until the result is compliant, or until a person has to decide. For review_required, read the findings and evidence to decide whether a reviewer needs to inspect the file or request a replacement; record the reviewer’s verdict as an Outcome.
When a document doesn’t count
Section titled “When a document doesn’t count”A requirement can stay missing or become review_required after an upload. Read the requirement’s missing sentence and evidence:
- The document names another employer, or doesn’t cover the work’s period. It doesn’t count for this work. Ask for the document that matches.
- The document’s worksite doesn’t match the Workplace address, such as a Limosa declaration for another site.
- Dockt couldn’t read the file. Ask for a clearer copy, or declare the type so a reviewer can confirm it.
- The document has expired. Ask for the renewed one.
If a user uploaded the wrong file, withdraw it with DELETE /v1/documents/{documentId}. Dockt evaluates the work again without it.
Stay ahead of expiry
Section titled “Stay ahead of expiry”For a met requirement with expiring_soon: true, expires_on is the evidence’s last valid date. Dockt schedules re-evaluation after that date. A replacement document can keep the requirement met. The flag turns on at the start of the document type’s warning period and creates a new Decision, so you can ask the worker for a renewed document before the old one expires.