LogoLogo
  • Welcome!
  • GETTING STARTED
    • Signing Up
    • Choose a Product
    • Choose an Integration Option
    • Run Your First Test Job
    • Complete Your KYC
    • Fund Your Wallet
    • Go Live!
    • Pricing
  • SUPPORTED ID TYPES & DOCUMENTS
    • For Individuals (KYC)
      • Using ID Number
        • Supported Countries
          • Côte d'Ivoire
            • National ID (without Photo)
            • Resident ID (without Photo)
          • Ghana
            • Ghana Card
            • Ghana Card (without Photo)
            • Passport
            • Voter's ID
          • Kenya
            • Alien Card
            • KRA Pin
            • National ID
            • National ID (without Photo)
            • Passport
            • Tax Information
          • Nigeria
            • Bank Account
            • BVN
            • NIN V2
            • NIN Slip Verification
            • V_NIN (Virtual NIN)
            • Phone Number
            • Voter's ID
          • South Africa
            • National ID
            • National ID (without Photo)
            • Phone Number
            • Refugee and Asylum ID
          • Uganda
            • National ID (without Photo)
            • Basic KYC in Uganda
          • Zambia
            • Bank Account
            • TPIN
          • Zimbabwe
            • National ID (without Photo)
        • Test Data
          • Customising Sandbox Test Data
        • ID Number Regex
        • Visual Samples of Supported ID Types
      • Using Document Image
        • Continents
          • Africa
          • Asia and the Middle East
          • Europe
          • North America
          • Oceania
          • South America
    • For Businesses (KYB)
      • Supported Countries
        • Nigeria
          • Business Registration
          • Tax Information
        • Kenya
          • Business Registration
        • South Africa
          • Business Registration
      • ID Number Regex
  • PRODUCTS
    • For Individuals (KYC)
      • AML Check
        • AML News Media
      • Basic KYC
      • Biometric KYC
      • Digital Address Verification
      • Document Verification
        • Document Verification
        • Enhanced Document Verification
      • Electronic Signature
      • Enhanced KYC
      • Phone Number Verification
      • SmartSelfie™ Authentication
      • SmartSelfie™ Compare
      • Smile Secure
    • For Businesses (KYB)
      • Business Verification
  • Integration Options
    • Mobile
      • Getting Started
      • Products
        • Biometric KYC
        • BVN Consent
        • Document Verification
        • Enhanced Document Verification
        • Enhanced KYC
        • SmartSelfie™ Enrollment and Authentication
        • Enhanced SmartSelfie™ Enrollment And Authentication
      • Customization
        • UI Components
      • Offline Mode
      • Release Notes
        • Android Release Notes
        • iOS Release Notes
        • Flutter Release Notes
        • React Native Release Notes
    • No-Code
      • Smile Links
        • Link FAQs
        • Rest API
    • Server to Server
      • Ruby
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • SmartSelfie™ Authentication
          • KYB - Business Verification
          • AML Check
        • Generate Token for Web Integration
        • Utilities
      • Python
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • SmartSelfie™ Authentication
          • Business Verification
        • Generate Token for Web Integration
        • Utilities
      • Java
        • Release Notes
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • SmartSelfie™ Authentication
        • Generate Token for Web Integration
        • Utilities
      • Node.js
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • Enhanced Document Verification
          • SmartSelfie™ Authentication
          • Business Verification
        • Generate Token for Web Integration
        • Utilities
      • PHP
        • Installation
        • Signature
        • Products
          • Basic KYC
          • Enhanced KYC
          • Biometric KYC
          • Document Verification
          • SmartSelfie™ Authentication
        • Generate Token for Web Integration
        • Utilities
    • Rest API
      • Signing your API Request
        • Using Signature
      • Products
      • Postman Collection
      • Utilities
    • Web / Mobile Web
      • Web Integration
        • Installation
        • Usage
        • End User Consent
        • Support
      • Javascript SDK
        • Installation
        • Usage
        • Migration
        • Deprecated Version
          • Installation
          • Usage
          • Notes
          • Support
  • FURTHER READING
    • FAQs
      • What are your support hours?
      • How do I set up a callback?
      • How to re-enroll, deactivate or delete a user?
      • Add or remove team members
      • What are top-level keys?
      • What are partner_params?
      • How do job types map to the new product names?
      • Is there an API I can use to monitor my wallet balance?
      • Is there an API I can query to check the availability status of an ID type?
      • How do I integrate Smile ID in other countries or query other ID types?
      • What are the image types I can upload to Smile ID?
      • Why aren't Kenyan IDs returning images for some IDs queried?
      • Why are some of my bank verification requests returning 'ID authority unavailable'?
      • How can I look up a specific user's data?
      • Selfie best-practices
      • Document capture best-practices
      • What happens under the hood?
      • Guide to the user consent screen
      • What is code 2302?
      • Using the Demo App and Scanning QR codes
    • Job status
    • KYC receipts
    • Result codes
      • Error codes
    • Securing your account with two-factor authentication (2FA)
    • Security Overview
    • Troubleshooting
      • Troubleshooting error 2204 & 2205 - "You're not authorized to do that"
      • Why is my Web API job taking so long?
      • Image capture issues on web client
Powered by GitBook
On this page
  • Job Status
  • Example Response

Was this helpful?

  1. Integration Options
  2. Server to Server
  3. Node.js

Utilities

Required Class: Utilities 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 (this is only available on the Enhanced KYC and Biometric KYC 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:

const smileIdentityCore = require("smile-identity-core");
const Utilities = smileIdentityCore.Utilities;

// Initialize
let partner_id = '<Put your partner ID here>'; //login to the Smile ID portal to view your partner id
let api_key = '<Put your API key here>'; // copy your API key from the Smile ID portal
let sid_server = '<0 | 1>'; // Use '0' for the sandbox server, use '1' for production server

const utilities_connection = new Utilities(partner_id, api_key, sid_server);

// Set options for the job status
let options = {
  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.
  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.
  signature: true
};

// Get the job status
// This method returns a promise
let user_id = '<put the user_id of the user whose job(s) results you want to retrieve>';
let job_id = '<put the job_id of the job you want to retrieve its results>';

response = utilities_connection.get_job_status(user_id, job_id, options)

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:

{
  "job_success": true,
  "result": {
    "ConfidenceValue": "99",
    "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",
    "PartnerParams": {
      "job_type": "1",
      "optional_info": "Your additional tracking information",
      "user_id": "HBBBBBBH57g",
      "job_id": "HBBBBBBHg"
    },
    "Source": "WebAPI",
    "ResultCode": "0810",
    "SmileJobID": "0000001111"
  },
  "code": "2302",
  "job_complete": true,
  "signature": "...",
  "history": [
    {
      "ConfidenceValue": "99",
      "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",
      "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"
}
PreviousGenerate Token for Web IntegrationNextPHP

Last updated 8 months ago

Was this helpful?