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(check_id, report_id)
This endpoint is for cancelling individual paused reports.
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| check_id | String | ||
| report_id | String |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
Applicant createApplicant(Applicant)
Create Applicant
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| Applicant | Applicant |
- Content-Type: application/json
- Accept: application/json
Check createCheck(applicant_id, Check)
Create a check
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| applicant_id | String | ||
| Check | Check |
- Content-Type: application/json
- Accept: application/json
Webhook createWebhook(Webhook)
Create a webhook
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| Webhook | Webhook |
- Content-Type: application/json
- Accept: application/json
deleteWebhook(webhook_id)
Delete a webhook
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| webhook_id | String |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
destroyApplicant(applicant_id)
Delete Applicant
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| applicant_id | String |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
File downloadDocument(applicant_id, document_id)
Download a documents raw data
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| applicant_id | String | ||
| document_id | String |
File
- Content-Type: Not defined
- Accept: /, application/json
File downloadLivePhoto(live_photo_id)
Download live photo
Live photos are downloaded using this endpoint.
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| live_photo_id | String | The live photo’s unique identifier. |
File
- Content-Type: Not defined
- Accept: /, application/json
File downloadLiveVideo(live_video_id)
Download live video
Live videos are downloaded using this endpoint.
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| live_video_id | String | The live video’s unique identifier. |
File
- Content-Type: Not defined
- Accept: /, application/json
Webhook editWebhook(webhook_id, Webhook)
Edit a webhook
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| webhook_id | String | ||
| Webhook | Webhook |
- Content-Type: application/json
- Accept: application/json
GenericAddressesList findAddresses(postcode)
Search for addresses by postcode
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| postcode | String |
- Content-Type: Not defined
- Accept: application/json
Applicant findApplicant(applicant_id)
Retrieve Applicant
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| applicant_id | String |
- Content-Type: Not defined
- Accept: application/json
CheckWithReportIds findCheck(applicant_id, check_id)
Retrieve a Check
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| applicant_id | String | ||
| check_id | String |
- Content-Type: Not defined
- Accept: application/json
Document findDocument(applicant_id, document_id)
A single document can be retrieved by calling this endpoint with the document’s unique identifier.
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| applicant_id | String | ||
| document_id | String |
- Content-Type: Not defined
- Accept: application/json
LivePhoto findLivePhoto(live_photo_id)
Retrieve live photo
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| live_photo_id | String | The live photo’s unique identifier. |
- Content-Type: Not defined
- Accept: application/json
LiveVideo findLiveVideo(live_video_id)
Retrieve live video
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| live_video_id | String | The live video’s unique identifier. |
- Content-Type: Not defined
- Accept: application/json
Report findReport(check_id, report_id)
A single report can be retrieved using this endpoint with the corresponding unique identifier.
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| check_id | String | ||
| report_id | String |
- Content-Type: Not defined
- Accept: application/json
ReportTypeGroup findReportTypeGroup(report_type_group_id)
Retrieve single report type group object
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| report_type_group_id | String |
- Content-Type: Not defined
- Accept: application/json
Webhook findWebhook(webhook_id)
Retrieve a Webhook
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| webhook_id | String |
- Content-Type: Not defined
- Accept: application/json
SdkTokenResponse generateSdkToken(SdkTokenRequest)
Generate a SDK token
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| SdkTokenRequest | SdkTokenRequest |
- Content-Type: application/json
- Accept: application/json
ApplicantsList listApplicants(opts)
List Applicants
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);
});| 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] |
- Content-Type: Not defined
- Accept: application/json
ChecksList listChecks(applicant_id, opts)
Retrieve Checks
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);
});| 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] |
- Content-Type: Not defined
- Accept: application/json
DocumentsList listDocuments(applicant_id)
List documents
All documents belonging to an applicant can be listed from this endpoint
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| applicant_id | String |
- Content-Type: Not defined
- Accept: application/json
LivePhotosList listLivePhotos(applicant_id)
List live photos
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| applicant_id | String | The id of the applicant the live photos belong to. |
- Content-Type: Not defined
- Accept: application/json
LiveVideosList listLiveVideos(applicant_id)
List live videos
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| applicant_id | String | The id of the applicant the live videos belong to. |
- Content-Type: Not defined
- Accept: application/json
ReportTypeGroupsList listReportTypeGroups()
Retrieve all report type groups
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);
});This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
ReportsList listReports(check_id)
All the reports belonging to a particular check can be listed from this endpoint.
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| check_id | String |
- Content-Type: Not defined
- Accept: application/json
WebhooksList listWebhooks()
List webhooks
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);
});This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
restoreApplicant(applicant_id)
Restore Applicant
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| applicant_id | String |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
resumeCheck(check_id)
Resume a Check
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| check_id | String |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
resumeReport(check_id, report_id)
This endpoint is for resuming individual paused reports.
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| check_id | String | ||
| report_id | String |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
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
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);
});| Name | Type | Description | Notes |
|---|---|---|---|
| applicant_id | String | ||
| Applicant | Applicant |
- Content-Type: application/json
- Accept: application/json
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.
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);
});| 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] |
- Content-Type: multipart/form-data
- Accept: application/json
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.
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);
});| 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] |
- Content-Type: multipart/form-data
- Accept: application/json