Getting the verification result
Register an url
MobbScan allows you to be notified when an agent changes the status of a verification. To perform this notification, you will have to provide a url to allow MobbScan to send the notification.
This url should implement an endpoint with a post request and should have the following object request as body input:
{
"verificationId": "YOUR_VERIFICATION_ID",
"status": "VERIFIED | NOT_VERIFIED | PENDING"
}
Note: To register your url for this service you have to get in touch with mobbeel's team to register it on your mobbscan-agent instance.
Checking if verification process has finished
Sometimes, if your process involves more steps after a document has been scanned (like a video conference or some kind of human verification of your data), you may need to get the result of the complete process (not only the scanned data) at the final step.
MobbScanAPI.getInstance().checkVerificationProcessResult(scanId) {
override public void onVerificationProcessFinished(MobbScanVerificationProcessResult result, MobbScanVerificationProcessResultData resultData, MobbScanAPIError error) {
// Your listener code here...
}
});
MobbScanAPI.getInstance().checkVerificationProcessResult(scanId, new MobbScanVerificationProcessResultListener() {
@Override
public void onVerificationProcessFinished(MobbScanVerificationProcessResult result, MobbScanVerificationProcessResultData resultData, MobbScanAPIError error) {
// Your listener code here...
}
});
This method will return the status immediately with the result VERIFIED
, NOT_VERIFIED
, depending of the verification outcome, PENDING
if the verification is still not finished, or ERROR
if something went wrong.
Retrieving evidences of the verification process
Once the verification is done, all evidences of the process (including OCR result, document images, face pictures, video recordings, ect) will be available using the getVerificationProcessResult
call of the REST API:
method | url |
---|---|
GET | https://youragentinstance.yourcompany.com/getVerificationProcessData/{verificationId}.json |
This API is private, so you will need to add Basic HTTP headers with user / password credentials.
The possible responses are:
Success
Will return the HTTP Code 200
and the body of the response will be something like this:
{
"code": "OK",
"description": "GET_VERIFICATION_PROCESS_DATA_SUCCESS",
"scanId": "",
"verificationResult": "PENDING | VERIFIED | NOT_VERIFIED",
"licenseId": "",
"agent": "",
"document": {
"documentType": "",
"personalNumber": "",
"documentNumber": "",
"name": "",
"surname": "",
"firstSurname": "",
"secondSurname": "",
"gender": "",
"nationality": "",
"dateOfBirth": "",
"dateOfExpiry": "",
"address": "",
"city": "",
"region": "",
"cityOfBirth": "",
"regionOfBirth": "",
"stateOfBirthName": "",
"facialMatchingScore": ""
},
"images": [
{
"imageType": "",
"url": ""
}
],
"recordings": [
{
"recordingType": "video_conference",
"url": ""
}
],
"extraParameters": [
{
"parameterName": "",
"parameterValue": ""
}
],
"extraImages": [],
"validations": {
"success": [
""
],
"failed": [
""
],
"notChecked": [
""
]
},
"pdfUrl": "/api/pdf/..."
}
Note: Images and recordings are not directly returned in the response for size reasons, as some of them may contain large files. You can get the actual files by just making a
GET
request to the specific URL for each file.
Failure
Will return the HTTP Code 200
and the body of the response will be something like this:
{
"code": "ERROR",
"description": "ERROR_SCAN_ID_DOES_NOT_EXIST",
}