Remove one of a worker's compliance documents
const url = 'https://api2.recruso.co.uk/v1/workers/1/compliances/1';const options = {method: 'DELETE', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://api2.recruso.co.uk/v1/workers/1/compliances/1 \ --header 'Authorization: <Authorization>'Removes one document from a worker’s right-to-work register in your own agency.
This is permanent. The record carries no soft-delete column, so there is no restore and no retained copy — the document and the period it evidenced are gone from the register. Removing a document is for one recorded in error; an expired document is part of the compliance history and belongs where it is.
A worker must always hold at least one compliance document, so removing the last one returns 400. To replace a worker’s only document, add the right one first and remove the wrong one afterwards.
A document that belongs to a different worker, or to another agency, returns 404 rather than 403, so its existence is never disclosed.
Access. Requires a client-credentials access token. Tokens issued through the interactive user login are rejected.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The workerId path parameter
The id path parameter
Responses
Section titled “Responses”No Content
Bad Request
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Unauthorized
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Forbidden
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}
