0.0.6 • Published 6 years ago

node-checkr v0.0.6

Weekly downloads
28
License
-
Repository
github
Last release
6 years ago

node-checkr

Note: This client is in alpha stage

Node Checkr is an unofficial, promise-based client for interacting with the Checkr.io platform.

Documentation for the Checkr API can be found here.

Getting started

yarn add node-checkr

Create a new account with Checkr and get you API_key from you account's settings.

import checkr from 'node-checkr';
const Checkr = new checkr(API_KEY);

Objects

Candidates

create(params)

Creates a candidate do run screenings on. Required parameters might change with the screening to be run. Check the official docs for details.

Supported params:

ParamTypeRequiredNotes
first_namestringx
middle_namestring
last_namestringx
emailstringx
phonealpha-numeric
zipcodealpha-numeric
dobstringdate of birth
ssnalpha-numeric
driver_license_numberstring
driver_license_statestring
  checkr.Candidates
    .create({
      first_name: 'John',
      middle_name: 'Smith',
      email: 'j.doe@gmail.com',
      last_name: 'Doe',
      dob: '1970-01-22',
      driver_license_number: 'F211165',
      driver_license_state: 'CA'
    })
    .then(candidate => console.log(candidate))
    .catch(err => console.log(err));
update(id, params)

Updates a candidate's information, given the id. Same params as createCandidate.

  checkr.Candidates
    .update('ABC123', {
      first_name: 'John',
      last_name: 'Doe',
    })
    .then(res => console.log(res))
    .catch(err => console.log(err));

Screenings

ssn_trace(id)

Retrieves an existing SSN trace.

  checkr.Screenings
    .ssn_trace('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
sex_offender(id)

Retrieves an existing Sex Offender search.

  checkr.Screenings
    .sex_offender('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
global_watchlist(id)

Retrieves an existing global watchlist search.

  checkr.Screenings
    .global_watchlist('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
national_criminal(id)

Retrieves an existing national criminal search.

  checkr.Screenings
    .national_criminal('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
county_criminal(id)

Retrieves an existing county criminal search.

  checkr.Screenings
    .county_criminal('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
state_criminal(id)

Retrieves an existing state criminal search.

  checkr.Screenings
    .state_criminal('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
motor_vehicle(id)

Retrieves an existing Motor Vehicle Report.

  checkr.Screenings
    .motor_vehicle('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
education_verifications(id)

Retrieves an existing education verification.

  checkr.Screenings
    .education_verifications('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
employment_verifications(id)

Retrieves an existing employment verification.

  checkr.Screenings
    .employment_verifications('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));

Packages

list()

Returns the list of packages available on your account.

  checkr.Packages
    .list()
    .then(res => console.log(res))
    .catch(err => console.log(err));
retrieve(id)

Retrieves a particular package, given the id.

  checkr.Packages
    .retrieve('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
create(params)

Creates a package. Required parameters might change, check the official docs for details.

Supported params:

ParamTypeRequired
namestringx
slugstringx
screeningsArray(screenings)x
  checkr.Packages
    .create({
      name: 'Motor Vehicle Report',
      slug: 'mvr_only',
      screenings: [{ type: 'motor_vehicle_report', subtype: null }]
    })
    .then(res => console.log(res))
    .catch(err => console.log(err));

Reports

retrieve(id)

Retrieves a particular report, given the id.

  checkr.Reports
    .retrieve('ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
create(package_slug, candidate_id)

Creates a report for the candidate specified, using the package.

  checkr.Reports
    .create('mvr_only', 'ABC123')
    .then(res => console.log(res))
    .catch(err => console.log(err));
update(id, params)

Updates a report.

Supported params:

ParamType
packagestring
adjudicationstring

Either package or adjudication is required.

  checkr.Packages
    .update('ABC123', {
      package: 'mvr_only'
    })
    .then(res => console.log(res))
    .catch(err => console.log(err));

To do

  • Tests for screenings

Testing & Development

  • Clone repository
  git clone https://github.com/franciscofsales/node-checkr.git
  • Install dependencies
  yarn install
  • Setup API Key
  • copy .env.example into .env and input your API key.
  • Run test set
  yarn run test

Develop and keep tests green.

NOTE: packages cannot be created multiple times with the same slug, take that into account on package related tests.

License

This Library is licensed under the MIT license.

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago