Record a conviction against a worker's licence
const url = 'https://api2.recruso.co.uk/v1/workers/1/licences/1/convictions';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"workerId":4821,"licenceId":5120,"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 POST \ --url https://api2.recruso.co.uk/v1/workers/1/licences/1/convictions \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "workerId": 4821, "licenceId": 5120, "convictionCodeId": 12, "convictedDate": "2025-03-18", "convictionExpiryDate": "2029-03-17", "licencePoints": 3, "convictionNotes": "Speeding on the M60; fixed penalty accepted." }'Records a driving conviction against one of a worker’s licences in your own agency.
A conviction is against the licence, not against the person: it is nested under the licence, and removing that licence removes its convictions too.
ConvictionCodeId must be an id from the platform Driving conviction codes vocabulary; one that does not exist returns 400. ConvictionExpiryDate must not be before ConvictedDate, and LicencePoints cannot be negative.
A worker or licence belonging to another agency returns 404 rather than 403, so its existence is never disclosed.
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
Request Bodyrequired
Section titled “Request Bodyrequired”A conviction to record against one of a worker’s licences.
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 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”Created
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"}
