Skip to content
This repository has been archived by the owner on Nov 1, 2021. It is now read-only.

Latest commit

 

History

History
1588 lines (1138 loc) · 42.2 KB

DefaultApi.md

File metadata and controls

1588 lines (1138 loc) · 42.2 KB

Onfido.DefaultApi

All URIs are relative to https://api.onfido.com/v2

Method HTTP request Description
cancelReport POST /checks/{check_id}/reports/{report_id}/cancel This endpoint is for cancelling individual paused reports.
createApplicant POST /applicants Create Applicant
createCheck POST /applicants/{applicant_id}/checks Create a check
createWebhook POST /webhooks Create a webhook
deleteWebhook DELETE /webhooks/{webhook_id} Delete a webhook
destroyApplicant DELETE /applicants/{applicant_id} Delete Applicant
downloadDocument GET /applicants/{applicant_id}/documents/{document_id}/download Download a documents raw data
downloadLivePhoto GET /live_photos/{live_photo_id}/download Download live photo
downloadLiveVideo GET /live_videos/{live_video_id}/download Download live video
editWebhook PUT /webhooks/{webhook_id} Edit a webhook
findAddresses GET /addresses/pick Search for addresses by postcode
findApplicant GET /applicants/{applicant_id} Retrieve Applicant
findCheck GET /applicants/{applicant_id}/checks/{check_id} Retrieve a Check
findDocument GET /applicants/{applicant_id}/documents/{document_id} A single document can be retrieved by calling this endpoint with the document’s unique identifier.
findLivePhoto GET /live_photos/{live_photo_id} Retrieve live photo
findLiveVideo GET /live_videos/{live_video_id} Retrieve live video
findReport GET /checks/{check_id}/reports/{report_id} A single report can be retrieved using this endpoint with the corresponding unique identifier.
findReportTypeGroup GET /report_type_groups/{report_type_group_id} Retrieve single report type group object
findWebhook GET /webhooks/{webhook_id} Retrieve a Webhook
generateSdkToken POST /sdk_token Generate a SDK token
listApplicants GET /applicants List Applicants
listChecks GET /applicants/{applicant_id}/checks Retrieve Checks
listDocuments GET /applicants/{applicant_id}/documents List documents
listLivePhotos GET /live_photos List live photos
listLiveVideos GET /live_videos List live videos
listReportTypeGroups GET /report_type_groups Retrieve all report type groups
listReports GET /checks/{check_id}/reports All the reports belonging to a particular check can be listed from this endpoint.
listWebhooks GET /webhooks List webhooks
restoreApplicant POST /applicants/{applicant_id}/restore Restore Applicant
resumeCheck POST /checks/{check_id}/resume Resume a Check
resumeReport POST /checks/{check_id}/reports/{report_id}/resume This endpoint is for resuming individual paused reports.
updateApplicant PUT /applicants/{applicant_id} Update Applicant
uploadDocument POST /applicants/{applicant_id}/documents Upload a document
uploadLivePhoto POST /live_photos Upload live photo

cancelReport

cancelReport(check_id, report_id)

This endpoint is for cancelling individual paused reports.

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var check_id = "check_id_example"; // String | 
var report_id = "report_id_example"; // String | 
apiInstance.cancelReport(check_id, report_id).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
check_id String
report_id String

Return type

null (empty response body)

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

createApplicant

Applicant createApplicant(Applicant)

Create Applicant

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var Applicant = new Onfido.Applicant(); // Applicant | 
apiInstance.createApplicant(Applicant).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
Applicant Applicant

Return type

Applicant

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createCheck

Check createCheck(applicant_id, Check)

Create a check

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var applicant_id = "applicant_id_example"; // String | 
var Check = new Onfido.Check(); // Check | 
apiInstance.createCheck(applicant_id, Check).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
applicant_id String
Check Check

Return type

Check

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createWebhook

Webhook createWebhook(Webhook)

Create a webhook

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var Webhook = new Onfido.Webhook(); // Webhook | 
apiInstance.createWebhook(Webhook).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
Webhook Webhook

Return type

Webhook

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteWebhook

deleteWebhook(webhook_id)

Delete a webhook

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var webhook_id = "webhook_id_example"; // String | 
apiInstance.deleteWebhook(webhook_id).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
webhook_id String

Return type

null (empty response body)

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

destroyApplicant

destroyApplicant(applicant_id)

Delete Applicant

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var applicant_id = "applicant_id_example"; // String | 
apiInstance.destroyApplicant(applicant_id).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
applicant_id String

Return type

null (empty response body)

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

downloadDocument

File downloadDocument(applicant_id, document_id)

