Utilities
Required Class: SmileIdentityCore Class

Job Status

The job status endpoint lets you retrieve information about jobs you have ran previously. With the job status endpoint, you can get the job results, submitted selfie and liveness images, and the ID response (only available on the Enhanced KYC and Enhanced KYC + SmartSelfie™ products).
If you are querying job status for a job immediately after submitting it, you might need to keep polling job status till you get a result. We recommend you always submit your job with a callback.
To run job status for a job, you can edit the sample code below:
1
<?php
2
require 'vendor/autoload.php';
3
4
// Initialize
5
$partner_id = "<Put your partner ID here>"; // login to the Smile Identity portal to view your partner id
6
$default_callback = "";
7
$api_key = "<Put your API key here>"; // copy your API key from the Smile Identity portal
8
$sid_server = "<0 or 1>"; // Use '0' for the sandbox server, use '1' for production server
9
10
$connection = new SmileIdentityCore(
11
$partner_id,
12
$default_callback,
13
$api_key,
14
$sid_server
15
);
16
17
//Set the job whose result you want to retrieve
18
$partner_params = array(
19
'job_id' => "<put the job_id of the job you want to retrieve its results>",
20
'user_id' => "<put the user_id of the user whose job(s) results you want to retrieve>"
21
);
22
23
// Set options for the job status
24
$options = array(
25
"return_history" => <true | false>, // Set to true to return results of all jobs you have ran for the user in addition to current job result. You must set return_job_status to true to use this flag.
26
"return_image_links" => <true | false>, // Set to true to receive selfie and liveness images you uploaded. You must set return_job_status to true to use this flag.
27
"signature" => true
28
);
29
30
// Get the job status
31
// This method returns a json array
32
$response = $connection->get_job_status($partner_params, $options);
33
?>
Copied!

Example Response

If you set both return_history and return_image_links to true, you will receive the JSON object containing the result like below:
1
{
2
"job_success": true,
3
"result": {
4
"ConfidenceValue": "99",
5
"JSONVersion": "1.0.0",
6
"Actions": {
7
"Verify_ID_Number": "Verified",
8
"Return_Personal_Info": "Returned",
9
"Human_Review_Update_Selfie": "Not Applicable",
10
"Human_Review_Compare": "Not Applicable",
11
"Update_Registered_Selfie_On_File": "Not Applicable",
12
"Liveness_Check": "Not Applicable",
13
"Register_Selfie": "Approved",
14
"Human_Review_Liveness_Check": "Not Applicable",
15
"Selfie_To_ID_Authority_Compare": "Completed",
16
"Selfie_To_ID_Card_Compare": "Not Applicable",
17
"Selfie_To_Registered_Selfie_Compare": "Not Applicable"
18
},
19
"ResultText": "Enroll User",
20
"IsFinalResult": "true",
21
"IsMachineResult": "true",
22
"ResultType": "SAIA",
23
"PartnerParams": {
24
"job_type": "1",
25
"optional_info": "Your additional tracking information",
26
"user_id": "HBBBBBBH57g",
27
"job_id": "HBBBBBBHg"
28
},
29
"Source": "WebAPI",
30
"ResultCode": "0810",
31
"SmileJobID": "0000001111"
32
},
33
"code": "2302",
34
"job_complete": true,
35
"signature": "...",
36
"history": [
37
{
38
"ConfidenceValue": "99",
39
"JSONVersion": "1.0.0",
40
"Actions": {
41
"Verify_ID_Number": "Verified",
42
"Return_Personal_Info": "Returned",
43
"Human_Review_Update_Selfie": "Not Applicable",
44
"Human_Review_Compare": "Not Applicable",
45
"Update_Registered_Selfie_On_File": "Not Applicable",
46
"Liveness_Check": "Not Applicable",
47
"Register_Selfie": "Approved",
48
"Human_Review_Liveness_Check": "Not Applicable",
49
"Selfie_To_ID_Authority_Compare": "Completed",
50
"Selfie_To_ID_Card_Compare": "Not Applicable",
51
"Selfie_To_Registered_Selfie_Compare": "Not Applicable"
52
},
53
"ResultText":" Enroll User",
54
"IsFinalResult": "true",
55
"IsMachineResult": "true",
56
"ResultType": "SAIA",
57
"PartnerParams": {
58
"job_type": "1",
59
"optional_info": "we are one",
60
"user_id": "HBBBBBBH57g",
61
"job_id": "HBBBBBBHg"
62
},
63
"Source": "WebAPI",
64
"ResultCode": "0810",
65
"SmileJobID": "0000001111"
66
}
67
],
68
"image_links": {
69
"selfie_image": "image_link"
70
},
71
"timestamp": "2019-10-10T12:32:04.622Z"
72
}
Copied!