List a worker's driving licences
const url = 'https://api2.recruso.co.uk/v1/workers/1/licences';const options = {method: 'GET', 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 GET \ --url https://api2.recruso.co.uk/v1/workers/1/licences \ --header 'Authorization: <Authorization>'Returns every driving licence recorded for a worker in your own agency, oldest first, each with a count of the convictions against it.
Most workers hold one licence or none; the record allows several because a replacement licence is recorded rather than overwriting the one it replaces. The list is not paged. A worker id belonging to another agency returns 404 rather than 403, so their 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
Responses
Section titled “Responses”OK
Every driving licence held for a worker.
object
The worker the licences belong to.
The licences, oldest first.
A driving licence held by a worker.
object
The licence record’s identifier.
The licence number.
The date the licence was issued.
The date the licence expires.
Whether the issue number has been checked against the DVLA record.
How many convictions are recorded against this licence.
Example
{ "workerId": 4821, "licences": [ { "workerLicenceId": 5120, "licenceNumber": "BAKER905124A99AB", "issueDate": "2019-06-03", "expiryDate": "2029-06-02", "issueNumberChecked": true, "convictionCount": 1 } ]}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"}
