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

Commit 5bedf24

Browse files
author
Engineering at Onfido
committed
New client release: 5.0.0
1 parent ac7fbc6 commit 5bedf24

File tree

83 files changed

+760
-3913
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+760
-3913
lines changed

README.md

Lines changed: 40 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ The Onfido API is used to submit check requests.
33

44
This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
55

6-
- API version: 2.0.0
7-
- Package version: 4.3.0
6+
- API version: 3.0.0
7+
- Package version: 5.0.0
88
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
99

1010
## Requirements.
@@ -42,107 +42,104 @@ configuration.api_key_prefix['Authorization'] = 'Token'
4242
# Limit the at-rest region, if needed (optional, see https://documentation.onfido.com/#regions)
4343
# configuration.host = configuration.get_host_from_settings(1, {'region': 'us'})
4444

45-
api = onfido.DefaultApi(onfido.ApiClient(configuration))
45+
api_instance = onfido.DefaultApi(onfido.ApiClient(configuration))
4646

4747
# Setting applicant details
48-
applicant = onfido.Applicant(first_name='John', last_name='Smith')
49-
applicant.dob = datetime.date(1980, 1, 22)
50-
applicant.country = 'GBR'
5148

52-
address = onfido.Address()
53-
address.building_number = '100'
54-
address.street = 'Main Street'
55-
address.town = 'London'
56-
address.postcode = 'SW4 6EH'
57-
address.country = 'GBR'
49+
applicant_address = onfido.Address(
50+
building_number=100,
51+
street='Main Street',
52+
town='London',
53+
postcode='SW4 6EH',
54+
country='GBR'
55+
)
5856

59-
applicant.addresses = [address];
57+
applicant_details = onfido.Applicant(
58+
first_name='Jane',
59+
last_name='Doe',
60+
address=applicant_address
61+
)
6062

6163
# Setting check details
62-
check = onfido.Check(type='express')
63-
report = onfido.Report(name='identity')
64-
check.reports = [report];
64+
65+
check_data = onfido.Check()
66+
check_data.report_names = ['identity_standard']
67+
68+
# Create an applicant and then a check with an Identity report
6569

6670
try:
67-
applicant_data = api.create_applicant(applicant)
71+
applicant_data = api_instance.create_applicant(applicant_details)
6872
applicant_id = applicant_data.id
69-
check_data = api.create_check(applicant_id, check)
70-
pprint(check_data)
73+
pprint('Applicant ID: '+applicant_id)
74+
check_data.applicant_id = applicant_id
75+
new_check = api_instance.create_check(check_data)
76+
pprint(new_check)
7177
except ApiException as e:
7278
pprint(e.body)
7379

