Correct a conviction against a worker's licence
const url = 'https://api2.recruso.co.uk/v1/workers/1/licences/1/convictions/1';const options = { method: 'PUT', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"workerId":4821,"licenceId":5120,"id":7740,"convictionCodeId":12,"convictedDate":"2025-03-18","convictionExpiryDate":"2029-03-17","licencePoints":3,"convictionNotes":"Speeding on the M60; fixed penalty accepted."}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api2.recruso.co.uk/v1/workers/1/licences/1/convictions/1 \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "workerId": 4821, "licenceId": 5120, "id": 7740, "convictionCodeId": 12, "convictedDate": "2025-03-18", "convictionExpiryDate": "2029-03-17", "licencePoints": 3, "convictionNotes": "Speeding on the M60; fixed penalty accepted." }'Corrects a conviction already recorded against one of a worker’s licences in your own agency.
This is a full replacement of that one conviction, not a partial merge: a field you omit is set to null. A conviction cannot be moved to a different licence — record it against the right one and remove the wrong one.
ConvictionCodeId must be an id from the platform Driving conviction codes vocabulary; one that does not exist returns 400.
A conviction that belongs to a different licence, 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; they are not taken from the request.
Access. Requires a client-credentials access token. Tokens issued through the interactive user login are rejected.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The workerId path parameter
The licenceId path parameter
The id path parameter
Request Bodyrequired
Section titled “Request Bodyrequired”The replacement values for a conviction already recorded. Every field is written from the request, so a field you omit is set to null.
object
The worker the licence belongs to. Taken from the route; a value in the request body is ignored.
Example
4821The licence the conviction is against. Taken from the route; a value in the request body is ignored.
Example
5120The conviction to update. Taken from the route; a value in the request body is ignored.
Example
7740The offence, as an id from the platform Driving conviction codes vocabulary. Required.
Example
12The date of the conviction.
Example
2025-03-18The date the conviction drops off the licence. Must not be before the conviction date.
Example
2029-03-17The penalty points the conviction carries.
Example
3Anything else recorded about the conviction.
Example
Speeding on the M60; fixed penalty accepted.Responses
Section titled “Responses”OK
object
The conviction record’s identifier.
The licence the conviction is against.
The offence, as an id from the platform Driving conviction codes vocabulary.
The date of the conviction.
The date the conviction drops off the licence.
The penalty points the conviction carries.
Anything else recorded about the conviction.
Example
{ "workerConvictionId": 7740, "workerLicenceId": 5120, "convictionCodeId": 12, "convictedDate": "2025-03-18", "convictionExpiryDate": "2029-03-17", "licencePoints": 3, "convictionNotes": "Speeding on the M60; fixed penalty accepted."}Bad Request
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Unauthorized
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Forbidden
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}Not Found
object
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}
