List the modules in a Driver CPC training period
const url = 'https://api2.recruso.co.uk/v1/workers/1/cpc-training/1/modules';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-training/1/modules \ --header 'Authorization: <Authorization>'Returns every module recorded within one of a worker’s Driver CPC training periods in your own agency, earliest training date first, with the hours they add up to.
The list is not paged. A worker or period belonging 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 trainingId path parameter
Responses
Section titled “Responses”OK
Every module recorded within one Driver CPC training period.
object
The worker the period belongs to.
The training period the modules belong to.
The hours recorded across every module listed.
The modules, earliest training date first.
One module completed within a Driver CPC training period.
object
The module record identifier.
The training period the module belongs to. Null only for a legacy row that was never attached to one.
The date the module was taken.
Where it was taken.
What the module covered.
The hours it counted for.
Example
{ "workerId": 4821, "trainingId": 4410, "totalHoursCompleted": 21, "modules": [ { "trainingDetailsId": 8815, "trainingId": 4410, "trainingDate": "2024-02-19", "trainingCentre": "Northgate Driver Training, Salford", "module": "Tachograph rules and driver hours", "hoursCompleted": 7 } ]}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"}
