The Onfido API is used to submit check requests.
This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.
- API version: 3.6.0
- Package version: 1.0.0
- Generator version: 7.17.0
- Build package: org.openapitools.codegen.languages.GoClientCodegen
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/contextPut the package under your project folder and add the following in import:
import onfido_openapi "github.com/wallester/go-onfido-openapi"To use a proxy, set the environment variable HTTP_PROXY:
os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.
For using other server than the one defined on index 0 set context value onfido_openapi.ContextServerIndex of type int.
ctx := context.WithValue(context.Background(), onfido_openapi.ContextServerIndex, 1)Templated server URL is formatted using default variables from configuration or from context value onfido_openapi.ContextServerVariables of type map[string]string.
ctx := context.WithValue(context.Background(), onfido_openapi.ContextServerVariables, map[string]string{
"basePath": "v2",
})Note, enum values are always validated and all unused variables are silently ignored.
Each operation can use different server URL defined using OperationServers map in the Configuration.
An operation is uniquely identified by "{classname}Service.{nickname}" string.
Similar rules for overriding default operation server index and variables applies by using onfido_openapi.ContextOperationServerIndices and onfido_openapi.ContextOperationServerVariables context maps.
ctx := context.WithValue(context.Background(), onfido_openapi.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), onfido_openapi.ContextOperationServerVariables, map[string]map[string]string{
"{classname}Service.{nickname}": {
"port": "8443",
},
})All URIs are relative to https://api.eu.onfido.com/v3.6
| Class | Method | HTTP request | Description |
|---|---|---|---|
| DefaultAPI | CancelReport | Post /reports/{report_id}/cancel | This endpoint is for cancelling individual paused reports. |
| DefaultAPI | CompleteTask | Post /workflow_runs/{workflow_run_id}/tasks/{task_id}/complete | Completes a Send / Receive Data task. |
| DefaultAPI | CreateApplicant | Post /applicants | Create Applicant |
| DefaultAPI | CreateCheck | Post /checks | Create a check |
| DefaultAPI | CreateWebhook | Post /webhooks | Create a webhook |
| DefaultAPI | CreateWorkflowRun | Post /workflow_runs | Create a Workflow Run. |
| DefaultAPI | DeleteWebhook | Delete /webhooks/{webhook_id} | Delete a webhook |
| DefaultAPI | DestroyApplicant | Delete /applicants/{applicant_id} | Delete Applicant |
| DefaultAPI | DownloadCheck | Get /checks/{check_id}/download | Download a PDF of the check |
| DefaultAPI | DownloadDocument | Get /documents/{document_id}/download | Download a documents raw data |
| DefaultAPI | DownloadLivePhoto | Get /live_photos/{live_photo_id}/download | Download live photo |
| DefaultAPI | DownloadLiveVideo | Get /live_videos/{live_video_id}/download | Download live video |
| DefaultAPI | DownloadLiveVideoFrame | Get /live_videos/{live_video_id}/frame | Download live video frame |
| DefaultAPI | EditWebhook | Put /webhooks/{webhook_id} | Edit a webhook |
| DefaultAPI | FindAddresses | Get /addresses/pick | Search for addresses by postcode |
| DefaultAPI | FindApplicant | Get /applicants/{applicant_id} | Retrieve Applicant |
| DefaultAPI | FindCheck | Get /checks/{check_id} | Retrieve a Check |
| DefaultAPI | FindDocument | Get /documents/{document_id} | A single document can be retrieved by calling this endpoint with the document’s unique identifier. |
| DefaultAPI | FindLivePhoto | Get /live_photos/{live_photo_id} | Retrieve live photo |
| DefaultAPI | FindLiveVideo | Get /live_videos/{live_video_id} | Retrieve live video |
| DefaultAPI | FindReport | Get /reports/{report_id} | A single report can be retrieved using this endpoint with the corresponding unique identifier. |
| DefaultAPI | FindWebhook | Get /webhooks/{webhook_id} | Retrieve a Webhook |
| DefaultAPI | GenerateSdkToken | Post /sdk_token | Generate a SDK token |
| DefaultAPI | ListApplicants | Get /applicants | List Applicants |
| DefaultAPI | ListChecks | Get /checks | Retrieve Checks |
| DefaultAPI | ListDocuments | Get /documents | List documents |
| DefaultAPI | ListLivePhotos | Get /live_photos | List live photos |
| DefaultAPI | ListLiveVideos | Get /live_videos | List live videos |
| DefaultAPI | ListReports | Get /reports | All the reports belonging to a particular check can be listed from this endpoint. |
| DefaultAPI | ListTasks | Get /workflow_runs/{workflow_run_id}/tasks | The tasks of a Workflow can be retrieved by calling this endpoint with the unique identifier of the Workflow Run. |
| DefaultAPI | ListWebhooks | Get /webhooks | List webhooks |
| DefaultAPI | ListWorkflowRuns | Get /workflow_runs | List Workflow Runs. |
| DefaultAPI | Ping | Get /ping | Run a health check on the Onfido API |
| DefaultAPI | RestoreApplicant | Post /applicants/{applicant_id}/restore | Restore Applicant |
| DefaultAPI | ResumeCheck | Post /checks/{check_id}/resume | Resume a Check |
| DefaultAPI | ResumeReport | Post /reports/{report_id}/resume | This endpoint is for resuming individual paused reports. |
| DefaultAPI | RetrieveTask | Get /workflow_runs/{workflow_run_id}/tasks/{task_id} | A single task can be retrieved by calling this endpoint with the unique identifier of the Task and Workflow Run. |
| DefaultAPI | RetrieveWorkflowRun | Get /workflow_runs/{workflow_run_id} | A single workflow run can be retrieved by calling this endpoint with the unique identifier of the Workflow Run. |
| DefaultAPI | UpdateApplicant | Put /applicants/{applicant_id} | Update Applicant |
| DefaultAPI | UploadDocument | Post /documents | Upload a document |
| DefaultAPI | UploadLivePhoto | Post /live_photos | Upload live photo |
- Address
- AddressesList
- Applicant
- ApplicantsList
- Check
- ChecksList
- CompleteTaskRequest
- CreateWorkflowRunRequest
- DeviceIntelligenceBreakdown
- DeviceIntelligenceBreakdownDevice
- DeviceIntelligenceBreakdownDeviceBreakdown
- DeviceIntelligenceProperties
- DeviceIntelligencePropertiesDevice
- DeviceIntelligencePropertiesGeolocation
- DeviceIntelligencePropertiesIp
- DeviceIntelligenceReport
- Document
- DocumentBreakdown
- DocumentBreakdownAgeValidation
- DocumentBreakdownAgeValidationBreakdown
- DocumentBreakdownCompromisedDocument
- DocumentBreakdownCompromisedDocumentBreakdown
- DocumentBreakdownDataComparison
- DocumentBreakdownDataComparisonBreakdown
- DocumentBreakdownDataComparisonBreakdownIssuingCountry
- DocumentBreakdownDataConsistency
- DocumentBreakdownDataConsistencyBreakdown
- DocumentBreakdownDataValidation
- DocumentBreakdownDataValidationBreakdown
- DocumentBreakdownDataValidationBreakdownDocumentExpiration
- DocumentBreakdownDataValidationBreakdownExpiryDate
- DocumentBreakdownImageIntegrity
- DocumentBreakdownImageIntegrityBreakdown
- DocumentBreakdownImageIntegrityBreakdownColourPicture
- DocumentBreakdownImageIntegrityBreakdownConclusiveDocumentQuality
- DocumentBreakdownImageIntegrityBreakdownImageQuality
- DocumentBreakdownImageIntegrityBreakdownSupportedDocument
- DocumentBreakdownIssuingAuthority
- DocumentBreakdownIssuingAuthorityBreakdown
- DocumentBreakdownIssuingAuthorityBreakdownNfcActiveAuthentication
- DocumentBreakdownIssuingAuthorityBreakdownNfcPassiveAuthentication
- DocumentBreakdownPoliceRecord
- DocumentBreakdownVisualAuthenticity
- DocumentBreakdownVisualAuthenticityBreakdown
- DocumentBreakdownVisualAuthenticityBreakdownDigitalTampering
- DocumentBreakdownVisualAuthenticityBreakdownFaceDetection
- DocumentBreakdownVisualAuthenticityBreakdownFonts
- DocumentBreakdownVisualAuthenticityBreakdownOriginalDocumentPresent
- DocumentBreakdownVisualAuthenticityBreakdownOther
- DocumentBreakdownVisualAuthenticityBreakdownPictureFaceIntegrity
- DocumentBreakdownVisualAuthenticityBreakdownSecurityFeatures
- DocumentBreakdownVisualAuthenticityBreakdownTemplate
- DocumentCDQReasons
- DocumentIQReasons
- DocumentODPReasons
- DocumentProperties
- DocumentPropertiesAddressLines
- DocumentPropertiesBarcodeInner
- DocumentPropertiesDocumentClassification
- DocumentPropertiesDocumentNumbersInner
- DocumentPropertiesDrivingLicenceInformation
- DocumentPropertiesExtractedData
- DocumentPropertiesNfc
- DocumentReport
- DocumentWithAddressInformationReport
- DocumentWithDriverVerificationReport
- DocumentWithDriverVerificationReportAllOfProperties
- DocumentWithDriverVerificationReportAllOfPropertiesAllOfVehicleClassDetailsInner
- DocumentWithDrivingLicenceInformationReport
- DocumentsList
- Error
- ErrorProperties
- FacialSimilarityPhotoBreakdown
- FacialSimilarityPhotoBreakdownFaceComparison
- FacialSimilarityPhotoBreakdownFaceComparisonBreakdown
- FacialSimilarityPhotoBreakdownFaceComparisonBreakdownFaceMatch
- FacialSimilarityPhotoBreakdownFaceComparisonBreakdownFaceMatchProperties
- FacialSimilarityPhotoBreakdownImageIntegrity
- FacialSimilarityPhotoBreakdownImageIntegrityBreakdown
- FacialSimilarityPhotoBreakdownImageIntegrityBreakdownFaceDetected
- FacialSimilarityPhotoBreakdownImageIntegrityBreakdownSourceIntegrity
- FacialSimilarityPhotoBreakdownVisualAuthenticity
- FacialSimilarityPhotoBreakdownVisualAuthenticityBreakdown
- FacialSimilarityPhotoBreakdownVisualAuthenticityBreakdownSpoofingDetection
- FacialSimilarityPhotoBreakdownVisualAuthenticityBreakdownSpoofingDetectionProperties
- FacialSimilarityPhotoReport
- FacialSimilarityVideoBreakdown
- FacialSimilarityVideoBreakdownFaceComparison
- FacialSimilarityVideoBreakdownImageIntegrity
- FacialSimilarityVideoBreakdownImageIntegrityBreakdown
- FacialSimilarityVideoBreakdownImageIntegrityBreakdownFaceDetected
- FacialSimilarityVideoBreakdownImageIntegrityBreakdownSourceIntegrity
- FacialSimilarityVideoBreakdownVisualAuthenticity
- FacialSimilarityVideoBreakdownVisualAuthenticityBreakdown
- FacialSimilarityVideoBreakdownVisualAuthenticityBreakdownLivenessDetected
- FacialSimilarityVideoBreakdownVisualAuthenticityBreakdownSpoofingDetection
- FacialSimilarityVideoReport
- IdNumber
- IdentityEnhancedBreakdown
- IdentityEnhancedBreakdownAddress
- IdentityEnhancedBreakdownAddressBreakdown
- IdentityEnhancedBreakdownAddressBreakdownCreditAgencies
- IdentityEnhancedBreakdownAddressBreakdownCreditAgenciesProperties
- IdentityEnhancedBreakdownAddressBreakdownTelephoneDatabase
- IdentityEnhancedBreakdownAddressBreakdownVotingRegister
- IdentityEnhancedBreakdownDateOfBirth
- IdentityEnhancedBreakdownDateOfBirthBreakdown
- IdentityEnhancedBreakdownDateOfBirthBreakdownCreditAgencies
- IdentityEnhancedBreakdownDateOfBirthBreakdownVotingRegister
- IdentityEnhancedBreakdownMortality
- IdentityEnhancedBreakdownSources
- IdentityEnhancedBreakdownSourcesBreakdown
- IdentityEnhancedBreakdownSourcesBreakdownTotalSources
- IdentityEnhancedBreakdownSourcesBreakdownTotalSourcesProperties
- IdentityEnhancedProperties
- IdentityEnhancedPropertiesMatchedAddressesInner
- IdentityEnhancedReport
- KnownFacesBreakdown
- KnownFacesBreakdownImageIntegrity
- KnownFacesBreakdownPreviouslySeenFaces
- KnownFacesProperties
- KnownFacesPropertiesMatchesInner
- KnownFacesReport
- ListTasks200Response
- ListTasks200ResponseTasksInner
- LivePhoto
- LivePhotosList
- LiveVideo
- LiveVideosList
- Location
- PhotoAutoReasons
- PhotoFullyAutoBreakdown
- PhotoFullyAutoBreakdownImageIntegrity
- PhotoFullyAutoBreakdownImageIntegrityBreakdown
- PhotoFullyAutoBreakdownImageIntegrityBreakdownSourceIntegrity
- PhotoFullyAutoReport
- PhotoReasons
- ProofOfAddressBreakdown
- ProofOfAddressBreakdownDataComparison
- ProofOfAddressBreakdownDataComparisonBreakdown
- ProofOfAddressBreakdownDocumentClassification
- ProofOfAddressBreakdownDocumentClassificationBreakdown
- ProofOfAddressBreakdownImageIntegrity
- ProofOfAddressBreakdownImageIntegrityBreakdown
- ProofOfAddressProperties
- ProofOfAddressReport
- Report
- ReportCommon
- ReportDocument
- ReportsList
- RightToWorkBreakdown
- RightToWorkBreakdownAgeValidation
- RightToWorkBreakdownDataConsistency
- RightToWorkBreakdownDataConsistencyBreakdown
- RightToWorkBreakdownDataValidation
- RightToWorkBreakdownDataValidationBreakdown
- RightToWorkBreakdownDataValidationBreakdownDocumentNumbers
- RightToWorkBreakdownDataValidationBreakdownDocumentNumbersProperties
- RightToWorkBreakdownImageIntegrity
- RightToWorkBreakdownImageIntegrityBreakdown
- RightToWorkBreakdownRightToWork
- RightToWorkBreakdownRightToWorkBreakdown
- RightToWorkBreakdownRightToWorkBreakdownApplicantHasTheRightToWork
- RightToWorkBreakdownShareCodeValidation
- RightToWorkBreakdownShareCodeValidationBreakdown
- RightToWorkBreakdownShareCodeValidationBreakdownApplicantHasValidShareCode
- RightToWorkBreakdownShareCodeValidationBreakdownDocumentId
- RightToWorkBreakdownShareCodeValidationBreakdownDocumentIdProperties
- RightToWorkBreakdownShareCodeValidationBreakdownNameMatched
- RightToWorkBreakdownVisualAuthenticity
- RightToWorkBreakdownVisualAuthenticityBreakdown
- RightToWorkProperties
- RightToWorkReport
- SdkToken
- Task
- VideoReasons
- WatchlistEnhancedBreakdown
- WatchlistEnhancedBreakdownAdverseMedia
- WatchlistEnhancedBreakdownMonitoredLists
- WatchlistEnhancedBreakdownPoliticallyExposedPerson
- WatchlistEnhancedBreakdownSanction
- WatchlistEnhancedProperties
- WatchlistEnhancedReport
- WatchlistPepsOnlyReport
- WatchlistSanctionsOnlyReport
- WatchlistStandardBreakdown
- WatchlistStandardProperties
- WatchlistStandardReport
- Webhook
- WebhooksList
- WorkflowRun
- WorkflowRunError
- WorkflowRunLink
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header
Note, each API key must be added to a map of map[string]APIKey where the key is: Token and passed in as the auth context for each request.
Example
auth := context.WithValue(
context.Background(),
onfido_openapi.ContextAPIKeys,
map[string]onfido_openapi.APIKey{
"Token": {Key: "API_KEY_STRING"},
},
)
r, err := client.Service.Operation(auth, args)Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:
PtrBoolPtrIntPtrInt32PtrInt64PtrFloatPtrFloat32PtrFloat64PtrStringPtrTime