Skip to content

Record a module against a Driver CPC training period

POST
/v1/workers/{workerId}/cpc-training/{trainingId}/modules
curl --request POST \
--url https://api2.recruso.co.uk/v1/workers/1/cpc-training/1/modules \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "workerId": 4821, "trainingId": 4410, "trainingDate": "2024-02-19", "trainingCentre": "Northgate Driver Training, Salford", "module": "Drivers'\'' hours and tachograph rules", "hoursCompleted": 7 }'

Records a module a worker in your own agency has completed within one of their Driver CPC training periods — when it was taken, where, what it covered and how many hours it counted for.

A module belongs to the period, not to the worker: it is nested under the period, and removing that period removes its modules too. The hours are summed onto the period, so they are how far through the periodic training the worker is.

TrainingDate is required. Nothing here checks the date falls inside the period, or that the hours stay under the total the training requires: both are matters of record rather than rules this API invents.

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.

workerId
required
integer format: int32

The workerId path parameter

trainingId
required
integer format: int32

The trainingId path parameter

Media typeapplication/json

A module to record against a Driver CPC training period.

object
workerId

The worker the period belongs to. Taken from the route; a value in the request body is ignored.

integer format: int32
Example
4821
trainingId

The training period the module belongs to. Taken from the route; a value in the request body is ignored.

integer format: int64
Example
4410
trainingDate

The date the module was taken. Required — the column is NOT NULL.

string format: date
Example
2024-02-19
trainingCentre

Where it was taken, up to 255 characters.

string
nullable
Example
Northgate Driver Training, Salford
module

What the module covered, up to 255 characters.

string
nullable
Example
Drivers' hours and tachograph rules
hoursCompleted

The hours it counted for, to two decimal places.

number format: double
nullable
Example
7

Created

Media typeapplication/json

The module as recorded.

object
trainingDetailsId

The module record identifier.

integer format: int64
trainingId

The training period the module belongs to. Null only for a legacy row that was never attached to one.

integer format: int64
nullable
trainingDate

The date the module was taken.

string format: date
trainingCentre

Where it was taken.

string
nullable
module

What the module covered.

string
nullable
hoursCompleted

The hours it counted for.

number format: double
nullable
Example
{
"trainingDetailsId": 8815,
"trainingId": 4410,
"trainingDate": "2024-02-19",
"trainingCentre": "Northgate Driver Training, Salford",
"module": "Tachograph rules and driver hours",
"hoursCompleted": 7
}

Bad Request

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Unauthorized

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Forbidden

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}

Not Found

Media typeapplication/problem+json
object
type
string
nullable
title
string
nullable
status
integer format: int32
nullable
detail
string
nullable
instance
string
nullable
Examplegenerated
{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}