README
Trulioo JavaScript SDK
- Package version: 1.0.3
- API version: v1
- Build package: org.openapitools.codegen.languages.JavascriptClientCodegen
Installation
This SDK targets JavaScript ECMAScript 6.
npm
Withnpm install trulioo-sdk
Sample Application
Check out our sample application for this SDK in the sample-app folder.
Getting Started
Example of testing authentication (ES6)
const Trulioo = require('trulioo-sdk');
// Configure API key authorization
Trulioo.ApiClient.instance.authentications['ApiKeyAuth'].apiKey = 'YOUR-X-TRULIOO-API-KEY';
// Construct instance of ConnectionApi
const connectionApi = new Trulioo.ConnectionApi(apiClient);
// Configure mode: 'trial' or 'live'
const mode = 'trial';
// Call ConnectionApi#testAuthentication
(async () => {
try {
const result = await connectionApi.testAuthentication(mode);
console.log(result);
} catch (error) {
console.log('Error when calling ConnectionApi#testAuthentication');
console.log(`Status code: ${error.status}`);
console.log(`Reason: ${error.response.body}`);
console.log(`Response headers: ${JSON.stringify(error.response.headers)}`);
}
})();
Testing
This project uses Mocha for unit testing and Istanbul for code
coverage. Configuration is located in package.json
.
npm install
npm test
Documentation for APIs
All URIs are relative to https://gateway.trulioo.com*.
Class | Method | HTTP request | Description |
---|---|---|---|
Trulioo.BusinessApi | getBusinessSearchResult | GET /{mode}/business/v1/search/transactionrecord/{id} | Get Business Search Result |
Trulioo.BusinessApi | search | POST /{mode}/business/v1/search | Search |
Trulioo.ConfigurationApi | getBusinessRegistrationNumbers | GET /{mode}/configuration/v1/businessregistrationnumbers/{countryCode}/{jurisdictionCode} | Get Business Registration Numbers |
Trulioo.ConfigurationApi | getConsents | GET /{mode}/configuration/v1/consents/{configurationName}/{countryCode} | Get Consents |
Trulioo.ConfigurationApi | getCountryCodes | GET /{mode}/configuration/v1/countrycodes/{configurationName} | Get Country Codes |
Trulioo.ConfigurationApi | getCountrySubdivisions | GET /{mode}/configuration/v1/countrysubdivisions/{countryCode} | Get Country Subdivisions |
Trulioo.ConfigurationApi | getDatasources | GET /{mode}/configuration/v1/datasources/{configurationName}/{countryCode} | Get Datasources |
Trulioo.ConfigurationApi | getDetailedConsents | GET /{mode}/configuration/v1/detailedConsents/{configurationName}/{countryCode} | Get Detailed Consents |
Trulioo.ConfigurationApi | getDocumentTypes | GET /{mode}/configuration/v1/documentTypes/{countryCode} | Get Document Types |
Trulioo.ConfigurationApi | getFields | GET /{mode}/configuration/v1/fields/{configurationName}/{countryCode} | Get Fields |
Trulioo.ConfigurationApi | getRecommendedFields | GET /{mode}/configuration/v1/recommendedfields/{configurationName}/{countryCode} | Get Recommended Fields |
Trulioo.ConfigurationApi | getTestEntities | GET /{mode}/configuration/v1/testentities/{configurationName}/{countryCode} | Get Test Entities |
Trulioo.ConnectionApi | connectionAsyncCallbackUrl | POST /{mode}/connection/v1/async-callback | Connection Async Callback Url |
Trulioo.ConnectionApi | sayHello | GET /{mode}/connection/v1/sayhello/{name} | Say Hello |
Trulioo.ConnectionApi | testAuthentication | GET /{mode}/connection/v1/testauthentication | Test Authentication |
Trulioo.VerificationsApi | documentDownload | GET /{mode}/verifications/v1/documentdownload/{transactionRecordId}/{fieldName} | Document Download |
Trulioo.VerificationsApi | getTransactionRecord | GET /{mode}/verifications/v1/transactionrecord/{id} | Get Transaction Record |
Trulioo.VerificationsApi | getTransactionRecordAddress | GET /{mode}/verifications/v1/transactionrecord/{id}/withaddress | Get Transaction Record Address |
Trulioo.VerificationsApi | getTransactionRecordDocument | GET /{mode}/verifications/v1/transactionrecord/{transactionRecordID}/{documentField} | Get Transaction Record Document |
Trulioo.VerificationsApi | getTransactionRecordVerbose | GET /{mode}/verifications/v1/transactionrecord/{id}/verbose | Get Transaction Record Verbose |
Trulioo.VerificationsApi | getTransactionStatus | GET /{mode}/verifications/v1/transaction/{id}/status | Get Transaction Status |
Trulioo.VerificationsApi | verify | POST /{mode}/verifications/v1/verify | Verify |
Documentation for Models
- Trulioo.Address
- Trulioo.AppendedField
- Trulioo.Business
- Trulioo.BusinessRecord
- Trulioo.BusinessRegistrationNumber
- Trulioo.BusinessRegistrationNumberMask
- Trulioo.BusinessResult
- Trulioo.BusinessSearchRequest
- Trulioo.BusinessSearchRequestBusinessSearchModel
- Trulioo.BusinessSearchResponse
- Trulioo.BusinessSearchResponseIndustryCode
- Trulioo.Communication
- Trulioo.Consent
- Trulioo.CountrySubdivision
- Trulioo.DataField
- Trulioo.DataFields
- Trulioo.DatasourceField
- Trulioo.DatasourceResult
- Trulioo.Document
- Trulioo.DriverLicence
- Trulioo.Location
- Trulioo.LocationAdditionalFields
- Trulioo.NationalId
- Trulioo.NormalizedDatasourceField
- Trulioo.NormalizedDatasourceGroupCountry
- Trulioo.Passport
- Trulioo.PersonInfo
- Trulioo.PersonInfoAdditionalFields
- Trulioo.Record
- Trulioo.RecordRule
- Trulioo.Result
- Trulioo.ServiceError
- Trulioo.TestEntityDataFields
- Trulioo.TransactionRecordResult
- Trulioo.TransactionRecordResultAllOf
- Trulioo.TransactionStatus
- Trulioo.VerifyRequest
- Trulioo.VerifyResult
Documentation for Authorization
ApiKeyAuth
- Type: API key
- API key parameter name: x-trulioo-api-key
- Location: HTTP header