The Onfido API (v3.6)
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: v3.6
- Package version: 1.0.0
- Generator version: 7.9.0-SNAPSHOT
- Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://public.support.onfido.com
Install the following dependencies:
go get github.com/stretchr/testify/assert
go get golang.org/x/net/context
Put the package under your project folder and add the following in import:
import openapi "github.com/dhia-gharsallaoui/go-onfido"
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 openapi.ContextServerIndex
of type int
.
ctx := context.WithValue(context.Background(), openapi.ContextServerIndex, 1)
Templated server URL is formatted using default variables from configuration or from context value openapi.ContextServerVariables
of type map[string]string
.
ctx := context.WithValue(context.Background(), 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 openapi.ContextOperationServerIndices
and openapi.ContextOperationServerVariables
context maps.
ctx := context.WithValue(context.Background(), openapi.ContextOperationServerIndices, map[string]int{
"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), 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 | Cancel report |
DefaultAPI | CompleteTask | Post /workflow_runs/{workflow_run_id}/tasks/{task_id}/complete | Complete Task |
DefaultAPI | CreateApplicant | Post /applicants | Create Applicant |
DefaultAPI | CreateCheck | Post /checks | Create a check |
DefaultAPI | CreateTimelineFile | Post /workflow_runs/{workflow_run_id}/timeline_file | Create Timeline File for Workflow Run |
DefaultAPI | CreateWatchlistMonitor | Post /watchlist_monitors | Create monitor |
DefaultAPI | CreateWebhook | Post /webhooks | Register webhook |
DefaultAPI | CreateWorkflowRun | Post /workflow_runs | Create a Workflow Run |
DefaultAPI | DeleteApplicant | Delete /applicants/{applicant_id} | Delete Applicant |
DefaultAPI | DeleteWatchlistMonitor | Delete /watchlist_monitors/{monitor_id} | Delete monitor |
DefaultAPI | DeleteWebhook | Delete /webhooks/{webhook_id} | Delete a webhook |
DefaultAPI | DownloadCheck | Get /checks/{check_id}/download | Download check |
DefaultAPI | DownloadDocument | Get /documents/{document_id}/download | Download document |
DefaultAPI | DownloadDocumentVideo | Get /documents/{document_id}/video/download | Download document video |
DefaultAPI | DownloadIdPhoto | Get /id_photos/{id_photo_id}/download | Download ID photo |
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 | DownloadMotionCapture | Get /motion_captures/{motion_capture_id}/download | Download motion capture |
DefaultAPI | DownloadMotionCaptureFrame | Get /motion_captures/{motion_capture_id}/frame | Download motion capture frame |
DefaultAPI | DownloadQesDocument | Get /qualified_electronic_signature/documents | Retrieves the signed document or application form |
DefaultAPI | DownloadSignedEvidenceFile | Get /workflow_runs/{workflow_run_id}/signed_evidence_file | Retrieve Workflow Run Evidence Summary File |
DefaultAPI | Extract | Post /extractions | Autofill |
DefaultAPI | FindAddresses | Get /addresses/pick | Address Picker |
DefaultAPI | FindApplicant | Get /applicants/{applicant_id} | Retrieve Applicant |
DefaultAPI | FindCheck | Get /checks/{check_id} | Retrieve a Check |
DefaultAPI | FindDocument | Get /documents/{document_id} | Retrieve document |
DefaultAPI | FindIdPhoto | Get /id_photos/{id_photo_id} | Retrieve ID photo |
DefaultAPI | FindLivePhoto | Get /live_photos/{live_photo_id} | Retrieve live photo |
DefaultAPI | FindLiveVideo | Get /live_videos/{live_video_id} | Retrieve live video |
DefaultAPI | FindMotionCapture | Get /motion_captures/{motion_capture_id} | Retrieve motion capture |
DefaultAPI | FindReport | Get /reports/{report_id} | Retrieve report |
DefaultAPI | FindTask | Get /workflow_runs/{workflow_run_id}/tasks/{task_id} | Retrieve Task |
DefaultAPI | FindTimelineFile | Get /workflow_runs/{workflow_run_id}/timeline_file/{timeline_file_id} | Retrieve Timeline File for Workflow Run |
DefaultAPI | FindWatchlistMonitor | Get /watchlist_monitors/{monitor_id} | Retrieve monitor |
DefaultAPI | FindWebhook | Get /webhooks/{webhook_id} | Retrieve a Webhook |
DefaultAPI | FindWorkflowRun | Get /workflow_runs/{workflow_run_id} | Retrieve Workflow Run |
DefaultAPI | ForceReportCreationFromWatchlistMonitor | Post /watchlist_monitors/{monitor_id}/new_report | Force new report creation (BETA) |
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 | ListIdPhotos | Get /id_photos | List ID photos |
DefaultAPI | ListLivePhotos | Get /live_photos | List live photos |
DefaultAPI | ListLiveVideos | Get /live_videos | List live videos |
DefaultAPI | ListMotionCaptures | Get /motion_captures | List motion captures |
DefaultAPI | ListRepeatAttempts | Get /repeat_attempts/{report_id} | Retrieve repeat attempts |
DefaultAPI | ListReports | Get /reports | List reports |
DefaultAPI | ListTasks | Get /workflow_runs/{workflow_run_id}/tasks | List Tasks |
DefaultAPI | ListWatchlistMonitorMatches | Get /watchlist_monitors/{monitor_id}/matches | List matches (BETA) |
DefaultAPI | ListWatchlistMonitors | Get /watchlist_monitors | List monitors |
DefaultAPI | ListWebhooks | Get /webhooks | List webhooks |
DefaultAPI | ListWorkflowRuns | Get /workflow_runs | List Workflow Runs |
DefaultAPI | Ping | Get /ping | Ping |
DefaultAPI | PostResultsFeedback | Post /results_feedback | Fraud reporting (ALPHA) |
DefaultAPI | ResendWebhooks | Post /webhooks/resend | Resends webhooks |
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 | Resume report |
DefaultAPI | UpdateApplicant | Put /applicants/{applicant_id} | Update Applicant |
DefaultAPI | UpdateWatchlistMonitorMatch | Patch /watchlist_monitors/{monitor_id}/matches | Set match status (BETA) |
DefaultAPI | UpdateWebhook | Put /webhooks/{webhook_id} | Edit a webhook |
DefaultAPI | UploadDocument | Post /documents | Upload a document |
DefaultAPI | UploadIdPhoto | Post /id_photos | Upload ID photo |
DefaultAPI | UploadLivePhoto | Post /live_photos | Upload live photo |
- Address
- AddressBuilder
- AddressShared
- AddressesList
- Applicant
- ApplicantBuilder
- ApplicantCreate
- ApplicantRequest
- ApplicantResponse
- ApplicantShared
- ApplicantUpdate
- ApplicantUpdater
- ApplicantsList
- Check
- CheckBuilder
- CheckRequest
- CheckResponse
- CheckShared
- ChecksList
- CompleteTaskBuilder
- CompleteTaskDataBuilder
- ConsentItem
- ConsentsBuilder
- CountryCodes
- DeviceIntelligenceBreakdown
- DeviceIntelligenceBreakdownBreakdown
- DeviceIntelligenceBreakdownBreakdownDevice
- DeviceIntelligenceBreakdownBreakdownDeviceBreakdown
- DeviceIntelligenceBreakdownProperties
- DeviceIntelligenceBreakdownPropertiesDevice
- DeviceIntelligenceBreakdownPropertiesGeolocation
- DeviceIntelligenceBreakdownPropertiesIp
- 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
- DocumentResponse
- DocumentShared
- DocumentTypes
- DocumentVideoReport
- DocumentVideoWithAddressInformationReport
- DocumentWithAddressInformationReport
- DocumentWithDriverVerificationReport
- DocumentWithDriverVerificationReportAllOfProperties
- DocumentWithDriverVerificationReportAllOfPropertiesAllOfPassengerVehicle
- DocumentWithDriverVerificationReportAllOfPropertiesAllOfVehicleClassDetailsInner
- DocumentWithDrivingLicenceInformationReport
- DocumentsList
- Error
- Error1
- ErrorProperties
- ErrorProperties1
- ExtractRequest
- Extraction
- ExtractionDocumentClassification
- ExtractionExtractedData
- FacialSimilarityMotionBreakdown
- FacialSimilarityMotionBreakdownFaceComparison
- FacialSimilarityMotionBreakdownImageIntegrity
- FacialSimilarityMotionBreakdownImageIntegrityBreakdown
- FacialSimilarityMotionBreakdownImageIntegrityBreakdownFaceDetected
- FacialSimilarityMotionBreakdownImageIntegrityBreakdownSourceIntegrity
- FacialSimilarityMotionBreakdownVisualAuthenticity
- FacialSimilarityMotionBreakdownVisualAuthenticityBreakdown
- FacialSimilarityMotionBreakdownVisualAuthenticityBreakdownSpoofingDetection
- FacialSimilarityMotionProperties
- FacialSimilarityMotionReport
- FacialSimilarityPhotoBreakdown
- FacialSimilarityPhotoBreakdownFaceComparison
- FacialSimilarityPhotoBreakdownFaceComparisonBreakdown
- FacialSimilarityPhotoBreakdownFaceComparisonBreakdownFaceMatch
- FacialSimilarityPhotoBreakdownFaceComparisonBreakdownFaceMatchProperties
- FacialSimilarityPhotoBreakdownImageIntegrity
- FacialSimilarityPhotoBreakdownImageIntegrityBreakdown
- FacialSimilarityPhotoBreakdownImageIntegrityBreakdownFaceDetected
- FacialSimilarityPhotoBreakdownImageIntegrityBreakdownSourceIntegrity
- FacialSimilarityPhotoBreakdownVisualAuthenticity
- FacialSimilarityPhotoBreakdownVisualAuthenticityBreakdown
- FacialSimilarityPhotoBreakdownVisualAuthenticityBreakdownSpoofingDetection
- FacialSimilarityPhotoBreakdownVisualAuthenticityBreakdownSpoofingDetectionProperties
- FacialSimilarityPhotoFullyAutoBreakdown
- FacialSimilarityPhotoFullyAutoBreakdownImageIntegrity
- FacialSimilarityPhotoFullyAutoBreakdownImageIntegrityBreakdown
- FacialSimilarityPhotoFullyAutoBreakdownImageIntegrityBreakdownSourceIntegrity
- FacialSimilarityPhotoFullyAutoProperties
- FacialSimilarityPhotoFullyAutoReport
- FacialSimilarityPhotoProperties
- FacialSimilarityPhotoReport
- FacialSimilarityVideoBreakdown
- FacialSimilarityVideoBreakdownFaceComparison
- FacialSimilarityVideoBreakdownImageIntegrity
- FacialSimilarityVideoBreakdownImageIntegrityBreakdown
- FacialSimilarityVideoBreakdownImageIntegrityBreakdownFaceDetected
- FacialSimilarityVideoBreakdownImageIntegrityBreakdownSourceIntegrity
- FacialSimilarityVideoBreakdownVisualAuthenticity
- FacialSimilarityVideoBreakdownVisualAuthenticityBreakdown
- FacialSimilarityVideoBreakdownVisualAuthenticityBreakdownLivenessDetected
- FacialSimilarityVideoBreakdownVisualAuthenticityBreakdownSpoofingDetection
- FacialSimilarityVideoProperties
- FacialSimilarityVideoReport
- IdNumber
- IdPhoto
- IdPhotoResponse
- IdPhotosList
- IdentityEnhancedBreakdown
- IdentityEnhancedBreakdownAddress
- IdentityEnhancedBreakdownAddressBreakdown
- IdentityEnhancedBreakdownAddressBreakdownCreditAgencies
- IdentityEnhancedBreakdownAddressBreakdownCreditAgenciesProperties
- IdentityEnhancedBreakdownAddressBreakdownTelephoneDatabase
- IdentityEnhancedBreakdownAddressBreakdownVotingRegister
- IdentityEnhancedBreakdownDateOfBirth
- IdentityEnhancedBreakdownDateOfBirthBreakdown
- IdentityEnhancedBreakdownDateOfBirthBreakdownCreditAgencies
- IdentityEnhancedBreakdownDateOfBirthBreakdownVotingRegister
- IdentityEnhancedBreakdownMortality
- IdentityEnhancedBreakdownSources
- IdentityEnhancedBreakdownSourcesBreakdown
- IdentityEnhancedBreakdownSourcesBreakdownTotalSources
- IdentityEnhancedBreakdownSourcesBreakdownTotalSourcesProperties
- IdentityEnhancedProperties
- IdentityEnhancedPropertiesMatchedAddressesInner
- IdentityEnhancedReport
- IndiaPanReport
- IndiaPanReportAllOfBreakdown
- IndiaPanReportAllOfBreakdownDevice
- IndiaPanReportAllOfBreakdownDeviceBreakdown
- IndiaPanReportAllOfBreakdownDeviceBreakdownPanValid
- IndiaPanReportAllOfProperties
- IndiaPanReportAllOfPropertiesDevice
- KnownFacesBreakdown
- KnownFacesBreakdownImageIntegrity
- KnownFacesBreakdownPreviouslySeenFaces
- KnownFacesProperties
- KnownFacesPropertiesMatchesInner
- KnownFacesReport
- LivePhoto
- LivePhotoResponse
- LivePhotosList
- LiveVideo
- LiveVideosList
- Location
- LocationBuilder
- LocationShared
- MotionCapture
- MotionCapturesList
- PhotoAutoReasons
- PhotoReasons
- ProofOfAddressBreakdown
- ProofOfAddressBreakdownDataComparison
- ProofOfAddressBreakdownDataComparisonBreakdown
- ProofOfAddressBreakdownDocumentClassification
- ProofOfAddressBreakdownDocumentClassificationBreakdown
- ProofOfAddressBreakdownImageIntegrity
- ProofOfAddressBreakdownImageIntegrityBreakdown
- ProofOfAddressProperties
- ProofOfAddressReport
- RepeatAttemptsList
- RepeatAttemptsListRepeatAttemptsInner
- Report
- ReportDocument
- ReportName
- ReportResult
- ReportShared
- ReportStatus
- ReportSubResult
- ReportsList
- ResultsFeedback
- SdkToken
- SdkTokenBuilder
- SdkTokenRequest
- SdkTokenResponse
- Task
- TaskItem
- TimelineFileReference
- UsDrivingLicenceBreakdown
- UsDrivingLicenceBreakdownAddress
- UsDrivingLicenceBreakdownAddressBreakdown
- UsDrivingLicenceBreakdownDocument
- UsDrivingLicenceBreakdownDocumentBreakdown
- UsDrivingLicenceBreakdownPersonal
- UsDrivingLicenceBreakdownPersonalBreakdown
- UsDrivingLicenceBuilder
- UsDrivingLicenceReport
- UsDrivingLicenceShared
- VideoReasons
- WatchlistAmlBreakdown
- WatchlistAmlBreakdownAdverseMedia
- WatchlistAmlBreakdownLegalAndRegulatoryWarnings
- WatchlistAmlBreakdownPoliticallyExposedPerson
- WatchlistAmlBreakdownSanction
- WatchlistAmlProperties
- WatchlistAmlReport
- WatchlistEnhancedBreakdown
- WatchlistEnhancedProperties
- WatchlistEnhancedReport
- WatchlistMonitor
- WatchlistMonitorBuilder
- WatchlistMonitorMatch
- WatchlistMonitorMatchesList
- WatchlistMonitorMatchesUpdater
- WatchlistMonitorResponse
- WatchlistMonitorShared
- WatchlistMonitorsList
- WatchlistPepsOnlyReport
- WatchlistSanctionsOnlyReport
- WatchlistStandardBreakdown
- WatchlistStandardProperties
- WatchlistStandardReport
- Webhook
- WebhookBuilder
- WebhookCreate
- WebhookEvent
- WebhookEventPayload
- WebhookEventPayloadObject
- WebhookEventType
- WebhookResend
- WebhookResponse
- WebhookShared
- WebhookUpdate
- WebhookUpdater
- WebhooksList
- WebhooksResendItem
- WorkflowRun
- WorkflowRunBuilder
- WorkflowRunRequest
- WorkflowRunResponse
- WorkflowRunResponseError
- WorkflowRunShared
- WorkflowRunSharedLink
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(),
openapi.ContextAPIKeys,
map[string]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:
PtrBool
PtrInt
PtrInt32
PtrInt64
PtrFloat
PtrFloat32
PtrFloat64
PtrString
PtrTime