Skip to content

Update one of a worker's driving licences

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

Replaces a driving licence held by a worker in your own agency.

This is a full replacement of that one licence, not a partial merge: a field you omit is set to null. The convictions recorded against the licence are left exactly as they are.

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

A licence 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; they are not taken from the request.

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 licence already held. Every field is written from the request, so a field you omit is set to null. The convictions recorded against the licence are untouched.

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
id

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

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

OK

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