Core - License Documents To Validate
Module dedicated to the validation of the end users’ license documents.
The base url for the APIs in this page is at:
/api/admin
A JSON file with OpenAPI data about all core-related admin APIs can be downloaded here
.
Get license documents to be validated
Gets the list of license documents to validate (it’s a Paged List APIs, as explained in the introduction):
- GET /v1/to-validate/list
Gets the list of license documents to validate
- Status Codes
200 OK – Success
The request will return the list of the license documents (those contained in the current page only) to be validated filtered by the page settings:
[
{
"ID": 13, // Int
"UserID": 2070, // Int
"UserName": "mail@test.com", // String
"Type": 0, // Int
"LicenseNumber": "License number", // String
"IssuingAuthorityID": 7, // Int
"IssuingAuthority": "Authority name", // String
"Category": "Authority code", // String
"EquivalentCategory": null, // String (nullable)
"CreatedDate": "2019-10-25T10:15:58Z", // DateTime
"IssueDate": "2019-10-25T10:15:42Z", // DateTime
"ExpiryDate": "2019-10-25T10:15:44Z", // DateTime (nullable)
"LastValidationDate": null, // DateTime (nullable)
"IsValid": null, // Boolean (nullable)
"IsDeletable": false, // Boolean
"Attachments": [ // Guid Array
"fa24ac54-5bcb-47c4-9258-8cd337fef592",
"50eac5ea-b5b3-4881-8455-f975a5bd9732",
...
],
"Notes": null, // String (nullable)
"Guid": "2c26424e-9025-4ee4-80e1-f81e5899daa2" // Guid
},
...
]
Value of the Types
property can be one of the LicenseDocumentType enumeration.
The IsValid
property is always to null, since whent it is valorized the license document is not
marked as “to be validated” anymore.
Validate License document
Persists a validation attempt for a license document:
- POST /v1/to-validate/validate
Persists a validation attempt for a license document
- Status Codes
200 OK – Success
The format of the request is the following:
{
ID: 1234, // Int
EquivalentCategory: "B", // String (nullable)
Notes: "Additional notes", // String (nullable)
IsValid: true // Boolean
}
where ID
is the id of the license document record that will be validated, and must correspond to an existing document in order to proceed with the validation, otherwise will return a negative Json response.
The field EquivalentCategory
is required when passing IsValid
as true, while Notes
is required while passing IsValid
to false.
If the validation process is successful, the request will return a positive Json response.
Possible error messages during the validation are:
err_AlreadyValidated
The driving license record has already been validated
err_InvalidElement
The document is marked as valid and the
EquivalentCategory
field is not set, or the document is marked as not valid and theNotes
field is not set