Skip to main content

Validate Worker Document

POST/workers/{workerId}/documents/{documentId}/validate
Agency-scoped keys

This endpoint is not available for agency-scoped API keys.

Caller

This endpoint requires a company-scoped API key with the write:workers scope.

Summary

Records a manual validated status for a worker attachment or right-to-work document. The validation is owned by the selected company and records the validating user or API-key owner in its history.

Calling the endpoint for an existing manual validation updates it to validated and appends a status-history entry.

URL Parameters

NameTypeRequiredDescription
workerIdstringYesWorker ObjectId or internal nanoid
documentIdstringYesAttachment or right-to-work document ObjectId

Query Parameters

NameTypeRequiredDescription
companystringYesCompany ObjectId that owns the validation; it must be linked to key

Request Example

curl -X POST 'https://api.requidex.com/api/open/v1/workers/{workerId}/documents/{documentId}/validate?company={companyId}' \
-H 'Authorization: Bearer <API_KEY>' \
-H 'Accept: application/json'

Response Fields

FieldTypeDescription
successbooleanWhether the request succeeded
data.idstringValidation id
data.companyobjectCompany that owns the manual validation
data.competencyobject / nullRelated competency, when present
data.userobject / nullUser or API-key owner attributed to the action
data.validationTypestringmanual
data.statusstringvalidated
data.resolvedAtstringValidation timestamp
data.documentTypestringattachment or rightToWork
data.documentRefstringValidated worker document id
data.statusHistoryarrayValidation status history
data.statusHistory[].statusstringStatus recorded for the history entry
data.statusHistory[].changedAtstringTimestamp of the history entry
data.statusHistory[].changedByobjectUser reference attributed to the history entry
data.createdAtstringValidation creation timestamp
data.updatedAtstringValidation update timestamp

Response Example (200)

{
"success": true,
"data": {
"id": "67bc36db80a1616ec3f48b01",
"company": {
"id": "67bc36db80a1616ec3f47001",
"name": "Requidex Construction Ltd"
},
"competency": {
"id": "67bc36db80a1616ec3f47234",
"name": "CSCS"
},
"user": {
"id": "67bc36db80a1616ec3f49998",
"name": "Alex Carter"
},
"validationType": "manual",
"status": "validated",
"resolvedAt": "2026-08-21T09:00:00.000Z",
"documentType": "attachment",
"documentRef": "67bc36db80a1616ec3f48a10",
"statusHistory": [
{
"status": "validated",
"changedAt": "2026-08-21T09:00:00.000Z",
"changedBy": {
"id": "67bc36db80a1616ec3f49998",
"name": "Alex Carter"
}
}
],
"createdAt": "2026-08-21T09:00:00.000Z",
"updatedAt": "2026-08-21T09:00:00.000Z"
},
"meta": {}
}

MCP Tool

The MCP server exposes this operation as open_api_validate_worker_document with the inputs workerId, documentId, and company.

Errors

HTTP StatusDescription
400Missing identifiers or the request does not select exactly one company
401Missing, invalid, revoked, or expired API key
403Missing write:workers scope or agency-scoped access
404Worker or worker document not found
429Rate limit exceeded
500Unexpected internal error