on-demand-client
v1.0.3
Published
The Sterling On Demand API allows you to integrate background checks into your platform and manage the process from end-to-end.
Downloads
9
Readme
on-demand-client
The Sterling On Demand API allows you to integrate background checks into your platform and manage the process from end-to-end. This SDK is automatically generated by the Swagger Codegen project:
- API version: 2018-05-08T16:44:26.238-07:00
- Package version: 1.0.3
- Build package: io.swagger.codegen.languages.JavascriptClientCodegen
Installation
For Node.js
npm
Install it via:
npm install on-demand-client --save
Setting credentials
The example script as well as the Integration tests, require valid credentials. For these scripts, the 'CREDENTIALS' environmental variable needs to be set to your API credentials. These credentials are a base64 hash of "[apiusername]:[password]".
For example, the base64 hash of "[email protected]:somepassword" is "dXNlcm5hbWVAeW91cmNvbXBhbnkuY29tOnNvbWVwYXNzd29yZA=="
Getting Started
Please follow the installation instruction and execute the following JS code:
var OnDemandClient = require('on-demand-client');
// default basePath is set to the testing env https://api-int.kennect.com
// for pointing to production set basePath as shown below
//OnDemandClient.ApiClient.instance.basePath = "https://api.kennect.com/v1";
//OnDemandClient.Auth.ApiClient.instance.basePath = "https://api.kennect.com/oauth";
var api = new OnDemandClient.DefaultApi();
var authApi = new OnDemandClient.Auth.DefaultApi();
var credentials = process.env.CREDENTIALS;
authApi.tokenPost('Basic ' + credentials, function(error, fetched, response) {
if (error) throw error;
var defaultClient = OnDemandClient.ApiClient.instance;
defaultClient.defaultHeaders['Authorization'] = 'Bearer ' + fetched.access_token;
api.packagesGet(null, function(error, fetched, response) {
if (error) throw error;
console.log(fetched);
});
});
More Examples
For more examples of API invocations see on-demand-client/test/integration/DefaultApi.int.spec.js. Some integration tests may require specific account configurations in order to pass.
Documentation for API Endpoints
All URIs are relative to https://api-int.kennect.com/v1
Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- OnDemandClient.DefaultApi | billingCodesGet | GET /billing-codes | Get a list of valid billing codes OnDemandClient.DefaultApi | candidatesGet | GET /candidates | Get a list of Candidates OnDemandClient.DefaultApi | candidatesIdDocumentsGet | GET /candidates/{id}/documents | List documents attached to a candidate OnDemandClient.DefaultApi | candidatesIdDocumentsPost | POST /candidates/{id}/documents | Attach a document to a candidate OnDemandClient.DefaultApi | candidatesIdGet | GET /candidates/{id} | Get a specific Candidate OnDemandClient.DefaultApi | candidatesIdLinksPost | POST /candidates/{id}/links | Get links to the Candidate portal for use by the Candidate OnDemandClient.DefaultApi | candidatesIdPut | PUT /candidates/{id} | Update a candidate OnDemandClient.DefaultApi | candidatesIdTrustPost | POST /candidates/{id}/trust | Trust a candidate OnDemandClient.DefaultApi | candidatesPost | POST /candidates | Create a candidate OnDemandClient.DefaultApi | chargesPost | POST /charges | Create a capture OnDemandClient.DefaultApi | healthGet | GET /health | Check the health of the API OnDemandClient.DefaultApi | identitiesIdGet | GET /identities/{id} | Get a verified identity OnDemandClient.DefaultApi | identitiesIdRetryPost | POST /identities/{id}/retry | Retry creating an identity and get a new set of questions OnDemandClient.DefaultApi | identitiesIdVerificationPut | PUT /identities/{id}/verification | Verify an identity by providing correct answers OnDemandClient.DefaultApi | identitiesPost | POST /identities | Get a list of questions needing to be answered before an identity can be created OnDemandClient.DefaultApi | packagesGet | GET /packages | Get a list of Packages OnDemandClient.DefaultApi | packagesIdPriceGet | GET /packages/{id}/price | Get the estimated price of a Package OnDemandClient.DefaultApi | referenceCodesGet | GET /reference-codes | Return a list of valid Reference Codes OnDemandClient.DefaultApi | screeningsIdAdverseActionsPost | POST /screenings/{id}/adverse-actions | Create an adverse action on a Screening OnDemandClient.DefaultApi | screeningsIdDetailsGet | GET /screenings/{id}/details | Get a specific screening OnDemandClient.DefaultApi | screeningsIdDocumentsAttachmentIdGet | GET /screenings/{id}/documents/{attachmentId} | Get a Screening attachment in PDF form OnDemandClient.DefaultApi | screeningsIdDocumentsGet | GET /screenings/{id}/documents | OnDemandClient.DefaultApi | screeningsIdDocumentsPost | POST /screenings/{id}/documents | Attach a document to a Screening OnDemandClient.DefaultApi | screeningsIdGet | GET /screenings/{id} | Get a specific screening OnDemandClient.DefaultApi | screeningsIdInvitePost | POST /screenings/{id}/invite | Create an invite OnDemandClient.DefaultApi | screeningsIdReportGet | GET /screenings/{id}/report | Get a Screening report in PDF form OnDemandClient.DefaultApi | screeningsIdReportLinksPost | POST /screenings/{id}/report-links | Create a one-time use report link OnDemandClient.DefaultApi | screeningsIdReportPdfGet | GET /screenings/{id}/report.pdf | Get a Screening report in PDF form OnDemandClient.DefaultApi | screeningsPost | POST /screenings | Create a Screening OnDemandClient.DefaultApi | subscriptionsIdDelete | DELETE /subscriptions/{id} | Delete a subscription OnDemandClient.DefaultApi | subscriptionsIdEventsGet | GET /subscriptions/{id}/events | Get a list of events related to a given subscription OnDemandClient.DefaultApi | subscriptionsIdGet | GET /subscriptions/{id} | Get a subscription OnDemandClient.DefaultApi | subscriptionsPost | POST /subscriptions | Create a subscription OnDemandClient.DefaultApi | tokensPost | POST /tokens | Creates a temporary access token OnDemandClient.DefaultApi | trustedUsersIdGet | GET /trusted-users/{id} | Get trust information about a verified user OnDemandClient.DefaultApi | trustedUsersPost | POST /trusted-users | Trust a verified user OnDemandClient.DefaultApi | trustsIdDelete | DELETE /trusts/{id} | Untrust a Trusted User
Documentation for Models
- OnDemandClient.Address
- OnDemandClient.AdverseActionRequest
- OnDemandClient.AdverseActionResponse
- OnDemandClient.Answer
- OnDemandClient.BillingCodesResponse
- OnDemandClient.CallbackCredentials
- OnDemandClient.CallbackRequest
- OnDemandClient.CallbackResponse
- OnDemandClient.CandidateAlias
- OnDemandClient.CandidateDocumentResponse
- OnDemandClient.CandidatePortalLinkResponse
- OnDemandClient.CandidateRequest
- OnDemandClient.CandidateResponse
- OnDemandClient.ChargeRequest
- OnDemandClient.ChargeResponse
- OnDemandClient.Dispute
- OnDemandClient.DriversLicense
- OnDemandClient.ErrorDetail
- OnDemandClient.ErrorResponse
- OnDemandClient.HealthResponse
- OnDemandClient.IdentityRequest
- OnDemandClient.IdentityResponse
- OnDemandClient.Interval
- OnDemandClient.Invite
- OnDemandClient.InviteResponse
- OnDemandClient.JsonNode
- OnDemandClient.KnowledgeBasedAnswer
- OnDemandClient.Metrics
- OnDemandClient.OneTimeReportLinkResponse
- OnDemandClient.PackagePriceResponse
- OnDemandClient.PackageResponse
- OnDemandClient.Question
- OnDemandClient.ReferenceCode
- OnDemandClient.ReferenceCodesResponse
- OnDemandClient.Schedule
- OnDemandClient.ScreeningDetailsResponse
- OnDemandClient.ScreeningReport
- OnDemandClient.ScreeningRequest
- OnDemandClient.ScreeningResponse
- OnDemandClient.ScreeningResponseLink
- OnDemandClient.ScreeningResponseReportItem
- OnDemandClient.SubscriptionEventsResponse
- OnDemandClient.SubscriptionRequest
- OnDemandClient.SubscriptionResponse
- OnDemandClient.SubscriptionScreening
- OnDemandClient.TokenRequest
- OnDemandClient.TokenResponse
- OnDemandClient.TrustedUserRequest
- OnDemandClient.TrustedUserResponse
- OnDemandClient.VerificationRequest
Documentation for Authorization
jwt-authorizer
- Type: OAuth
- Flow: password
- Authorization URL:
- Scopes:
- user: User Scope