Download a documents raw data

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var applicant_id = "applicant_id_example"; // String | 
var document_id = "document_id_example"; // String | 
apiInstance.downloadDocument(applicant_id, document_id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
applicant_id String
document_id String

Return type

File

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: /, application/json

downloadLivePhoto

File downloadLivePhoto(live_photo_id)

Download live photo

Live photos are downloaded using this endpoint.

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var live_photo_id = "live_photo_id_example"; // String | The live photo’s unique identifier.
apiInstance.downloadLivePhoto(live_photo_id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
live_photo_id String The live photo’s unique identifier.

Return type

File

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: /, application/json

downloadLiveVideo

File downloadLiveVideo(live_video_id)

Download live video

Live videos are downloaded using this endpoint.

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var live_video_id = "live_video_id_example"; // String | The live video’s unique identifier.
apiInstance.downloadLiveVideo(live_video_id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
live_video_id String The live video’s unique identifier.

Return type

File

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: /, application/json

editWebhook

Webhook editWebhook(webhook_id, Webhook)

Edit a webhook

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var webhook_id = "webhook_id_example"; // String | 
var Webhook = new Onfido.Webhook(); // Webhook | 
apiInstance.editWebhook(webhook_id, Webhook).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
webhook_id String
Webhook Webhook

Return type

Webhook

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

findAddresses

GenericAddressesList findAddresses(postcode)

Search for addresses by postcode

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var postcode = "postcode_example"; // String | 
apiInstance.findAddresses(postcode).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
postcode String

Return type

GenericAddressesList

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

findApplicant

Applicant findApplicant(applicant_id)

Retrieve Applicant

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var applicant_id = "applicant_id_example"; // String | 
apiInstance.findApplicant(applicant_id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
applicant_id String

Return type

Applicant

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

findCheck

CheckWithReportIds findCheck(applicant_id, check_id)

Retrieve a Check

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var applicant_id = "applicant_id_example"; // String | 
var check_id = "check_id_example"; // String | 
apiInstance.findCheck(applicant_id, check_id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
applicant_id String
check_id String

Return type

CheckWithReportIds

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

findDocument

Document findDocument(applicant_id, document_id)

A single document can be retrieved by calling this endpoint with the document’s unique identifier.

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var applicant_id = "applicant_id_example"; // String | 
var document_id = "document_id_example"; // String | 
apiInstance.findDocument(applicant_id, document_id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
applicant_id String
document_id String

Return type

Document

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

findLivePhoto

LivePhoto findLivePhoto(live_photo_id)

Retrieve live photo

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var live_photo_id = "live_photo_id_example"; // String | The live photo’s unique identifier.
apiInstance.findLivePhoto(live_photo_id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
live_photo_id String The live photo’s unique identifier.

Return type

LivePhoto

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

findLiveVideo

LiveVideo findLiveVideo(live_video_id)

Retrieve live video

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var live_video_id = "live_video_id_example"; // String | The live video’s unique identifier.
apiInstance.findLiveVideo(live_video_id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
live_video_id String The live video’s unique identifier.

Return type

LiveVideo

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

findReport

Report findReport(check_id, report_id)

A single report can be retrieved using this endpoint with the corresponding unique identifier.

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var check_id = "check_id_example"; // String | 
var report_id = "report_id_example"; // String | 
apiInstance.findReport(check_id, report_id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
check_id String
report_id String

Return type

Report

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

findReportTypeGroup

ReportTypeGroup findReportTypeGroup(report_type_group_id)

Retrieve single report type group object

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var report_type_group_id = "report_type_group_id_example"; // String | 
apiInstance.findReportTypeGroup(report_type_group_id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
report_type_group_id String

Return type

ReportTypeGroup

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

findWebhook

Webhook findWebhook(webhook_id)

Retrieve a Webhook

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var webhook_id = "webhook_id_example"; // String | 
apiInstance.findWebhook(webhook_id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
webhook_id String

Return type

Webhook

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

generateSdkToken

SdkTokenResponse generateSdkToken(SdkTokenRequest)

Generate a SDK token

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var SdkTokenRequest = new Onfido.SdkTokenRequest(); // SdkTokenRequest | 
apiInstance.generateSdkToken(SdkTokenRequest).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
SdkTokenRequest SdkTokenRequest

Return type

SdkTokenResponse

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

listApplicants

ApplicantsList listApplicants(opts)

List Applicants

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var opts = {
  'page': 1, // Number | The page to return. The first page is `page=1`
  'per_page': 20, // Number | The number of objects per page.
  'include_deleted': false // Boolean | Whether to also include applicants scheduled for deletion.
};
apiInstance.listApplicants(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
page Number The page to return. The first page is `page=1` [optional] [default to 1]
per_page Number The number of objects per page. [optional] [default to 20]
include_deleted Boolean Whether to also include applicants scheduled for deletion. [optional] [default to false]

Return type

ApplicantsList

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listChecks

ChecksList listChecks(applicant_id, opts)

Retrieve Checks

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var applicant_id = "applicant_id_example"; // String | 
var opts = {
  'page': 1, // Number | The page to return. The first page is `page=1`.
  'per_page': 20 // Number | The number of objects per page.
};
apiInstance.listChecks(applicant_id, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
applicant_id String
page Number The page to return. The first page is `page=1`. [optional] [default to 1]
per_page Number The number of objects per page. [optional] [default to 20]

Return type

ChecksList

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listDocuments

DocumentsList listDocuments(applicant_id)

List documents

All documents belonging to an applicant can be listed from this endpoint

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var applicant_id = "applicant_id_example"; // String | 
apiInstance.listDocuments(applicant_id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
applicant_id String

Return type

DocumentsList

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listLivePhotos

LivePhotosList listLivePhotos(applicant_id)

List live photos

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var applicant_id = "applicant_id_example"; // String | The id of the applicant the live photos belong to.
apiInstance.listLivePhotos(applicant_id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
applicant_id String The id of the applicant the live photos belong to.

Return type

LivePhotosList

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listLiveVideos

LiveVideosList listLiveVideos(applicant_id)

List live videos

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var applicant_id = "applicant_id_example"; // String | The id of the applicant the live videos belong to.
apiInstance.listLiveVideos(applicant_id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
applicant_id String The id of the applicant the live videos belong to.

Return type

LiveVideosList

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listReportTypeGroups

ReportTypeGroupsList listReportTypeGroups()

Retrieve all report type groups

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
apiInstance.listReportTypeGroups().then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

ReportTypeGroupsList

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listReports

ReportsList listReports(check_id)

All the reports belonging to a particular check can be listed from this endpoint.

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var check_id = "check_id_example"; // String | 
apiInstance.listReports(check_id).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
check_id String

Return type

ReportsList

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listWebhooks

WebhooksList listWebhooks()

List webhooks

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
apiInstance.listWebhooks().then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

This endpoint does not need any parameter.

Return type

WebhooksList

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

restoreApplicant

restoreApplicant(applicant_id)

Restore Applicant

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var applicant_id = "applicant_id_example"; // String | 
apiInstance.restoreApplicant(applicant_id).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
applicant_id String

Return type

null (empty response body)

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

resumeCheck

resumeCheck(check_id)

Resume a Check

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var check_id = "check_id_example"; // String | 
apiInstance.resumeCheck(check_id).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
check_id String

Return type

null (empty response body)

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

resumeReport

resumeReport(check_id, report_id)

This endpoint is for resuming individual paused reports.

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var check_id = "check_id_example"; // String | 
var report_id = "report_id_example"; // String | 
apiInstance.resumeReport(check_id, report_id).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
check_id String
report_id String

Return type

null (empty response body)

Authorization

Token

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

updateApplicant

Applicant updateApplicant(applicant_id, Applicant)

Update Applicant

Allows updating of an applicant’s information before any checks are created. - Partial updates - Addresses and ID numbers present will replace existing ones - Same applicant validations to create applicant

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var applicant_id = "applicant_id_example"; // String | 
var Applicant = new Onfido.Applicant(); // Applicant | 
apiInstance.updateApplicant(applicant_id, Applicant).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
applicant_id String
Applicant Applicant

Return type

Applicant

Authorization

Token

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

uploadDocument

Document uploadDocument(applicant_id, type, file, opts)

Upload a document

Documents are uploaded using this endpoint. Along with the file upload the relevant document type must be specified. Documents must be uploaded as a multipart form. The valid file types are: jpg, png and pdf. The file size must be between 2KB and 3MB.

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var applicant_id = "applicant_id_example"; // String | 
var type = "type_example"; // String | The type of document.
var file = "/path/to/file"; // File | The file to be uploaded.
var opts = {
  'side': "side_example", // String | Either the `front` or `back` of the document.
  'issuing_country': "issuing_country_example" // String | The issuing country of the document, a 3-letter ISO code.
};
apiInstance.uploadDocument(applicant_id, type, file, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
applicant_id String
type String The type of document.
file File The file to be uploaded.
side String Either the `front` or `back` of the document. [optional]
issuing_country String The issuing country of the document, a 3-letter ISO code. [optional]

Return type

Document

Authorization

Token

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

uploadLivePhoto

LivePhoto uploadLivePhoto(applicant_id, file, opts)

Upload live photo

You can upload live photos to this endpoint. Like document upload, files must be uploaded as a multipart form. Valid file types are jpg, png and pdf. The file size must be between 32KB and 10MB. Live photos are validated at the point of upload to check that they contain exactly one face. This validation can be disabled by setting the advanced_validation argument to false.

Example

var Onfido = require('onfido');
var defaultClient = Onfido.ApiClient.instance;
// Configure API key authorization: Token
const token_auth = defaultClient.authentications['Token'];
token_auth.apiKey = 'token=' + 'YOUR API KEY';
token_auth.apiKeyPrefix = 'Token';

var apiInstance = new Onfido.DefaultApi();
var applicant_id = "applicant_id_example"; // String | 
var file = "/path/to/file"; // File | The file to be uploaded.
var opts = {
  'advanced_validation': true // Boolean | Validates that the live photo contains exactly one face.
};
apiInstance.uploadLivePhoto(applicant_id, file, opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
applicant_id String
file File The file to be uploaded.
advanced_validation Boolean Validates that the live photo contains exactly one face. [optional] [default to true]

Return type

LivePhoto

Authorization

Token

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json