get_job_status method
Sometimes, you may want to get a particular job status at a later time. You may use the get_job_status function to do this:
You will already have your Web Api class initialised as follows:
connection = new WebApi(partner_id, default_callback, api_key, sid_server);
Thereafter, simply call get_job_status with the correct parameters:
response = connection.get_job_status(partner_params, options)where options is {return_history: true | false, return_image_links: true | false}
Please note that if you do not need to pass through options if you will not be using them, you may omit pass through an empty hash or nil instead:
response = connection.get_job_status(partner_params, options);// where options is {return_history: true | false, return_images: true | false}
Example Response
Your response will return a promise that contains a JSON Object below (with image_links and history included):
{"job_success":true,"result":{"ConfidenceValue":"99","JSONVersion":"1.0.0","Actions":{"Verify_ID_Number":"Verified","Return_Personal_Info":"Returned","Human_Review_Update_Selfie":"Not Applicable","Human_Review_Compare":"Not Applicable","Update_Registered_Selfie_On_File":"Not Applicable","Liveness_Check":"Not Applicable","Register_Selfie":"Approved","Human_Review_Liveness_Check":"Not Applicable","Selfie_To_ID_Authority_Compare":"Completed","Selfie_To_ID_Card_Compare":"Not Applicable","Selfie_To_Registered_Selfie_Compare":"Not Applicable"},"ResultText":"Enroll User","IsFinalResult":"true","IsMachineResult":"true","ResultType":"SAIA","PartnerParams":{"job_type":"1","optional_info":"we are one","user_id":"HBBBBBBH57g","job_id":"HBBBBBBHg"},"Source":"WebAPI","ResultCode":"0810","SmileJobID":"0000001111"},"code":"2302","job_complete":true,"signature":"HKBhxcv+1qaLy\C7PjVtk257dE=|1577b051a4313ed5e3e4d29893a66f966e31af0a2d2f6bec2a7f2e00f2701259","history":[{"ConfidenceValue":"99","JSONVersion":"1.0.0","Actions":{"Verify_ID_Number":"Verified","Return_Personal_Info":"Returned","Human_Review_Update_Selfie":"Not Applicable","Human_Review_Compare":"Not Applicable","Update_Registered_Selfie_On_File":"Not Applicable","Liveness_Check":"Not Applicable","Register_Selfie":"Approved","Human_Review_Liveness_Check":"Not Applicable","Selfie_To_ID_Authority_Compare":"Completed","Selfie_To_ID_Card_Compare":"Not Applicable","Selfie_To_Registered_Selfie_Compare":"Not Applicable"},"ResultText":"Enroll User","IsFinalResult":"true","IsMachineResult":"true","ResultType":"SAIA","PartnerParams":{"job_type":"1","optional_info":"we are one","user_id":"HBBBBBBH57g","job_id":"HBBBBBBHg"},"Source":"WebAPI","ResultCode":"0810","SmileJobID":"0000001111"}],"image_links":{"selfie_image":"image_link"},"timestamp":"2019-10-10T12:32:04.622Z"}