List a worker's Driver CPC entitlements
const url = 'https://api2.recruso.co.uk/v1/workers/1/cpc-licence-categories';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/cpc-licence-categories \ --header 'Authorization: <Authorization>'Returns every Driver CPC entitlement recorded for a worker in your own agency, earliest start date first.
Expired entitlements are listed alongside current ones: the record keeps them, and validUntil on each says which is which. A class can appear more than once — each renewal is its own period. 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 Driver CPC entitlement recorded for a worker.
object
The worker the entitlements belong to.
The entitlements, earliest start date first.
A vehicle class the worker holds Driver CPC entitlement for.
object
The record’s identifier.
The vehicle class, as an id from the platform Vehicle categories vocabulary.
The date the entitlement starts.
The date the entitlement runs to.
Example
{ "workerId": 4821, "cpcLicenceCategories": [ { "driverCpcLicenceCategoryId": 3310, "vehicleCategoryId": 2, "validFrom": "2021-09-10", "validUntil": "2026-09-09" } ]}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"}
