Skip to content

Add a driving licence to a worker

POST
/v1/workers/{workerId}/licences
curl --request POST \
--url https://api2.recruso.co.uk/v1/workers/1/licences \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "workerId": 4821, "licenceNumber": "BAKER905124A99AB", "issueDate": "2019-06-03", "expiryDate": "2029-06-02", "issueNumberChecked": true }'

Records a driving licence against a worker in your own agency.

The licence number is unique across your whole agency, not just across this worker: a number already recorded returns 400, and the reply does not say which worker holds it. ExpiryDate must not be before IssueDate.

Convictions are recorded against the licence rather than against the worker, and are managed through the licence’s own convictions operations.

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 driving licence to record against a worker.

object
workerId

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

integer format: int32
Example
4821
licenceNumber

The licence number, up to 50 characters. Required, and unique across your whole agency — two workers cannot hold the same licence number.

string
Example
BAKER905124A99AB
issueDate

The date the licence was issued.

string format: date
nullable
Example
2019-06-03
expiryDate

The date the licence expires. Must not be before the issue date.

string format: date
nullable
Example
2029-06-02
issueNumberChecked

Whether the issue number has been checked against the DVLA record.

boolean
nullable
Example
true

Created

Media typeapplication/json
object
workerLicenceId

The licence record’s identifier.

integer format: int64
licenceNumber

The licence number.

string
issueDate

The date the licence was issued.

string format: date
nullable
expiryDate

The date the licence expires.

string format: date
nullable
issueNumberChecked

Whether the issue number has been checked against the DVLA record.

boolean
nullable
convictionCount

How many convictions are recorded against this licence.

integer format: int32
Example
{
"workerLicenceId": 5120,
"licenceNumber": "BAKER905124A99AB",
"issueDate": "2019-06-03",
"expiryDate": "2029-06-02",
"issueNumberChecked": true,
"convictionCount": 1
}

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