Skip to content

Correct a module in a Driver CPC training period

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

Corrects a module already recorded within one of a worker’s Driver CPC training periods in your own agency.

This is a full replacement of that one module, not a partial merge: a field you omit is set to null. A module cannot be moved to a different period — record it against the right one and remove the wrong one.

A module that belongs to a different period, a different worker, or another agency returns 404 rather than 403. modifiedBy and modifiedOn are set from your credentials and the current UK local time.

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

id
required
integer format: int32

The id path parameter

Media typeapplication/json

The replacement values for a module already recorded. Every field is written from the request, so a field you omit is set to null.

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
id

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

integer format: int64
Example
8815
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

OK

Media typeapplication/json

The module as it now stands.

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"
}