7480
```
7581

7682
## Documentation for API Endpoints
7783

78-
All URIs are relative to *https://api.onfido.com/v2*
84+
All URIs are relative to *https://api.onfido.com/v3*
7985

8086
Class | Method | HTTP request | Description
8187
------------ | ------------- | ------------- | -------------
82-
*DefaultApi* | [**cancel_report**](docs/DefaultApi.md#cancel_report) | **POST** /checks/{check_id}/reports/{report_id}/cancel | This endpoint is for cancelling individual paused reports.
88+
*DefaultApi* | [**cancel_report**](docs/DefaultApi.md#cancel_report) | **POST** /reports/{report_id}/cancel | This endpoint is for cancelling individual paused reports.
8389
*DefaultApi* | [**create_applicant**](docs/DefaultApi.md#create_applicant) | **POST** /applicants | Create Applicant
84-
*DefaultApi* | [**create_check**](docs/DefaultApi.md#create_check) | **POST** /applicants/{applicant_id}/checks | Create a check
90+
*DefaultApi* | [**create_check**](docs/DefaultApi.md#create_check) | **POST** /checks | Create a check
8591
*DefaultApi* | [**create_webhook**](docs/DefaultApi.md#create_webhook) | **POST** /webhooks | Create a webhook
8692
*DefaultApi* | [**delete_webhook**](docs/DefaultApi.md#delete_webhook) | **DELETE** /webhooks/{webhook_id} | Delete a webhook
8793
*DefaultApi* | [**destroy_applicant**](docs/DefaultApi.md#destroy_applicant) | **DELETE** /applicants/{applicant_id} | Delete Applicant
88-
*DefaultApi* | [**download_document**](docs/DefaultApi.md#download_document) | **GET** /applicants/{applicant_id}/documents/{document_id}/download | Download a documents raw data
94+
*DefaultApi* | [**download_document**](docs/DefaultApi.md#download_document) | **GET** /documents/{document_id}/download | Download a documents raw data
8995
*DefaultApi* | [**download_live_photo**](docs/DefaultApi.md#download_live_photo) | **GET** /live_photos/{live_photo_id}/download | Download live photo
9096
*DefaultApi* | [**download_live_video**](docs/DefaultApi.md#download_live_video) | **GET** /live_videos/{live_video_id}/download | Download live video
9197
*DefaultApi* | [**edit_webhook**](docs/DefaultApi.md#edit_webhook) | **PUT** /webhooks/{webhook_id} | Edit a webhook
9298
*DefaultApi* | [**find_addresses**](docs/DefaultApi.md#find_addresses) | **GET** /addresses/pick | Search for addresses by postcode
9399
*DefaultApi* | [**find_applicant**](docs/DefaultApi.md#find_applicant) | **GET** /applicants/{applicant_id} | Retrieve Applicant
94-
*DefaultApi* | [**find_check**](docs/DefaultApi.md#find_check) | **GET** /applicants/{applicant_id}/checks/{check_id} | Retrieve a Check
95-
*DefaultApi* | [**find_document**](docs/DefaultApi.md#find_document) | **GET** /applicants/{applicant_id}/documents/{document_id} | A single document can be retrieved by calling this endpoint with the document’s unique identifier.
100+
*DefaultApi* | [**find_check**](docs/DefaultApi.md#find_check) | **GET** /checks/{check_id} | Retrieve a Check
101+
*DefaultApi* | [**find_document**](docs/DefaultApi.md#find_document) | **GET** /documents/{document_id} | A single document can be retrieved by calling this endpoint with the document’s unique identifier.
96102
*DefaultApi* | [**find_live_photo**](docs/DefaultApi.md#find_live_photo) | **GET** /live_photos/{live_photo_id} | Retrieve live photo
97103
*DefaultApi* | [**find_live_video**](docs/DefaultApi.md#find_live_video) | **GET** /live_videos/{live_video_id} | Retrieve live video
98-
*DefaultApi* | [**find_report**](docs/DefaultApi.md#find_report) | **GET** /checks/{check_id}/reports/{report_id} | A single report can be retrieved using this endpoint with the corresponding unique identifier.
99-
*DefaultApi* | [**find_report_type_group**](docs/DefaultApi.md#find_report_type_group) | **GET** /report_type_groups/{report_type_group_id} | Retrieve single report type group object
104+
*DefaultApi* | [**find_report**](docs/DefaultApi.md#find_report) | **GET** /reports/{report_id} | A single report can be retrieved using this endpoint with the corresponding unique identifier.
100105
*DefaultApi* | [**find_webhook**](docs/DefaultApi.md#find_webhook) | **GET** /webhooks/{webhook_id} | Retrieve a Webhook
101106
*DefaultApi* | [**generate_sdk_token**](docs/DefaultApi.md#generate_sdk_token) | **POST** /sdk_token | Generate a SDK token
102107
*DefaultApi* | [**list_applicants**](docs/DefaultApi.md#list_applicants) | **GET** /applicants | List Applicants
103-
*DefaultApi* | [**list_checks**](docs/DefaultApi.md#list_checks) | **GET** /applicants/{applicant_id}/checks | Retrieve Checks
104-
*DefaultApi* | [**list_documents**](docs/DefaultApi.md#list_documents) | **GET** /applicants/{applicant_id}/documents | List documents
108+
*DefaultApi* | [**list_checks**](docs/DefaultApi.md#list_checks) | **GET** /checks | Retrieve Checks
109+
*DefaultApi* | [**list_documents**](docs/DefaultApi.md#list_documents) | **GET** /documents | List documents
105110
*DefaultApi* | [**list_live_photos**](docs/DefaultApi.md#list_live_photos) | **GET** /live_photos | List live photos
106111
*DefaultApi* | [**list_live_videos**](docs/DefaultApi.md#list_live_videos) | **GET** /live_videos | List live videos
107-
*DefaultApi* | [**list_report_type_groups**](docs/DefaultApi.md#list_report_type_groups) | **GET** /report_type_groups | Retrieve all report type groups
108-
*DefaultApi* | [**list_reports**](docs/DefaultApi.md#list_reports) | **GET** /checks/{check_id}/reports | All the reports belonging to a particular check can be listed from this endpoint.
112+
*DefaultApi* | [**list_reports**](docs/DefaultApi.md#list_reports) | **GET** /reports | All the reports belonging to a particular check can be listed from this endpoint.
109113
*DefaultApi* | [**list_webhooks**](docs/DefaultApi.md#list_webhooks) | **GET** /webhooks | List webhooks
110114
*DefaultApi* | [**restore_applicant**](docs/DefaultApi.md#restore_applicant) | **POST** /applicants/{applicant_id}/restore | Restore Applicant
111115
*DefaultApi* | [**resume_check**](docs/DefaultApi.md#resume_check) | **POST** /checks/{check_id}/resume | Resume a Check
112-
*DefaultApi* | [**resume_report**](docs/DefaultApi.md#resume_report) | **POST** /checks/{check_id}/reports/{report_id}/resume | This endpoint is for resuming individual paused reports.
116+
*DefaultApi* | [**resume_report**](docs/DefaultApi.md#resume_report) | **POST** /reports/{report_id}/resume | This endpoint is for resuming individual paused reports.
113117
*DefaultApi* | [**update_applicant**](docs/DefaultApi.md#update_applicant) | **PUT** /applicants/{applicant_id} | Update Applicant
114-
*DefaultApi* | [**upload_document**](docs/DefaultApi.md#upload_document) | **POST** /applicants/{applicant_id}/documents | Upload a document
118+
*DefaultApi* | [**upload_document**](docs/DefaultApi.md#upload_document) | **POST** /documents | Upload a document
115119
*DefaultApi* | [**upload_live_photo**](docs/DefaultApi.md#upload_live_photo) | **POST** /live_photos | Upload live photo
116120

117121

118122
## Documentation For Models
119123

120124
- [Address](docs/Address.md)
125+
- [AddressesList](docs/AddressesList.md)
121126
- [Applicant](docs/Applicant.md)
122127
- [ApplicantsList](docs/ApplicantsList.md)
123128
- [Check](docs/Check.md)
124-
- [CheckCommon](docs/CheckCommon.md)
125-
- [CheckWithReportIds](docs/CheckWithReportIds.md)
126129
- [ChecksList](docs/ChecksList.md)
127130
- [Document](docs/Document.md)
128131
- [DocumentsList](docs/DocumentsList.md)
129132
- [Error](docs/Error.md)
130-
- [GenericAddress](docs/GenericAddress.md)
131-
- [GenericAddressesList](docs/GenericAddressesList.md)
133+
- [ErrorProperties](docs/ErrorProperties.md)
132134
- [IdNumber](docs/IdNumber.md)
133135
- [LivePhoto](docs/LivePhoto.md)
134136
- [LivePhotosList](docs/LivePhotosList.md)
135137
- [LiveVideo](docs/LiveVideo.md)
136138
- [LiveVideosList](docs/LiveVideosList.md)
137139
- [Report](docs/Report.md)
138140
- [ReportDocument](docs/ReportDocument.md)
139-
- [ReportOption](docs/ReportOption.md)
140-
- [ReportType](docs/ReportType.md)
141-
- [ReportTypeGroup](docs/ReportTypeGroup.md)
142-
- [ReportTypeGroupsList](docs/ReportTypeGroupsList.md)
143141
- [ReportsList](docs/ReportsList.md)
144-
- [SdkTokenRequest](docs/SdkTokenRequest.md)
145-
- [SdkTokenResponse](docs/SdkTokenResponse.md)
142+
- [SdkToken](docs/SdkToken.md)
146143
- [Webhook](docs/Webhook.md)
147144
- [WebhooksList](docs/WebhooksList.md)
148145

docs/Address.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ Name | Type | Description | Notes
1111
**town** | **str** | The town of the applicant’s address | [optional]
1212
**postcode** | **str** | The postcode or ZIP of the applicant’s address | [optional]
1313
**country** | **str** | The 3 character ISO country code of this address. For example, GBR is the country code for the United Kingdom | [optional]
14-
**start_date** | **date** | The date the applicant started living at this address | [optional]
15-
**end_date** | **date** | The date the applicant left this address. If current residence, leave null | [optional]
1614
**state** | **str** | The address state. US states must use the USPS abbreviation (see also ISO 3166-2:US), for example AK, CA, or TX. | [optional]
1715
**line1** | **str** | Line 1 of the applicant's address | [optional]
1816
**line2** | **str** | Line 2 of the applicant's address | [optional]

docs/ReportOption.md renamed to docs/AddressesList.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# ReportOption
1+
# AddressesList
22

33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**name** | **str** | The name of the option to be enabled. |
6+
**addresses** | [**list[Address]**](Address.md) | | [optional]
77

88
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
99

docs/Applicant.md

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,11 @@ Name | Type | Description | Notes
88
**delete_at** | **datetime** | The date and time when this applicant is scheduled to be deleted. Read-only. | [optional]
99
**href** | **str** | The uri of this resource. Read-only. | [optional]
1010
**sandbox** | **bool** | Read-only. | [optional]
11-
**title** | **str** | The applicant’s title | [optional]
1211
**first_name** | **str** | The applicant’s first name | [optional]
13-
**middle_name** | **str** | The applicant’s middle name(s) or initial | [optional]
1412
**last_name** | **str** | The applicant’s surname | [optional]
15-
**email** | **str** | The applicant’s email address. Required if doing a US check or a standard UK check. | [optional]
16-
**gender** | **str** | The applicant’s gender. Valid values are male and female. | [optional]
13+
**email** | **str** | The applicant’s email address. Required if doing a US check, or a UK check for which `applicant_provides_data` is `true`. | [optional]
1714
**dob** | **date** | The applicant’s date of birth | [optional]
18-
**telephone** | **str** | The applicant’s landline phone number | [optional]
19-
**mobile** | **str** | The applicant’s mobile phone number | [optional]
20-
**country** | **str** | The country where this applicant will be checked. This must be a three-letter ISO code e.g. GBR or USA | [optional]
21-
**nationality** | **str** | The applicant's nationality. This must be a three-letter ISO code e.g. GBR or USA | [optional]
22-
**mothers_maiden_name** | **str** | The applicant’s mothers maiden name | [optional]
23-
**country_of_birth** | **str** | The applicant’s country of birth | [optional]
24-
**town_of_birth** | **str** | The applicant’s town of birth | [optional]
25-
**previous_last_name** | **str** | The applicant’s previous last name | [optional]
26-
**addresses** | [**list[Address]**](Address.md) | | [optional]
15+
**address** | [**Address**](Address.md) | | [optional]
2716
**id_numbers** | [**list[IdNumber]**](IdNumber.md) | | [optional]
2817

2918
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/Check.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,16 @@ Name | Type | Description | Notes
99
**status** | **str** | The current state of the check in the checking process. Read-only. | [optional]
1010
**result** | **str** | The overall result of the check, based on the results of the constituent reports. Read-only. | [optional]
1111
**download_uri** | **str** | A link to a PDF output of the check results. Append `.pdf` to get the pdf file. Read-only. | [optional]
12-
**form_uri** | **str** | A link to the applicant form, if the check is of type `standard`. Read-only. | [optional]
13-
**redirect_uri** | **str** | For `standard` checks, redirect to this URI when the applicant has submitted their data. Read-only. | [optional]
12+
**form_uri** | **str** | A link to the applicant form, if `applicant_provides_data` is `true`. Read-only. | [optional]
13+
**redirect_uri** | **str** | For checks where `applicant_provides_data` is `true`, redirect to this URI when the applicant has submitted their data. Read-only. | [optional]
1414
**results_uri** | **str** | A link to the corresponding results page on the Onfido dashboard. | [optional]
15-
**type** | **str** | The type of the check, `standard` or `express`. |
16-
**report_type_groups** | **list[str]** | Array containing ids of the Report type groups being requested for. Write-only. | [optional]
15+
**report_names** | **list[str]** | An array of report names (strings). | [optional]
16+
**applicant_id** | **str** | The ID of the applicant to do the check on. | [optional]
1717
**tags** | **list[str]** | Array of tags being assigned to this check. | [optional]
18-
**suppress_form_emails** | **bool** | For standard checks, applicant form will not be automatically sent if this is set to true. You can manually send the form at any time after the check has been created, using the link found in the form_uri attribute of the check object. Write-only. Defaults to false. | [optional]
19-
**charge_applicant_for_check** | **bool** | For standard checks, applicants will be presented with a mandatory payment screen before they can submit the applicant form, if this is set to true. In this case, your account will not be charged. Write-only. Defaults to false. | [optional]
20-
**brand_id** | **str** | ID of the brand under which the check should be conducted. Write-only. | [optional]
21-
**asynchronous** | **bool** | If this is set to true, we will queue checks for processing and return a response immediately. You can configure webhooks to notify you when the report is complete. Write-only. Defaults to false. | [optional]
22-
**reports** | [**list[Report]**](Report.md) | An array of reports. | [optional]
18+
**applicant_provides_data** | **bool** | Send an applicant form to applicant to complete to proceed with check. Defaults to false. | [optional]
19+
**suppress_form_emails** | **bool** | For checks where `applicant_provides_data` is `true`, applicant form will not be automatically sent if `suppress_form_emails` is set to `true`. You can manually send the form at any time after the check has been created, using the link found in the form_uri attribute of the check object. Write-only. Defaults to false. | [optional]
20+
**asynchronous** | **bool** | Defaults to `true`. Write-only. If set to `false`, you will only receive a response when all reports in your check have completed. | [optional]
21+
**report_ids** | **list[str]** | An array of report ids. | [optional]
2322

2423
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
2524

docs/CheckCommon.md

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)