Skip to content

Add a Driver CPC entitlement to a worker

POST
/v1/workers/{workerId}/cpc-licence-categories
curl --request POST \
--url https://api2.recruso.co.uk/v1/workers/1/cpc-licence-categories \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "workerId": 4821, "vehicleCategoryId": 2, "validFrom": "2021-09-10", "validUntil": "2026-09-09" }'

Records a vehicle class a worker in your own agency holds Driver CPC entitlement for, and the period it runs.

This is not the same as the worker’s vehicle categories, which say what they can drive: this says what their CPC covers and until when. Both dates are required — the columns are NOT NULL — and ValidUntil must not be before ValidFrom.

Entitlements accumulate rather than replace one another: a renewed CPC is a new record for the same class with a later period, which is what keeps the history of what the worker was entitled to when.

VehicleCategoryId must be an id from the platform Vehicle categories vocabulary; one that does not exist returns 400. 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.

workerId
required
integer format: int32

The workerId path parameter

Media typeapplication/json

A Driver CPC entitlement to record for a worker.

object
workerId

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

integer format: int32
Example
4821
vehicleCategoryId

The vehicle class, as an id from the platform Vehicle categories vocabulary. Required.

integer format: int16
Example
2
validFrom

The date the entitlement starts. Required.

string format: date
Example
2021-09-10
validUntil

The date the entitlement runs to. Required, and must not be before the start date — both columns are NOT NULL, so a CPC entitlement always has an end.

string format: date
Example
2026-09-09

Created

Media typeapplication/json
object
driverCpcLicenceCategoryId

The record’s identifier.

integer format: int64
vehicleCategoryId

The vehicle class, as an id from the platform Vehicle categories vocabulary.

integer format: int16
validFrom

The date the entitlement starts.

string format: date
validUntil

The date the entitlement runs to.

string format: date
Example
{
"driverCpcLicenceCategoryId": 3310,
"vehicleCategoryId": 2,
"validFrom": "2021-09-10",
"validUntil": "2026-09-09"
}

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