Skip to content

Update one of a worker's Driver CPC training periods

PUT
/v1/workers/{workerId}/cpc-training/{id}
curl --request PUT \
--url https://api2.recruso.co.uk/v1/workers/1/cpc-training/1 \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "workerId": 4821, "id": 4410, "trainingFrom": "2021-09-10", "trainingUntil": "2026-09-09", "completedByRequiredDate": false }'

Replaces a Driver CPC training period for a worker in your own agency — the dates it runs between, and whether the required hours were completed in time.

The modules recorded in the period are left exactly as they are. Marking the period complete does not check the hours: that is a judgement the agency makes, and the hours are reported alongside it so a reader can see both.

A period that belongs to a different worker, or to 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

id
required
integer format: int32

The id path parameter

Media typeapplication/json

The replacement values for a training period already recorded. The modules within it are not touched.

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
id

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

integer format: int64
Example
4410
trainingFrom

The date the period starts. Required.

string format: date
Example
2021-09-10
trainingUntil

The date the period runs to. Required, and must not be before the start date — both columns are NOT NULL.

string format: date
Example
2026-09-09
completedByRequiredDate

Whether the required hours were completed within the period.

boolean
nullable
Example
false

OK

Media typeapplication/json
object
trainingId

The training period identifier.

integer format: int64
trainingFrom

The date the period starts.

string format: date
trainingUntil

The date the period runs to.

string format: date
completedByRequiredDate

Whether the required hours were completed within the period.

boolean
nullable
moduleCount

How many modules have been recorded in the period.

integer format: int32
totalHoursCompleted

The hours recorded across those modules.

number format: double
Example
{
"trainingId": 4410,
"trainingFrom": "2021-09-10",
"trainingUntil": "2026-09-09",
"completedByRequiredDate": false,
"moduleCount": 3,
"totalHoursCompleted": 21
}

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