Documentation
¶
Index ¶
- func Bool(b bool) param.Opt[bool]
- func BoolPtr(v bool) *bool
- func DefaultClientOptions() []option.RequestOption
- func File(rdr io.Reader, filename string, contentType string) file
- func Float(f float64) param.Opt[float64]
- func FloatPtr(v float64) *float64
- func Int(i int64) param.Opt[int64]
- func IntPtr(v int64) *int64
- func Opt[T comparable](v T) param.Opt[T]
- func Ptr[T any](v T) *T
- func String(s string) param.Opt[string]
- func StringPtr(v string) *string
- func Time(t time.Time) param.Opt[time.Time]
- func TimePtr(v time.Time) *time.Time
- type AmlSuspicion
- type AmlSuspicionStatus
- type AmlSuspicionType
- type Certificat
- type Check
- type Client
- func (r *Client) Delete(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, ...) error
- func (r *Client) Get(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Patch(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Post(ctx context.Context, path string, params any, res any, ...) error
- func (r *Client) Put(ctx context.Context, path string, params any, res any, ...) error
- type Company
- type CompanyCompany
- type CompanyCompanyContact
- type CompanyDocumentService
- type CompanyDocumentUploadParams
- type CompanyDocumentUploadParamsDocumentType
- type CompanyGetParams
- type CompanyListParams
- type CompanyListParamsState
- type CompanyListParamsStatus
- type CompanyMember
- type CompanyNewParams
- type CompanyNewParamsCompany
- type CompanyNewParamsTechnicalData
- type CompanyService
- func (r *CompanyService) Delete(ctx context.Context, companyID string, opts ...option.RequestOption) (err error)
- func (r *CompanyService) Get(ctx context.Context, companyID string, query CompanyGetParams, ...) (res *Company, err error)
- func (r *CompanyService) List(ctx context.Context, query CompanyListParams, opts ...option.RequestOption) (res *[]Company, err error)
- func (r *CompanyService) New(ctx context.Context, body CompanyNewParams, opts ...option.RequestOption) (res *Company, err error)
- func (r *CompanyService) Update(ctx context.Context, companyID string, body CompanyUpdateParams, ...) (res *Company, err error)
- type CompanyUpdateParams
- type CompanyUpdateParamsCompany
- type CompanyUpdateParamsTechnicalData
- type DocumentResponse
- type DocumentResponseDocument
- type Error
- type GenericDocument
- type GenericDocumentTable
- type GenericDocumentValue
- type Individual
- type IndividualDocumentService
- func (r *IndividualDocumentService) List(ctx context.Context, individualID string, opts ...option.RequestOption) (res *DocumentResponse, err error)
- func (r *IndividualDocumentService) Upload(ctx context.Context, individualID string, body IndividualDocumentUploadParams, ...) (res *GenericDocument, err error)
- type IndividualDocumentUploadParams
- type IndividualDocumentUploadParamsDocumentType
- type IndividualGetParams
- type IndividualIdentityCard
- type IndividualListParams
- type IndividualListParamsState
- type IndividualListParamsStatus
- type IndividualNewParams
- type IndividualNewParamsPerson
- type IndividualNewParamsTechnicalData
- type IndividualPerson
- type IndividualService
- func (r *IndividualService) Delete(ctx context.Context, individualID string, opts ...option.RequestOption) (err error)
- func (r *IndividualService) Get(ctx context.Context, individualID string, query IndividualGetParams, ...) (res *Individual, err error)
- func (r *IndividualService) List(ctx context.Context, query IndividualListParams, opts ...option.RequestOption) (res *[]Individual, err error)
- func (r *IndividualService) New(ctx context.Context, body IndividualNewParams, opts ...option.RequestOption) (res *Individual, err error)
- func (r *IndividualService) Update(ctx context.Context, individualID string, body IndividualUpdateParams, ...) (res *Individual, err error)
- type IndividualTag
- type IndividualUpdateParams
- type IndividualUpdateParamsPerson
- type IndividualUpdateParamsTechnicalData
- type Property
- type Risk
- type TechnicalData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultClientOptions ¶
func DefaultClientOptions() []option.RequestOption
DefaultClientOptions read from the environment (DATALEONLABS_API_KEY, DATALEONLABS_BASE_URL). This should be used to initialize new clients.
func Opt ¶
func Opt[T comparable](v T) param.Opt[T]
Types ¶
type AmlSuspicion ¶
type AmlSuspicion struct {
// Human-readable description or title for the suspicious finding.
Caption string `json:"caption"`
// Country associated with the suspicion (ISO 3166-1 alpha-2 code).
Country string `json:"country"`
// Gender associated with the suspicion, if applicable.
Gender string `json:"gender"`
// Nature of the relationship between the entity and the suspicious activity (e.g.,
// "linked", "associated").
Relation string `json:"relation"`
// Version of the evaluation schema or rule engine used.
Schema string `json:"schema"`
// Risk score between 0.0 and 1 indicating the severity of the suspicion.
Score float64 `json:"score"`
// Source system or service providing this suspicion.
Source string `json:"source"`
// Status of the suspicion review process. Possible values: "true_positive",
// "false_positive", "pending".
//
// Any of "true_positive", "false_positive", "pending".
Status AmlSuspicionStatus `json:"status"`
// Category of the suspicion. Possible values: "crime", "sanction", "pep",
// "adverse_news", "other".
//
// Any of "crime", "sanction", "pep", "adverse_news", "other".
Type AmlSuspicionType `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Caption respjson.Field
Country respjson.Field
Gender respjson.Field
Relation respjson.Field
Schema respjson.Field
Score respjson.Field
Source respjson.Field
Status respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents a record of suspicion raised during Anti-Money Laundering (AML) screening. Includes metadata such as risk score, origin, and linked watchlist types.
func (AmlSuspicion) RawJSON ¶
func (r AmlSuspicion) RawJSON() string
Returns the unmodified JSON received from the API
func (*AmlSuspicion) UnmarshalJSON ¶
func (r *AmlSuspicion) UnmarshalJSON(data []byte) error
type AmlSuspicionStatus ¶
type AmlSuspicionStatus string
Status of the suspicion review process. Possible values: "true_positive", "false_positive", "pending".
const ( AmlSuspicionStatusTruePositive AmlSuspicionStatus = "true_positive" AmlSuspicionStatusFalsePositive AmlSuspicionStatus = "false_positive" AmlSuspicionStatusPending AmlSuspicionStatus = "pending" )
type AmlSuspicionType ¶
type AmlSuspicionType string
Category of the suspicion. Possible values: "crime", "sanction", "pep", "adverse_news", "other".
const ( AmlSuspicionTypeCrime AmlSuspicionType = "crime" AmlSuspicionTypeSanction AmlSuspicionType = "sanction" AmlSuspicionTypePep AmlSuspicionType = "pep" AmlSuspicionTypeAdverseNews AmlSuspicionType = "adverse_news" AmlSuspicionTypeOther AmlSuspicionType = "other" )
type Certificat ¶
type Certificat struct {
// Unique identifier for the certificate.
ID string `json:"id"`
// Timestamp when the certificate was created.
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Name of the certificate file.
Filename string `json:"filename"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
Filename respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents a certificate file associated with an individual or company.
func (Certificat) RawJSON ¶
func (r Certificat) RawJSON() string
Returns the unmodified JSON received from the API
func (*Certificat) UnmarshalJSON ¶
func (r *Certificat) UnmarshalJSON(data []byte) error
type Check ¶
type Check struct {
// Indicates whether the result or data is masked/hidden.
Masked bool `json:"masked"`
// Additional message or explanation about the check result.
Message string `json:"message"`
// Name or type of the check performed.
Name string `json:"name"`
// Result of the check, true if passed.
Validate bool `json:"validate"`
// Importance or weight of the check, often used in scoring.
Weight int64 `json:"weight"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Masked respjson.Field
Message respjson.Field
Name respjson.Field
Validate respjson.Field
Weight respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents a verification check result.
func (*Check) UnmarshalJSON ¶
type Client ¶
type Client struct {
Options []option.RequestOption
Companies CompanyService
Individuals IndividualService
}
Client creates a struct with services and top level methods that help with interacting with the dataleonlabs API. You should not instantiate this client directly, and instead use the NewClient method instead.
func NewClient ¶
func NewClient(opts ...option.RequestOption) (r Client)
NewClient generates a new client with the default option read from the environment (DATALEONLABS_API_KEY, DATALEONLABS_BASE_URL). The option passed in as arguments are applied after these default arguments, and all option will be passed down to the services and requests that this client makes.
func (*Client) Delete ¶
func (r *Client) Delete(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Delete makes a DELETE request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Execute ¶
func (r *Client) Execute(ctx context.Context, method string, path string, params any, res any, opts ...option.RequestOption) error
Execute makes a request with the given context, method, URL, request params, response, and request options. This is useful for hitting undocumented endpoints while retaining the base URL, auth, retries, and other options from the client.
If a byte slice or an io.Reader is supplied to params, it will be used as-is for the request body.
The params is by default serialized into the body using encoding/json. If your type implements a MarshalJSON function, it will be used instead to serialize the request. If a URLQuery method is implemented, the returned url.Values will be used as query strings to the url.
If your params struct uses param.Field, you must provide either [MarshalJSON], [URLQuery], and/or [MarshalForm] functions. It is undefined behavior to use a struct uses param.Field without specifying how it is serialized.
Any "…Params" object defined in this library can be used as the request argument. Note that 'path' arguments will not be forwarded into the url.
The response body will be deserialized into the res variable, depending on its type:
- A pointer to a *http.Response is populated by the raw response.
- A pointer to a byte array will be populated with the contents of the request body.
- A pointer to any other type uses this library's default JSON decoding, which respects UnmarshalJSON if it is defined on the type.
- A nil value will not read the response body.
For even greater flexibility, see option.WithResponseInto and option.WithResponseBodyInto.
func (*Client) Get ¶
func (r *Client) Get(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Get makes a GET request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
func (*Client) Patch ¶
func (r *Client) Patch(ctx context.Context, path string, params any, res any, opts ...option.RequestOption) error
Patch makes a PATCH request with the given URL, params, and optionally deserializes to a response. See [Execute] documentation on the params and response.
type Company ¶
type Company struct {
// List of AML (Anti-Money Laundering) suspicion entries linked to the company,
// including their details.
AmlSuspicions []AmlSuspicion `json:"aml_suspicions"`
// Digital certificate associated with the company, if any, including its creation
// timestamp and filename.
Certificat Certificat `json:"certificat"`
// List of verification or validation checks applied to the company, including
// their results and messages.
Checks []Check `json:"checks"`
// Main information about the company being registered, including legal name,
// registration ID, and address.
Company CompanyCompany `json:"company"`
// All documents submitted or associated with the company, including their metadata
// and processing status.
Documents []GenericDocument `json:"documents"`
// List of members or actors associated with the company, including personal and
// ownership information.
Members []CompanyMember `json:"members"`
// Admin or internal portal URL for viewing the company's details, typically used
// by internal users.
PortalURL string `json:"portal_url"`
// Custom key-value metadata fields associated with the company, allowing for
// flexible data storage.
Properties []Property `json:"properties"`
// Risk assessment associated with the company, including a risk code, reason, and
// confidence score.
Risk Risk `json:"risk"`
// Optional identifier indicating the source of the company record, useful for
// tracking or integration purposes.
SourceID string `json:"source_id"`
// Technical metadata related to the request, such as IP address, QR code settings,
// and callback URLs.
TechnicalData TechnicalData `json:"technical_data"`
// Public-facing webview URL for the company’s identification process, allowing
// external access to the company data.
WebviewURL string `json:"webview_url"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AmlSuspicions respjson.Field
Certificat respjson.Field
Checks respjson.Field
Company respjson.Field
Documents respjson.Field
Members respjson.Field
PortalURL respjson.Field
Properties respjson.Field
Risk respjson.Field
SourceID respjson.Field
TechnicalData respjson.Field
WebviewURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (*Company) UnmarshalJSON ¶
type CompanyCompany ¶
type CompanyCompany struct {
// Full registered address of the company.
Address string `json:"address"`
// Closure date of the company, if applicable.
ClosureDate time.Time `json:"closure_date" format:"date"`
// Trade or commercial name of the company.
CommercialName string `json:"commercial_name"`
// Contact information for the company, including email, phone number, and address.
Contact CompanyCompanyContact `json:"contact"`
// Country code where the company is registered.
Country string `json:"country"`
// Contact email address for the company.
Email string `json:"email" format:"email"`
// Number of employees in the company.
Employees int64 `json:"employees"`
// Employer Identification Number (EIN) or equivalent.
EmployerIdentificationNumber string `json:"employer_identification_number"`
// Indicates whether an insolvency procedure exists for the company.
InsolvencyExists bool `json:"insolvency_exists"`
// Indicates whether an insolvency procedure is ongoing for the company.
InsolvencyOngoing bool `json:"insolvency_ongoing"`
// Legal form or structure of the company (e.g., LLC, SARL).
LegalForm string `json:"legal_form"`
// Legal registered name of the company.
Name string `json:"name"`
// Contact phone number for the company, including country code.
PhoneNumber string `json:"phone_number"`
// Date when the company was officially registered.
RegistrationDate time.Time `json:"registration_date" format:"date"`
// Official company registration number or ID.
RegistrationID string `json:"registration_id"`
ShareCapital string `json:"share_capital"`
// Current status of the company (e.g., active, inactive).
Status string `json:"status"`
// Tax identification number for the company.
TaxIdentificationNumber string `json:"tax_identification_number"`
// Type of company within the workspace, e.g., main or affiliated.
Type string `json:"type"`
// Official website URL of the company.
WebsiteURL string `json:"website_url" format:"uri"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Address respjson.Field
ClosureDate respjson.Field
CommercialName respjson.Field
Contact respjson.Field
Country respjson.Field
Email respjson.Field
Employees respjson.Field
EmployerIdentificationNumber respjson.Field
InsolvencyExists respjson.Field
InsolvencyOngoing respjson.Field
LegalForm respjson.Field
Name respjson.Field
PhoneNumber respjson.Field
RegistrationDate respjson.Field
RegistrationID respjson.Field
ShareCapital respjson.Field
Status respjson.Field
TaxIdentificationNumber respjson.Field
Type respjson.Field
WebsiteURL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Main information about the company being registered, including legal name, registration ID, and address.
func (CompanyCompany) RawJSON ¶
func (r CompanyCompany) RawJSON() string
Returns the unmodified JSON received from the API
func (*CompanyCompany) UnmarshalJSON ¶
func (r *CompanyCompany) UnmarshalJSON(data []byte) error
type CompanyCompanyContact ¶
type CompanyCompanyContact struct {
// Department of the contact person.
Department string `json:"department"`
// Email address of the contact person.
Email string `json:"email" format:"email"`
// First name of the contact person.
FirstName string `json:"first_name"`
// Last name of the contact person.
LastName string `json:"last_name"`
// Phone number of the contact person.
PhoneNumber string `json:"phone_number"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Department respjson.Field
Email respjson.Field
FirstName respjson.Field
LastName respjson.Field
PhoneNumber respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Contact information for the company, including email, phone number, and address.
func (CompanyCompanyContact) RawJSON ¶
func (r CompanyCompanyContact) RawJSON() string
Returns the unmodified JSON received from the API
func (*CompanyCompanyContact) UnmarshalJSON ¶
func (r *CompanyCompanyContact) UnmarshalJSON(data []byte) error
type CompanyDocumentService ¶
type CompanyDocumentService struct {
Options []option.RequestOption
}
CompanyDocumentService contains methods and other services that help with interacting with the dataleonlabs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCompanyDocumentService method instead.
func NewCompanyDocumentService ¶
func NewCompanyDocumentService(opts ...option.RequestOption) (r CompanyDocumentService)
NewCompanyDocumentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CompanyDocumentService) List ¶
func (r *CompanyDocumentService) List(ctx context.Context, companyID string, opts ...option.RequestOption) (res *DocumentResponse, err error)
Get documents to an company
func (*CompanyDocumentService) Upload ¶
func (r *CompanyDocumentService) Upload(ctx context.Context, companyID string, body CompanyDocumentUploadParams, opts ...option.RequestOption) (res *GenericDocument, err error)
Upload documents to an company
type CompanyDocumentUploadParams ¶
type CompanyDocumentUploadParams struct {
// Filter by document type for upload (must be one of the allowed values)
//
// Any of "liasse_fiscale", "amortised_loan_schedule", "invoice", "receipt",
// "company_statuts", "registration_company_certificate", "kbis", "rib",
// "livret_famille", "birth_certificate", "payslip", "social_security_card",
// "vehicle_registration_certificate", "carte_grise", "criminal_record_extract",
// "proof_of_address", "identity_card_front", "identity_card_back",
// "driver_license_front", "driver_license_back", "identity_document",
// "driver_license", "passport", "tax", "certificate_of_incorporation",
// "certificate_of_good_standing", "lcb_ft_lab_aml_policies", "niu_entreprise",
// "financial_statements", "rccm", "proof_of_source_funds", "organizational_chart",
// "risk_policies".
DocumentType CompanyDocumentUploadParamsDocumentType `json:"document_type,omitzero,required"`
// URL of the file to upload (either `file` or `url` is required)
URL param.Opt[string] `json:"url,omitzero" format:"uri"`
// File to upload (required)
File io.Reader `json:"file,omitzero" format:"binary"`
// contains filtered or unexported fields
}
func (CompanyDocumentUploadParams) MarshalMultipart ¶
func (r CompanyDocumentUploadParams) MarshalMultipart() (data []byte, contentType string, err error)
type CompanyDocumentUploadParamsDocumentType ¶
type CompanyDocumentUploadParamsDocumentType string
Filter by document type for upload (must be one of the allowed values)
const ( CompanyDocumentUploadParamsDocumentTypeLiasseFiscale CompanyDocumentUploadParamsDocumentType = "liasse_fiscale" CompanyDocumentUploadParamsDocumentTypeAmortisedLoanSchedule CompanyDocumentUploadParamsDocumentType = "amortised_loan_schedule" CompanyDocumentUploadParamsDocumentTypeInvoice CompanyDocumentUploadParamsDocumentType = "invoice" CompanyDocumentUploadParamsDocumentTypeReceipt CompanyDocumentUploadParamsDocumentType = "receipt" CompanyDocumentUploadParamsDocumentTypeCompanyStatuts CompanyDocumentUploadParamsDocumentType = "company_statuts" CompanyDocumentUploadParamsDocumentTypeRegistrationCompanyCertificate CompanyDocumentUploadParamsDocumentType = "registration_company_certificate" CompanyDocumentUploadParamsDocumentTypeKbis CompanyDocumentUploadParamsDocumentType = "kbis" CompanyDocumentUploadParamsDocumentTypeRib CompanyDocumentUploadParamsDocumentType = "rib" CompanyDocumentUploadParamsDocumentTypeLivretFamille CompanyDocumentUploadParamsDocumentType = "livret_famille" CompanyDocumentUploadParamsDocumentTypeBirthCertificate CompanyDocumentUploadParamsDocumentType = "birth_certificate" CompanyDocumentUploadParamsDocumentTypePayslip CompanyDocumentUploadParamsDocumentType = "payslip" CompanyDocumentUploadParamsDocumentTypeSocialSecurityCard CompanyDocumentUploadParamsDocumentType = "social_security_card" CompanyDocumentUploadParamsDocumentTypeVehicleRegistrationCertificate CompanyDocumentUploadParamsDocumentType = "vehicle_registration_certificate" CompanyDocumentUploadParamsDocumentTypeCarteGrise CompanyDocumentUploadParamsDocumentType = "carte_grise" CompanyDocumentUploadParamsDocumentTypeCriminalRecordExtract CompanyDocumentUploadParamsDocumentType = "criminal_record_extract" CompanyDocumentUploadParamsDocumentTypeProofOfAddress CompanyDocumentUploadParamsDocumentType = "proof_of_address" CompanyDocumentUploadParamsDocumentTypeIdentityCardFront CompanyDocumentUploadParamsDocumentType = "identity_card_front" CompanyDocumentUploadParamsDocumentTypeIdentityCardBack CompanyDocumentUploadParamsDocumentType = "identity_card_back" CompanyDocumentUploadParamsDocumentTypeDriverLicenseFront CompanyDocumentUploadParamsDocumentType = "driver_license_front" CompanyDocumentUploadParamsDocumentTypeDriverLicenseBack CompanyDocumentUploadParamsDocumentType = "driver_license_back" CompanyDocumentUploadParamsDocumentTypeIdentityDocument CompanyDocumentUploadParamsDocumentType = "identity_document" CompanyDocumentUploadParamsDocumentTypeDriverLicense CompanyDocumentUploadParamsDocumentType = "driver_license" CompanyDocumentUploadParamsDocumentTypePassport CompanyDocumentUploadParamsDocumentType = "passport" CompanyDocumentUploadParamsDocumentTypeTax CompanyDocumentUploadParamsDocumentType = "tax" CompanyDocumentUploadParamsDocumentTypeCertificateOfIncorporation CompanyDocumentUploadParamsDocumentType = "certificate_of_incorporation" CompanyDocumentUploadParamsDocumentTypeCertificateOfGoodStanding CompanyDocumentUploadParamsDocumentType = "certificate_of_good_standing" CompanyDocumentUploadParamsDocumentTypeLcbFtLabAmlPolicies CompanyDocumentUploadParamsDocumentType = "lcb_ft_lab_aml_policies" CompanyDocumentUploadParamsDocumentTypeNiuEntreprise CompanyDocumentUploadParamsDocumentType = "niu_entreprise" CompanyDocumentUploadParamsDocumentTypeFinancialStatements CompanyDocumentUploadParamsDocumentType = "financial_statements" CompanyDocumentUploadParamsDocumentTypeRccm CompanyDocumentUploadParamsDocumentType = "rccm" CompanyDocumentUploadParamsDocumentTypeProofOfSourceFunds CompanyDocumentUploadParamsDocumentType = "proof_of_source_funds" CompanyDocumentUploadParamsDocumentTypeOrganizationalChart CompanyDocumentUploadParamsDocumentType = "organizational_chart" CompanyDocumentUploadParamsDocumentTypeRiskPolicies CompanyDocumentUploadParamsDocumentType = "risk_policies" )
type CompanyGetParams ¶
type CompanyGetParams struct {
// Include document signed url
Document param.Opt[bool] `query:"document,omitzero" json:"-"`
// Scope filter (id or scope)
Scope param.Opt[string] `query:"scope,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CompanyGetParams) URLQuery ¶
func (r CompanyGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes CompanyGetParams's query parameters as `url.Values`.
type CompanyListParams ¶
type CompanyListParams struct {
// Filter companies created before this date (format YYYY-MM-DD)
EndDate param.Opt[time.Time] `query:"end_date,omitzero" format:"date" json:"-"`
// Number of results to return (between 1 and 100)
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of results to skip (must be ≥ 0)
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Filter by source ID
SourceID param.Opt[string] `query:"source_id,omitzero" json:"-"`
// Filter companies created after this date (format YYYY-MM-DD)
StartDate param.Opt[time.Time] `query:"start_date,omitzero" format:"date" json:"-"`
// Filter by workspace ID
WorkspaceID param.Opt[string] `query:"workspace_id,omitzero" json:"-"`
// Filter by company state (must be one of the allowed values)
//
// Any of "VOID", "WAITING", "STARTED", "RUNNING", "PROCESSED", "FAILED",
// "ABORTED", "EXPIRED", "DELETED".
State CompanyListParamsState `query:"state,omitzero" json:"-"`
// Filter by individual status (must be one of the allowed values)
//
// Any of "rejected", "need_review", "approved".
Status CompanyListParamsStatus `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CompanyListParams) URLQuery ¶
func (r CompanyListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CompanyListParams's query parameters as `url.Values`.
type CompanyListParamsState ¶
type CompanyListParamsState string
Filter by company state (must be one of the allowed values)
const ( CompanyListParamsStateVoid CompanyListParamsState = "VOID" CompanyListParamsStateWaiting CompanyListParamsState = "WAITING" CompanyListParamsStateStarted CompanyListParamsState = "STARTED" CompanyListParamsStateRunning CompanyListParamsState = "RUNNING" CompanyListParamsStateProcessed CompanyListParamsState = "PROCESSED" CompanyListParamsStateFailed CompanyListParamsState = "FAILED" CompanyListParamsStateAborted CompanyListParamsState = "ABORTED" CompanyListParamsStateExpired CompanyListParamsState = "EXPIRED" CompanyListParamsStateDeleted CompanyListParamsState = "DELETED" )
type CompanyListParamsStatus ¶
type CompanyListParamsStatus string
Filter by individual status (must be one of the allowed values)
const ( CompanyListParamsStatusRejected CompanyListParamsStatus = "rejected" CompanyListParamsStatusNeedReview CompanyListParamsStatus = "need_review" CompanyListParamsStatusApproved CompanyListParamsStatus = "approved" )
type CompanyMember ¶
type CompanyMember struct {
ID string `json:"id" format:"uuid"`
// Address of the member, which may include street, city, postal code, and country.
Address string `json:"address"`
// Birthday (available only if type = person)
Birthday time.Time `json:"birthday" format:"date-time"`
// Birthplace (available only if type = person)
Birthplace string `json:"birthplace"`
// ISO 3166-1 alpha-2 country code of the member's address (e.g., "FR" for France).
Country string `json:"country"`
// List of documents associated with the member, including their metadata and
// processing status.
Documents []GenericDocument `json:"documents"`
// Email address of the member, which may be used for communication or verification
// purposes.
Email string `json:"email" format:"email"`
// First name (available only if type = person)
FirstName string `json:"first_name"`
// Indicates whether the member is a beneficial owner of the company, meaning they
// have significant control or ownership.
IsBeneficialOwner bool `json:"is_beneficial_owner"`
// Indicates whether the member is a delegator, meaning they have authority to act
// on behalf of the company.
IsDelegator bool `json:"is_delegator"`
// Last name (available only if type = person)
LastName string `json:"last_name"`
// Indicates whether liveness verification was performed for the member, typically
// in the context of identity checks.
LivenessVerification bool `json:"liveness_verification"`
// Company name (available only if type = company)
Name string `json:"name"`
// Percentage of ownership the member has in the company, expressed as an integer
// between 0 and 100.
OwnershipPercentage int64 `json:"ownership_percentage"`
// Contact phone number of the member, including country code and area code.
PhoneNumber string `json:"phone_number"`
// Postal code of the member's address, typically a numeric or alphanumeric code.
PostalCode string `json:"postal_code"`
// Official registration identifier of the member, such as a national ID or company
// registration number.
RegistrationID string `json:"registration_id"`
// Type of relationship the member has with the company, such as "shareholder",
// "director", or "beneficial_owner".
Relation string `json:"relation"`
// Role of the member within the company, such as "legal_representative",
// "director", or "manager".
Roles string `json:"roles"`
// Source of the data (e.g., government, user, company)
//
// Any of "gouve", "user", "company".
Source string `json:"source"`
// Current state of the member in the workflow, such as "WAITING", "STARTED",
// "RUNNING", or "PROCESSED".
State string `json:"state"`
// Status of the member in the system, indicating whether they are approved,
// pending, or rejected. Possible values include "approved", "need_review",
// "rejected".
Status string `json:"status"`
// Member type (person or company)
//
// Any of "person", "company".
Type string `json:"type"`
// Identifier of the workspace to which the member belongs, used for organizational
// purposes.
WorkspaceID string `json:"workspace_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Address respjson.Field
Birthday respjson.Field
Birthplace respjson.Field
Country respjson.Field
Documents respjson.Field
Email respjson.Field
FirstName respjson.Field
IsBeneficialOwner respjson.Field
IsDelegator respjson.Field
LastName respjson.Field
LivenessVerification respjson.Field
Name respjson.Field
OwnershipPercentage respjson.Field
PhoneNumber respjson.Field
PostalCode respjson.Field
RegistrationID respjson.Field
Relation respjson.Field
Roles respjson.Field
Source respjson.Field
State respjson.Field
Status respjson.Field
Type respjson.Field
WorkspaceID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents a member or actor of a company, including personal and ownership information.
func (CompanyMember) RawJSON ¶
func (r CompanyMember) RawJSON() string
Returns the unmodified JSON received from the API
func (*CompanyMember) UnmarshalJSON ¶
func (r *CompanyMember) UnmarshalJSON(data []byte) error
type CompanyNewParams ¶
type CompanyNewParams struct {
// Main information about the company being registered.
Company CompanyNewParamsCompany `json:"company,omitzero,required"`
// Unique identifier of the workspace in which the company is being created.
WorkspaceID string `json:"workspace_id,required"`
// Optional identifier to track the origin of the request or integration from your
// system.
SourceID param.Opt[string] `json:"source_id,omitzero"`
// Technical metadata and callback configuration.
TechnicalData CompanyNewParamsTechnicalData `json:"technical_data,omitzero"`
// contains filtered or unexported fields
}
func (CompanyNewParams) MarshalJSON ¶
func (r CompanyNewParams) MarshalJSON() (data []byte, err error)
func (*CompanyNewParams) UnmarshalJSON ¶
func (r *CompanyNewParams) UnmarshalJSON(data []byte) error
type CompanyNewParamsCompany ¶
type CompanyNewParamsCompany struct {
// Legal name of the company.
Name string `json:"name,required"`
// Registered address of the company.
Address param.Opt[string] `json:"address,omitzero"`
// Commercial or trade name of the company, if different from the legal name.
CommercialName param.Opt[string] `json:"commercial_name,omitzero"`
// ISO 3166-1 alpha-2 country code of company registration (e.g., "FR" for France).
Country param.Opt[string] `json:"country,omitzero"`
// Contact email address for the company.
Email param.Opt[string] `json:"email,omitzero" format:"email"`
// Employer Identification Number (EIN) or equivalent.
EmployerIdentificationNumber param.Opt[string] `json:"employer_identification_number,omitzero"`
// Legal structure of the company (e.g., SARL, SAS).
LegalForm param.Opt[string] `json:"legal_form,omitzero"`
// Contact phone number for the company.
PhoneNumber param.Opt[string] `json:"phone_number,omitzero" format:"string"`
// Date of official company registration in YYYY-MM-DD format.
RegistrationDate param.Opt[string] `json:"registration_date,omitzero"`
// Official company registration identifier.
RegistrationID param.Opt[string] `json:"registration_id,omitzero"`
ShareCapital param.Opt[string] `json:"share_capital,omitzero"`
// Current status of the company (e.g., active, inactive).
Status param.Opt[string] `json:"status,omitzero"`
// National tax identifier (e.g., VAT or TIN).
TaxIdentificationNumber param.Opt[string] `json:"tax_identification_number,omitzero"`
// Type of company, such as "main" or "affiliated".
Type param.Opt[string] `json:"type,omitzero"`
// Company’s official website URL.
WebsiteURL param.Opt[string] `json:"website_url,omitzero"`
// contains filtered or unexported fields
}
Main information about the company being registered.
The property Name is required.
func (CompanyNewParamsCompany) MarshalJSON ¶
func (r CompanyNewParamsCompany) MarshalJSON() (data []byte, err error)
func (*CompanyNewParamsCompany) UnmarshalJSON ¶
func (r *CompanyNewParamsCompany) UnmarshalJSON(data []byte) error
type CompanyNewParamsTechnicalData ¶
type CompanyNewParamsTechnicalData struct {
// Flag indicating whether there are active research AML (Anti-Money Laundering)
// suspicions for the company when you apply for a new entry or get an existing
// one.
ActiveAmlSuspicions param.Opt[bool] `json:"active_aml_suspicions,omitzero"`
// URL to receive a callback once the company is processed.
CallbackURL param.Opt[string] `json:"callback_url,omitzero" format:"uri"`
// URL to receive notifications about the processing state and status.
CallbackURLNotification param.Opt[string] `json:"callback_url_notification,omitzero" format:"uri"`
// Minimum filtering score (between 0 and 1) for AML suspicions to be considered.
FilteringScoreAmlSuspicions param.Opt[float64] `json:"filtering_score_aml_suspicions,omitzero"`
// Preferred language for responses or notifications (e.g., "eng", "fra").
Language param.Opt[string] `json:"language,omitzero"`
// Flag indicating whether to include raw data in the response.
RawData param.Opt[bool] `json:"raw_data,omitzero"`
// contains filtered or unexported fields
}
Technical metadata and callback configuration.
func (CompanyNewParamsTechnicalData) MarshalJSON ¶
func (r CompanyNewParamsTechnicalData) MarshalJSON() (data []byte, err error)
func (*CompanyNewParamsTechnicalData) UnmarshalJSON ¶
func (r *CompanyNewParamsTechnicalData) UnmarshalJSON(data []byte) error
type CompanyService ¶
type CompanyService struct {
Options []option.RequestOption
Documents CompanyDocumentService
}
CompanyService contains methods and other services that help with interacting with the dataleonlabs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCompanyService method instead.
func NewCompanyService ¶
func NewCompanyService(opts ...option.RequestOption) (r CompanyService)
NewCompanyService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*CompanyService) Delete ¶
func (r *CompanyService) Delete(ctx context.Context, companyID string, opts ...option.RequestOption) (err error)
Delete a company by ID
func (*CompanyService) Get ¶
func (r *CompanyService) Get(ctx context.Context, companyID string, query CompanyGetParams, opts ...option.RequestOption) (res *Company, err error)
Get a company by ID
func (*CompanyService) List ¶
func (r *CompanyService) List(ctx context.Context, query CompanyListParams, opts ...option.RequestOption) (res *[]Company, err error)
Get all companies
func (*CompanyService) New ¶
func (r *CompanyService) New(ctx context.Context, body CompanyNewParams, opts ...option.RequestOption) (res *Company, err error)
Create a new company
func (*CompanyService) Update ¶
func (r *CompanyService) Update(ctx context.Context, companyID string, body CompanyUpdateParams, opts ...option.RequestOption) (res *Company, err error)
Update a company by ID
type CompanyUpdateParams ¶
type CompanyUpdateParams struct {
// Main information about the company being registered.
Company CompanyUpdateParamsCompany `json:"company,omitzero,required"`
// Unique identifier of the workspace in which the company is being created.
WorkspaceID string `json:"workspace_id,required"`
// Optional identifier to track the origin of the request or integration from your
// system.
SourceID param.Opt[string] `json:"source_id,omitzero"`
// Technical metadata and callback configuration.
TechnicalData CompanyUpdateParamsTechnicalData `json:"technical_data,omitzero"`
// contains filtered or unexported fields
}
func (CompanyUpdateParams) MarshalJSON ¶
func (r CompanyUpdateParams) MarshalJSON() (data []byte, err error)
func (*CompanyUpdateParams) UnmarshalJSON ¶
func (r *CompanyUpdateParams) UnmarshalJSON(data []byte) error
type CompanyUpdateParamsCompany ¶
type CompanyUpdateParamsCompany struct {
// Legal name of the company.
Name string `json:"name,required"`
// Registered address of the company.
Address param.Opt[string] `json:"address,omitzero"`
// Commercial or trade name of the company, if different from the legal name.
CommercialName param.Opt[string] `json:"commercial_name,omitzero"`
// ISO 3166-1 alpha-2 country code of company registration (e.g., "FR" for France).
Country param.Opt[string] `json:"country,omitzero"`
// Contact email address for the company.
Email param.Opt[string] `json:"email,omitzero" format:"email"`
// Employer Identification Number (EIN) or equivalent.
EmployerIdentificationNumber param.Opt[string] `json:"employer_identification_number,omitzero"`
// Legal structure of the company (e.g., SARL, SAS).
LegalForm param.Opt[string] `json:"legal_form,omitzero"`
// Contact phone number for the company.
PhoneNumber param.Opt[string] `json:"phone_number,omitzero" format:"string"`
// Date of official company registration in YYYY-MM-DD format.
RegistrationDate param.Opt[string] `json:"registration_date,omitzero"`
// Official company registration identifier.
RegistrationID param.Opt[string] `json:"registration_id,omitzero"`
ShareCapital param.Opt[string] `json:"share_capital,omitzero"`
// Current status of the company (e.g., active, inactive).
Status param.Opt[string] `json:"status,omitzero"`
// National tax identifier (e.g., VAT or TIN).
TaxIdentificationNumber param.Opt[string] `json:"tax_identification_number,omitzero"`
// Type of company, such as "main" or "affiliated".
Type param.Opt[string] `json:"type,omitzero"`
// Company’s official website URL.
WebsiteURL param.Opt[string] `json:"website_url,omitzero"`
// contains filtered or unexported fields
}
Main information about the company being registered.
The property Name is required.
func (CompanyUpdateParamsCompany) MarshalJSON ¶
func (r CompanyUpdateParamsCompany) MarshalJSON() (data []byte, err error)
func (*CompanyUpdateParamsCompany) UnmarshalJSON ¶
func (r *CompanyUpdateParamsCompany) UnmarshalJSON(data []byte) error
type CompanyUpdateParamsTechnicalData ¶
type CompanyUpdateParamsTechnicalData struct {
// Flag indicating whether there are active research AML (Anti-Money Laundering)
// suspicions for the company when you apply for a new entry or get an existing
// one.
ActiveAmlSuspicions param.Opt[bool] `json:"active_aml_suspicions,omitzero"`
// URL to receive a callback once the company is processed.
CallbackURL param.Opt[string] `json:"callback_url,omitzero" format:"uri"`
// URL to receive notifications about the processing state and status.
CallbackURLNotification param.Opt[string] `json:"callback_url_notification,omitzero" format:"uri"`
// Minimum filtering score (between 0 and 1) for AML suspicions to be considered.
FilteringScoreAmlSuspicions param.Opt[float64] `json:"filtering_score_aml_suspicions,omitzero"`
// Preferred language for responses or notifications (e.g., "eng", "fra").
Language param.Opt[string] `json:"language,omitzero"`
// Flag indicating whether to include raw data in the response.
RawData param.Opt[bool] `json:"raw_data,omitzero"`
// contains filtered or unexported fields
}
Technical metadata and callback configuration.
func (CompanyUpdateParamsTechnicalData) MarshalJSON ¶
func (r CompanyUpdateParamsTechnicalData) MarshalJSON() (data []byte, err error)
func (*CompanyUpdateParamsTechnicalData) UnmarshalJSON ¶
func (r *CompanyUpdateParamsTechnicalData) UnmarshalJSON(data []byte) error
type DocumentResponse ¶
type DocumentResponse struct {
// List of documents associated with the response.
Documents []DocumentResponseDocument `json:"documents"`
// Total number of documents available in the response.
TotalDocument int64 `json:"total_document"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Documents respjson.Field
TotalDocument respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (DocumentResponse) RawJSON ¶
func (r DocumentResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*DocumentResponse) UnmarshalJSON ¶
func (r *DocumentResponse) UnmarshalJSON(data []byte) error
type DocumentResponseDocument ¶
type DocumentResponseDocument struct {
// Unique identifier of the document.
ID string `json:"id"`
// Functional type of the document (e.g., identity document, invoice).
DocumentType string `json:"document_type"`
// Original filename of the uploaded document.
Filename string `json:"filename"`
// Human-readable name of the document.
Name string `json:"name"`
// Secure URL to access the document.
SignedURL string `json:"signed_url" format:"uri"`
// Processing state of the document (e.g., WAITING, STARTED, RUNNING, PROCESSED).
State string `json:"state"`
// Validation status of the document (e.g., need_review, approved, rejected).
Status string `json:"status"`
// Identifier of the workspace to which the document belongs.
WorkspaceID string `json:"workspace_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
DocumentType respjson.Field
Filename respjson.Field
Name respjson.Field
SignedURL respjson.Field
State respjson.Field
Status respjson.Field
WorkspaceID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents a document stored and processed by the system, such as an identity card or a PDF contract.
func (DocumentResponseDocument) RawJSON ¶
func (r DocumentResponseDocument) RawJSON() string
Returns the unmodified JSON received from the API
func (*DocumentResponseDocument) UnmarshalJSON ¶
func (r *DocumentResponseDocument) UnmarshalJSON(data []byte) error
type GenericDocument ¶
type GenericDocument struct {
// Unique identifier of the document.
ID string `json:"id"`
// List of verification checks performed on the document.
Checks []Check `json:"checks"`
// Timestamp when the document was created or uploaded.
CreatedAt time.Time `json:"created_at" format:"date-time"`
// Type/category of the document.
DocumentType string `json:"document_type"`
// Name or label for the document.
Name string `json:"name"`
// Signed URL for accessing the document file.
SignedURL string `json:"signed_url" format:"uri"`
// Current processing state of the document (e.g., WAITING, PROCESSED).
State string `json:"state"`
// Status of the document reception or approval.
Status string `json:"status"`
// List of tables extracted from the document, each containing operations.
Tables []GenericDocumentTable `json:"tables"`
// Extracted key-value pairs from the document, including confidence scores.
Values []GenericDocumentValue `json:"values"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Checks respjson.Field
CreatedAt respjson.Field
DocumentType respjson.Field
Name respjson.Field
SignedURL respjson.Field
State respjson.Field
Status respjson.Field
Tables respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents a general document with metadata, verification checks, and extracted data.
func (GenericDocument) RawJSON ¶
func (r GenericDocument) RawJSON() string
Returns the unmodified JSON received from the API
func (*GenericDocument) UnmarshalJSON ¶
func (r *GenericDocument) UnmarshalJSON(data []byte) error
type GenericDocumentTable ¶
type GenericDocumentTable struct {
// List of operations or actions associated with the table.
Operation []any `json:"operation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Operation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (GenericDocumentTable) RawJSON ¶
func (r GenericDocumentTable) RawJSON() string
Returns the unmodified JSON received from the API
func (*GenericDocumentTable) UnmarshalJSON ¶
func (r *GenericDocumentTable) UnmarshalJSON(data []byte) error
type GenericDocumentValue ¶
type GenericDocumentValue struct {
// Confidence score (between 0 and 1) for the extracted value.
Confidence float64 `json:"confidence"`
// Name or label of the extracted field.
Name string `json:"name"`
// List of integer values related to the field (e.g., bounding box coordinates).
Value []int64 `json:"value"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Confidence respjson.Field
Name respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (GenericDocumentValue) RawJSON ¶
func (r GenericDocumentValue) RawJSON() string
Returns the unmodified JSON received from the API
func (*GenericDocumentValue) UnmarshalJSON ¶
func (r *GenericDocumentValue) UnmarshalJSON(data []byte) error
type Individual ¶
type Individual struct {
// Unique identifier of the individual.
ID string `json:"id" format:"uuid"`
// List of AML (Anti-Money Laundering) suspicion entries linked to the individual.
AmlSuspicions []AmlSuspicion `json:"aml_suspicions"`
// URL to authenticate the individual, usually for document signing or onboarding.
AuthURL string `json:"auth_url" format:"uri"`
// Digital certificate associated with the individual, if any.
Certificat Certificat `json:"certificat"`
// List of verification or validation checks applied to the individual.
Checks []Check `json:"checks"`
// Timestamp of the individual's creation in ISO 8601 format.
CreatedAt time.Time `json:"created_at" format:"date-time"`
// All documents submitted or associated with the individual.
Documents []GenericDocument `json:"documents"`
// Reference to the individual's identity document.
IdentityCard IndividualIdentityCard `json:"identity_card"`
// Internal sequential number or reference for the individual.
Number int64 `json:"number"`
// Personal details of the individual, such as name, date of birth, and contact
// info.
Person IndividualPerson `json:"person"`
// Admin or internal portal URL for viewing the individual's details.
PortalURL string `json:"portal_url" format:"uri"`
// Custom key-value metadata fields associated with the individual.
Properties []Property `json:"properties"`
// Risk assessment associated with the individual.
Risk Risk `json:"risk"`
// Optional identifier indicating the source of the individual record.
SourceID string `json:"source_id"`
// Current operational state in the workflow (e.g., WAITING, IN_PROGRESS,
// COMPLETED).
State string `json:"state"`
// Overall processing status of the individual (e.g., rejected, need_review,
// approved).
Status string `json:"status"`
// List of tags assigned to the individual for categorization or metadata purposes.
Tags []IndividualTag `json:"tags"`
// Technical metadata related to the request (e.g., QR code settings, language).
TechnicalData TechnicalData `json:"technical_data"`
// Public-facing webview URL for the individual’s identification process.
WebviewURL string `json:"webview_url" format:"uri"`
// Identifier of the workspace to which the individual belongs.
WorkspaceID string `json:"workspace_id"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
AmlSuspicions respjson.Field
AuthURL respjson.Field
Certificat respjson.Field
Checks respjson.Field
CreatedAt respjson.Field
Documents respjson.Field
IdentityCard respjson.Field
Number respjson.Field
Person respjson.Field
PortalURL respjson.Field
Properties respjson.Field
Risk respjson.Field
SourceID respjson.Field
State respjson.Field
Status respjson.Field
Tags respjson.Field
TechnicalData respjson.Field
WebviewURL respjson.Field
WorkspaceID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents a single individual record, including identification, status, and associated metadata.
func (Individual) RawJSON ¶
func (r Individual) RawJSON() string
Returns the unmodified JSON received from the API
func (*Individual) UnmarshalJSON ¶
func (r *Individual) UnmarshalJSON(data []byte) error
type IndividualDocumentService ¶
type IndividualDocumentService struct {
Options []option.RequestOption
}
IndividualDocumentService contains methods and other services that help with interacting with the dataleonlabs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIndividualDocumentService method instead.
func NewIndividualDocumentService ¶
func NewIndividualDocumentService(opts ...option.RequestOption) (r IndividualDocumentService)
NewIndividualDocumentService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*IndividualDocumentService) List ¶
func (r *IndividualDocumentService) List(ctx context.Context, individualID string, opts ...option.RequestOption) (res *DocumentResponse, err error)
Get documents to an individuals
func (*IndividualDocumentService) Upload ¶
func (r *IndividualDocumentService) Upload(ctx context.Context, individualID string, body IndividualDocumentUploadParams, opts ...option.RequestOption) (res *GenericDocument, err error)
Upload documents to an individual
type IndividualDocumentUploadParams ¶
type IndividualDocumentUploadParams struct {
// Filter by document type for upload (must be one of the allowed values)
//
// Any of "liasse_fiscale", "amortised_loan_schedule", "invoice", "receipt",
// "company_statuts", "registration_company_certificate", "kbis", "rib",
// "livret_famille", "birth_certificate", "payslip", "social_security_card",
// "vehicle_registration_certificate", "carte_grise", "criminal_record_extract",
// "proof_of_address", "identity_card_front", "identity_card_back",
// "driver_license_front", "driver_license_back", "identity_document",
// "driver_license", "passport", "tax", "certificate_of_incorporation",
// "certificate_of_good_standing", "lcb_ft_lab_aml_policies", "niu_entreprise",
// "financial_statements", "rccm", "proof_of_source_funds", "organizational_chart",
// "risk_policies".
DocumentType IndividualDocumentUploadParamsDocumentType `json:"document_type,omitzero,required"`
// URL of the file to upload (either `file` or `url` is required)
URL param.Opt[string] `json:"url,omitzero" format:"uri"`
// File to upload (required)
File io.Reader `json:"file,omitzero" format:"binary"`
// contains filtered or unexported fields
}
func (IndividualDocumentUploadParams) MarshalMultipart ¶
func (r IndividualDocumentUploadParams) MarshalMultipart() (data []byte, contentType string, err error)
type IndividualDocumentUploadParamsDocumentType ¶
type IndividualDocumentUploadParamsDocumentType string
Filter by document type for upload (must be one of the allowed values)
const ( IndividualDocumentUploadParamsDocumentTypeLiasseFiscale IndividualDocumentUploadParamsDocumentType = "liasse_fiscale" IndividualDocumentUploadParamsDocumentTypeAmortisedLoanSchedule IndividualDocumentUploadParamsDocumentType = "amortised_loan_schedule" IndividualDocumentUploadParamsDocumentTypeInvoice IndividualDocumentUploadParamsDocumentType = "invoice" IndividualDocumentUploadParamsDocumentTypeReceipt IndividualDocumentUploadParamsDocumentType = "receipt" IndividualDocumentUploadParamsDocumentTypeCompanyStatuts IndividualDocumentUploadParamsDocumentType = "company_statuts" IndividualDocumentUploadParamsDocumentTypeRegistrationCompanyCertificate IndividualDocumentUploadParamsDocumentType = "registration_company_certificate" IndividualDocumentUploadParamsDocumentTypeKbis IndividualDocumentUploadParamsDocumentType = "kbis" IndividualDocumentUploadParamsDocumentTypeRib IndividualDocumentUploadParamsDocumentType = "rib" IndividualDocumentUploadParamsDocumentTypeLivretFamille IndividualDocumentUploadParamsDocumentType = "livret_famille" IndividualDocumentUploadParamsDocumentTypeBirthCertificate IndividualDocumentUploadParamsDocumentType = "birth_certificate" IndividualDocumentUploadParamsDocumentTypePayslip IndividualDocumentUploadParamsDocumentType = "payslip" IndividualDocumentUploadParamsDocumentTypeSocialSecurityCard IndividualDocumentUploadParamsDocumentType = "social_security_card" IndividualDocumentUploadParamsDocumentTypeVehicleRegistrationCertificate IndividualDocumentUploadParamsDocumentType = "vehicle_registration_certificate" IndividualDocumentUploadParamsDocumentTypeCarteGrise IndividualDocumentUploadParamsDocumentType = "carte_grise" IndividualDocumentUploadParamsDocumentTypeCriminalRecordExtract IndividualDocumentUploadParamsDocumentType = "criminal_record_extract" IndividualDocumentUploadParamsDocumentTypeProofOfAddress IndividualDocumentUploadParamsDocumentType = "proof_of_address" IndividualDocumentUploadParamsDocumentTypeIdentityCardFront IndividualDocumentUploadParamsDocumentType = "identity_card_front" IndividualDocumentUploadParamsDocumentTypeIdentityCardBack IndividualDocumentUploadParamsDocumentType = "identity_card_back" IndividualDocumentUploadParamsDocumentTypeDriverLicenseFront IndividualDocumentUploadParamsDocumentType = "driver_license_front" IndividualDocumentUploadParamsDocumentTypeDriverLicenseBack IndividualDocumentUploadParamsDocumentType = "driver_license_back" IndividualDocumentUploadParamsDocumentTypeIdentityDocument IndividualDocumentUploadParamsDocumentType = "identity_document" IndividualDocumentUploadParamsDocumentTypeDriverLicense IndividualDocumentUploadParamsDocumentType = "driver_license" IndividualDocumentUploadParamsDocumentTypePassport IndividualDocumentUploadParamsDocumentType = "passport" IndividualDocumentUploadParamsDocumentTypeTax IndividualDocumentUploadParamsDocumentType = "tax" IndividualDocumentUploadParamsDocumentTypeCertificateOfIncorporation IndividualDocumentUploadParamsDocumentType = "certificate_of_incorporation" IndividualDocumentUploadParamsDocumentTypeCertificateOfGoodStanding IndividualDocumentUploadParamsDocumentType = "certificate_of_good_standing" IndividualDocumentUploadParamsDocumentTypeLcbFtLabAmlPolicies IndividualDocumentUploadParamsDocumentType = "lcb_ft_lab_aml_policies" IndividualDocumentUploadParamsDocumentTypeNiuEntreprise IndividualDocumentUploadParamsDocumentType = "niu_entreprise" IndividualDocumentUploadParamsDocumentTypeFinancialStatements IndividualDocumentUploadParamsDocumentType = "financial_statements" IndividualDocumentUploadParamsDocumentTypeRccm IndividualDocumentUploadParamsDocumentType = "rccm" IndividualDocumentUploadParamsDocumentTypeProofOfSourceFunds IndividualDocumentUploadParamsDocumentType = "proof_of_source_funds" IndividualDocumentUploadParamsDocumentTypeOrganizationalChart IndividualDocumentUploadParamsDocumentType = "organizational_chart" IndividualDocumentUploadParamsDocumentTypeRiskPolicies IndividualDocumentUploadParamsDocumentType = "risk_policies" )
type IndividualGetParams ¶
type IndividualGetParams struct {
// Include document information
Document param.Opt[bool] `query:"document,omitzero" json:"-"`
// Scope filter (id or scope)
Scope param.Opt[string] `query:"scope,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IndividualGetParams) URLQuery ¶
func (r IndividualGetParams) URLQuery() (v url.Values, err error)
URLQuery serializes IndividualGetParams's query parameters as `url.Values`.
type IndividualIdentityCard ¶
type IndividualIdentityCard struct {
// Unique identifier for the document.
ID string `json:"id"`
// Signed URL linking to the back image of the document.
BackDocumentSignedURL string `json:"back_document_signed_url" format:"uri"`
// Place of birth as indicated on the document.
BirthPlace string `json:"birth_place"`
// Date of birth in DD/MM/YYYY format as shown on the document.
Birthday string `json:"birthday"`
// Country code issuing the document (ISO 3166-1 alpha-2).
Country string `json:"country"`
// Expiration date of the document, in YYYY-MM-DD format.
ExpirationDate string `json:"expiration_date"`
// First name as shown on the document.
FirstName string `json:"first_name"`
// Signed URL linking to the front image of the document.
FrontDocumentSignedURL string `json:"front_document_signed_url" format:"uri"`
// Gender indicated on the document (e.g., "M" or "F").
Gender string `json:"gender"`
// Date when the document was issued, in YYYY-MM-DD format.
IssueDate string `json:"issue_date"`
// Last name as shown on the document.
LastName string `json:"last_name"`
// First line of the Machine Readable Zone (MRZ) on the document.
MrzLine1 string `json:"mrz_line_1"`
// Second line of the MRZ on the document.
MrzLine2 string `json:"mrz_line_2"`
// Third line of the MRZ if applicable; otherwise null.
MrzLine3 string `json:"mrz_line_3,nullable"`
// Type of document (e.g., passport, identity card).
Type string `json:"type"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
BackDocumentSignedURL respjson.Field
BirthPlace respjson.Field
Birthday respjson.Field
Country respjson.Field
ExpirationDate respjson.Field
FirstName respjson.Field
FrontDocumentSignedURL respjson.Field
Gender respjson.Field
IssueDate respjson.Field
LastName respjson.Field
MrzLine1 respjson.Field
MrzLine2 respjson.Field
MrzLine3 respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Reference to the individual's identity document.
func (IndividualIdentityCard) RawJSON ¶
func (r IndividualIdentityCard) RawJSON() string
Returns the unmodified JSON received from the API
func (*IndividualIdentityCard) UnmarshalJSON ¶
func (r *IndividualIdentityCard) UnmarshalJSON(data []byte) error
type IndividualListParams ¶
type IndividualListParams struct {
// Filter individuals created before this date (format YYYY-MM-DD)
EndDate param.Opt[time.Time] `query:"end_date,omitzero" format:"date" json:"-"`
// Number of results to return (between 1 and 100)
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of results to offset (must be ≥ 0)
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Filter by source ID
SourceID param.Opt[string] `query:"source_id,omitzero" json:"-"`
// Filter individuals created after this date (format YYYY-MM-DD)
StartDate param.Opt[time.Time] `query:"start_date,omitzero" format:"date" json:"-"`
// Filter by workspace ID
WorkspaceID param.Opt[string] `query:"workspace_id,omitzero" json:"-"`
// Filter by individual status (must be one of the allowed values)
//
// Any of "VOID", "WAITING", "STARTED", "RUNNING", "PROCESSED", "FAILED",
// "ABORTED", "EXPIRED", "DELETED".
State IndividualListParamsState `query:"state,omitzero" json:"-"`
// Filter by individual status (must be one of the allowed values)
//
// Any of "rejected", "need_review", "approved".
Status IndividualListParamsStatus `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IndividualListParams) URLQuery ¶
func (r IndividualListParams) URLQuery() (v url.Values, err error)
URLQuery serializes IndividualListParams's query parameters as `url.Values`.
type IndividualListParamsState ¶
type IndividualListParamsState string
Filter by individual status (must be one of the allowed values)
const ( IndividualListParamsStateVoid IndividualListParamsState = "VOID" IndividualListParamsStateWaiting IndividualListParamsState = "WAITING" IndividualListParamsStateStarted IndividualListParamsState = "STARTED" IndividualListParamsStateRunning IndividualListParamsState = "RUNNING" IndividualListParamsStateProcessed IndividualListParamsState = "PROCESSED" IndividualListParamsStateFailed IndividualListParamsState = "FAILED" IndividualListParamsStateAborted IndividualListParamsState = "ABORTED" IndividualListParamsStateExpired IndividualListParamsState = "EXPIRED" IndividualListParamsStateDeleted IndividualListParamsState = "DELETED" )
type IndividualListParamsStatus ¶
type IndividualListParamsStatus string
Filter by individual status (must be one of the allowed values)
const ( IndividualListParamsStatusRejected IndividualListParamsStatus = "rejected" IndividualListParamsStatusNeedReview IndividualListParamsStatus = "need_review" IndividualListParamsStatusApproved IndividualListParamsStatus = "approved" )
type IndividualNewParams ¶
type IndividualNewParams struct {
// Unique identifier of the workspace where the individual is being registered.
WorkspaceID string `json:"workspace_id,required"`
// Optional identifier for tracking the source system or integration from your
// system.
SourceID param.Opt[string] `json:"source_id,omitzero"`
// Personal information about the individual.
Person IndividualNewParamsPerson `json:"person,omitzero"`
// Technical metadata related to the request or processing.
TechnicalData IndividualNewParamsTechnicalData `json:"technical_data,omitzero"`
// contains filtered or unexported fields
}
func (IndividualNewParams) MarshalJSON ¶
func (r IndividualNewParams) MarshalJSON() (data []byte, err error)
func (*IndividualNewParams) UnmarshalJSON ¶
func (r *IndividualNewParams) UnmarshalJSON(data []byte) error
type IndividualNewParamsPerson ¶
type IndividualNewParamsPerson struct {
// Date of birth in DD/MM/YYYY format.
Birthday param.Opt[string] `json:"birthday,omitzero"`
// Email address of the individual.
Email param.Opt[string] `json:"email,omitzero" format:"email"`
// First name of the individual.
FirstName param.Opt[string] `json:"first_name,omitzero"`
// Last name (family name) of the individual.
LastName param.Opt[string] `json:"last_name,omitzero"`
// Maiden name, if applicable.
MaidenName param.Opt[string] `json:"maiden_name,omitzero"`
// Nationality of the individual (ISO 3166-1 alpha-3 country code).
Nationality param.Opt[string] `json:"nationality,omitzero"`
// Phone number of the individual.
PhoneNumber param.Opt[string] `json:"phone_number,omitzero"`
// Gender of the individual (M for male, F for female).
//
// Any of "M", "F".
Gender string `json:"gender,omitzero"`
// contains filtered or unexported fields
}
Personal information about the individual.
func (IndividualNewParamsPerson) MarshalJSON ¶
func (r IndividualNewParamsPerson) MarshalJSON() (data []byte, err error)
func (*IndividualNewParamsPerson) UnmarshalJSON ¶
func (r *IndividualNewParamsPerson) UnmarshalJSON(data []byte) error
type IndividualNewParamsTechnicalData ¶
type IndividualNewParamsTechnicalData struct {
// Flag indicating whether there are active research AML (Anti-Money Laundering)
// suspicions for the individual when you apply for a new entry or get an existing
// one.
ActiveAmlSuspicions param.Opt[bool] `json:"active_aml_suspicions,omitzero"`
// URL to call back upon completion of processing.
CallbackURL param.Opt[string] `json:"callback_url,omitzero" format:"uri"`
// URL for receive notifications about the processing state or status.
CallbackURLNotification param.Opt[string] `json:"callback_url_notification,omitzero" format:"uri"`
// Minimum filtering score (between 0 and 1) for AML suspicions to be considered.
FilteringScoreAmlSuspicions param.Opt[float64] `json:"filtering_score_aml_suspicions,omitzero"`
// Preferred language for communication (e.g., "eng", "fra").
Language param.Opt[string] `json:"language,omitzero"`
// Flag indicating whether to include raw data in the response.
RawData param.Opt[bool] `json:"raw_data,omitzero"`
// contains filtered or unexported fields
}
Technical metadata related to the request or processing.
func (IndividualNewParamsTechnicalData) MarshalJSON ¶
func (r IndividualNewParamsTechnicalData) MarshalJSON() (data []byte, err error)
func (*IndividualNewParamsTechnicalData) UnmarshalJSON ¶
func (r *IndividualNewParamsTechnicalData) UnmarshalJSON(data []byte) error
type IndividualPerson ¶
type IndividualPerson struct {
// Date of birth, formatted as DD/MM/YYYY.
Birthday string `json:"birthday"`
// Email address of the individual.
Email string `json:"email" format:"email"`
// Signed URL linking to the person’s face image.
FaceImageSignedURL string `json:"face_image_signed_url" format:"uri"`
// First (given) name of the person.
FirstName string `json:"first_name"`
// Full name of the person, typically concatenation of first and last names.
FullName string `json:"full_name"`
// Gender of the individual (e.g., "M" for male, "F" for female).
Gender string `json:"gender"`
// Last (family) name of the person.
LastName string `json:"last_name"`
// Maiden name of the person, if applicable.
MaidenName string `json:"maiden_name"`
// Nationality of the individual (ISO 3166-1 alpha-3 country code).
Nationality string `json:"nationality"`
// Contact phone number including country code.
PhoneNumber string `json:"phone_number"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Birthday respjson.Field
Email respjson.Field
FaceImageSignedURL respjson.Field
FirstName respjson.Field
FullName respjson.Field
Gender respjson.Field
LastName respjson.Field
MaidenName respjson.Field
Nationality respjson.Field
PhoneNumber respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Personal details of the individual, such as name, date of birth, and contact info.
func (IndividualPerson) RawJSON ¶
func (r IndividualPerson) RawJSON() string
Returns the unmodified JSON received from the API
func (*IndividualPerson) UnmarshalJSON ¶
func (r *IndividualPerson) UnmarshalJSON(data []byte) error
type IndividualService ¶
type IndividualService struct {
Options []option.RequestOption
Documents IndividualDocumentService
}
IndividualService contains methods and other services that help with interacting with the dataleonlabs API.
Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewIndividualService method instead.
func NewIndividualService ¶
func NewIndividualService(opts ...option.RequestOption) (r IndividualService)
NewIndividualService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there is one), and before any request-specific options.
func (*IndividualService) Delete ¶
func (r *IndividualService) Delete(ctx context.Context, individualID string, opts ...option.RequestOption) (err error)
Delete an individual by ID
func (*IndividualService) Get ¶
func (r *IndividualService) Get(ctx context.Context, individualID string, query IndividualGetParams, opts ...option.RequestOption) (res *Individual, err error)
Get an individual by ID
func (*IndividualService) List ¶
func (r *IndividualService) List(ctx context.Context, query IndividualListParams, opts ...option.RequestOption) (res *[]Individual, err error)
Get all individuals
func (*IndividualService) New ¶
func (r *IndividualService) New(ctx context.Context, body IndividualNewParams, opts ...option.RequestOption) (res *Individual, err error)
Create a new individual
func (*IndividualService) Update ¶
func (r *IndividualService) Update(ctx context.Context, individualID string, body IndividualUpdateParams, opts ...option.RequestOption) (res *Individual, err error)
Update an individual by ID
type IndividualTag ¶
type IndividualTag struct {
// Name of the tag used to identify the metadata field.
Key string `json:"key"`
// Indicates whether the tag is private (not visible to external users).
Private bool `json:"private"`
// Data type of the tag value (e.g., "string", "number", "boolean").
Type string `json:"type"`
// Value assigned to the tag.
Value string `json:"value"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Key respjson.Field
Private respjson.Field
Type respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents a key-value metadata tag that can be associated with entities such as individuals or companies.
func (IndividualTag) RawJSON ¶
func (r IndividualTag) RawJSON() string
Returns the unmodified JSON received from the API
func (*IndividualTag) UnmarshalJSON ¶
func (r *IndividualTag) UnmarshalJSON(data []byte) error
type IndividualUpdateParams ¶
type IndividualUpdateParams struct {
// Unique identifier of the workspace where the individual is being registered.
WorkspaceID string `json:"workspace_id,required"`
// Optional identifier for tracking the source system or integration from your
// system.
SourceID param.Opt[string] `json:"source_id,omitzero"`
// Personal information about the individual.
Person IndividualUpdateParamsPerson `json:"person,omitzero"`
// Technical metadata related to the request or processing.
TechnicalData IndividualUpdateParamsTechnicalData `json:"technical_data,omitzero"`
// contains filtered or unexported fields
}
func (IndividualUpdateParams) MarshalJSON ¶
func (r IndividualUpdateParams) MarshalJSON() (data []byte, err error)
func (*IndividualUpdateParams) UnmarshalJSON ¶
func (r *IndividualUpdateParams) UnmarshalJSON(data []byte) error
type IndividualUpdateParamsPerson ¶
type IndividualUpdateParamsPerson struct {
// Date of birth in DD/MM/YYYY format.
Birthday param.Opt[string] `json:"birthday,omitzero"`
// Email address of the individual.
Email param.Opt[string] `json:"email,omitzero" format:"email"`
// First name of the individual.
FirstName param.Opt[string] `json:"first_name,omitzero"`
// Last name (family name) of the individual.
LastName param.Opt[string] `json:"last_name,omitzero"`
// Maiden name, if applicable.
MaidenName param.Opt[string] `json:"maiden_name,omitzero"`
// Nationality of the individual (ISO 3166-1 alpha-3 country code).
Nationality param.Opt[string] `json:"nationality,omitzero"`
// Phone number of the individual.
PhoneNumber param.Opt[string] `json:"phone_number,omitzero"`
// Gender of the individual (M for male, F for female).
//
// Any of "M", "F".
Gender string `json:"gender,omitzero"`
// contains filtered or unexported fields
}
Personal information about the individual.
func (IndividualUpdateParamsPerson) MarshalJSON ¶
func (r IndividualUpdateParamsPerson) MarshalJSON() (data []byte, err error)
func (*IndividualUpdateParamsPerson) UnmarshalJSON ¶
func (r *IndividualUpdateParamsPerson) UnmarshalJSON(data []byte) error
type IndividualUpdateParamsTechnicalData ¶
type IndividualUpdateParamsTechnicalData struct {
// Flag indicating whether there are active research AML (Anti-Money Laundering)
// suspicions for the individual when you apply for a new entry or get an existing
// one.
ActiveAmlSuspicions param.Opt[bool] `json:"active_aml_suspicions,omitzero"`
// URL to call back upon completion of processing.
CallbackURL param.Opt[string] `json:"callback_url,omitzero" format:"uri"`
// URL for receive notifications about the processing state or status.
CallbackURLNotification param.Opt[string] `json:"callback_url_notification,omitzero" format:"uri"`
// Minimum filtering score (between 0 and 1) for AML suspicions to be considered.
FilteringScoreAmlSuspicions param.Opt[float64] `json:"filtering_score_aml_suspicions,omitzero"`
// Preferred language for communication (e.g., "eng", "fra").
Language param.Opt[string] `json:"language,omitzero"`
// Flag indicating whether to include raw data in the response.
RawData param.Opt[bool] `json:"raw_data,omitzero"`
// contains filtered or unexported fields
}
Technical metadata related to the request or processing.
func (IndividualUpdateParamsTechnicalData) MarshalJSON ¶
func (r IndividualUpdateParamsTechnicalData) MarshalJSON() (data []byte, err error)
func (*IndividualUpdateParamsTechnicalData) UnmarshalJSON ¶
func (r *IndividualUpdateParamsTechnicalData) UnmarshalJSON(data []byte) error
type Property ¶
type Property struct {
// Name/key of the property.
Name string `json:"name"`
// Data type of the property value.
Type string `json:"type"`
// Value associated with the property name.
Value string `json:"value"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Type respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents a generic property key-value pair with a specified type.
func (*Property) UnmarshalJSON ¶
type Risk ¶
type Risk struct {
// Risk category or code identifier.
Code string `json:"code"`
// Explanation or justification for the assigned risk.
Reason string `json:"reason"`
// Numeric risk score between 0.0 and 1.0 indicating severity or confidence.
Score float64 `json:"score"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Code respjson.Field
Reason respjson.Field
Score respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents a risk assessment result, including a risk code, explanation, and a confidence score.
func (*Risk) UnmarshalJSON ¶
type TechnicalData ¶
type TechnicalData struct {
// Flag indicating whether there are active research AML (Anti-Money Laundering)
// suspicions for the object when you apply for a new entry or get an existing one.
ActiveAmlSuspicions bool `json:"active_aml_suspicions"`
// Version number of the API used.
APIVersion int64 `json:"api_version"`
// Timestamp when the request or process was approved.
ApprovedAt time.Time `json:"approved_at" format:"date-time"`
// URL to receive callback data from the AML system.
CallbackURL string `json:"callback_url" format:"uri"`
// URL to receive notification updates about the processing status.
CallbackURLNotification string `json:"callback_url_notification" format:"uri"`
// Flag to indicate if notifications are disabled.
DisableNotification bool `json:"disable_notification"`
// Timestamp when notifications were disabled; null if never disabled.
DisableNotificationDate time.Time `json:"disable_notification_date,nullable" format:"date-time"`
// Export format defined by the API (e.g., "json", "xml").
ExportType string `json:"export_type"`
// Minimum filtering score (between 0 and 1) for AML suspicions to be considered.
FilteringScoreAmlSuspicions float64 `json:"filtering_score_aml_suspicions"`
// Timestamp when the process finished.
FinishedAt time.Time `json:"finished_at" format:"date-time"`
// IP address of the our system handling the request.
IP string `json:"ip"`
// Language preference used in the client workspace (e.g., "fra").
Language string `json:"language"`
// IP address of the end client (final user) captured.
LocationIP string `json:"location_ip"`
// Timestamp indicating when the request or process needs review; null if none.
NeedReviewAt time.Time `json:"need_review_at,nullable" format:"date-time"`
// Flag indicating if notification confirmation is required or received.
NotificationConfirmation bool `json:"notification_confirmation"`
// Indicates whether QR code is enabled ("true" or "false").
QrCode string `json:"qr_code"`
// Flag indicating whether to include raw data in the response.
RawData bool `json:"raw_data"`
// Timestamp when the request or process was rejected; null if not rejected.
RejectedAt time.Time `json:"rejected_at,nullable" format:"date-time"`
// Duration of the user session in seconds.
SessionDuration int64 `json:"session_duration"`
// Timestamp when the process started.
StartedAt time.Time `json:"started_at" format:"date-time"`
// Date/time of data transfer.
TransferAt time.Time `json:"transfer_at" format:"date-time"`
// Mode of data transfer.
TransferMode string `json:"transfer_mode"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActiveAmlSuspicions respjson.Field
APIVersion respjson.Field
ApprovedAt respjson.Field
CallbackURL respjson.Field
CallbackURLNotification respjson.Field
DisableNotification respjson.Field
DisableNotificationDate respjson.Field
ExportType respjson.Field
FilteringScoreAmlSuspicions respjson.Field
FinishedAt respjson.Field
IP respjson.Field
Language respjson.Field
LocationIP respjson.Field
NeedReviewAt respjson.Field
NotificationConfirmation respjson.Field
QrCode respjson.Field
RawData respjson.Field
RejectedAt respjson.Field
SessionDuration respjson.Field
StartedAt respjson.Field
TransferAt respjson.Field
TransferMode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Contains technical metadata related to processing and communication of an entity.
func (TechnicalData) RawJSON ¶
func (r TechnicalData) RawJSON() string
Returns the unmodified JSON received from the API
func (*TechnicalData) UnmarshalJSON ¶
func (r *TechnicalData) UnmarshalJSON(data []byte) error
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
encoding/json
Package json implements encoding and decoding of JSON as defined in RFC 7159.
|
Package json implements encoding and decoding of JSON as defined in RFC 7159. |
|
encoding/json/shims
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package.
|
This package provides shims over Go 1.2{2,3} APIs which are missing from Go 1.22, and used by the Go 1.24 encoding/json package. |
|
packages
|
|
|
shared
|
|