submit_job method
decoded_version_of_api_key in the sample code below must be striped of the BEGIN and END line and the rest needs to be all on one line
​
Copy this code and replace sections marked with <>
try {PartnerParameters partnerParameters = new PartnerParameters(new PartnerParameters(<String user_id>, <String job_id>, <Integer job_type>);partnerParameters.add("optional_info", "some optional info");// Note dob is only required for VOTER_ID, DRIVERS_LICENSE, NATIONAL_ID, TIN, and CAC. For the rest of the id types you can send through dob as null or empty.IDParameters idInfo = new IDParameters(<String firstName>, <String middleName>, <String lastName>, <String country>, <String idType>, <String idNumber>, <String dob>, <String phoneNumber>, <String entered>);// Create image list// Set the imageTypeId as an Integer using the following table// 0 - Selfie image jpg or png// 1 - ID card image jpg or png// 2 - Selfie image jpg or png base64 encoded// 3 - ID card image jpg or png base 64 encodedImageParameters imageParameters = new ImageParameters();imageParameters.add(<Integer imageTypeId>, <String downloadPath or base64>);Options options = new Options(<String optionalCallback>, <String returnJobStatus>, <String returnHistory>, <String returnImages>);WebApi connection = new WebApi(<String partnerId>, <String callback>, <String the decoded-version of-your-api-key>, <Integer sidServer>);String response = connection.submit_job(partnerParameters.get(), imageParameters.get(), idInfo.get(), options.get());System.out.println("\n Response" + response);​} catch (Exception e) {e.printStackTrace();throw e;}
Response:
Should you choose to set return_job_status to false, the response will be a JSON String containing:
{success: true, smile_job_id: smile_job_id}
However, if you have set return_job_status to true (with image_links and history) then you will receive JSON Object response like below:
{"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":"...","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"}
You can also view your response asynchronously at the callback that you have set, it will look as follows:
{"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"}