Documentation
¶
Index ¶
- func UploadDocument()
- func UploadFlexible()
- func UploadMultipleFiles()
- func UploadSingleFile()
- func UploadWithMetadata()
- type ErrorResponse
- type KYBDocumentType
- type Meta
- type UploadDocumentParams
- type UploadDocumentRequest
- type UploadDocumentResponse
- type UploadDocumentV2Params
- type UploadFlexibleParams
- type UploadMultipleFilesParams
- type UploadResponse
- type UploadSingleFileParams
- type UploadWithMetadataParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UploadDocument ¶
func UploadDocument()
swagger:route POST /api/v2/kyc/banking-verification/business/upload-document KYC uploadDocument Consumes: - multipart/form-data
Upload Document ¶
This endpoint allows to upload a document for a specific account.
**Required permissions:** - `kyc:create` OR - `kyc:manage`
Security: - bearer
Responses:
200: UploadDocumentResponse 400: errorResponse 500: errorResponse
func UploadFlexible ¶
func UploadFlexible()
swagger:route POST /upload/flexible files uploadFlexible Consumes: - multipart/form-data - application/json
Upload with multiple content types ¶
This endpoint accepts both multipart/form-data (for binary uploads) and application/json (for base64 encoded files).
Responses:
200: uploadResponse
func UploadMultipleFiles ¶
func UploadMultipleFiles()
swagger:route POST /upload/multiple files uploadMultipleFiles Consumes: - multipart/form-data
Upload multiple files ¶
Responses:
200: uploadResponse
func UploadSingleFile ¶
func UploadSingleFile()
swagger:route POST /upload/single files uploadSingleFile Consumes: - multipart/form-data
Upload a single file ¶
Responses:
200: uploadResponse
func UploadWithMetadata ¶
func UploadWithMetadata()
swagger:route POST /upload/metadata files uploadWithMetadata Consumes: - multipart/form-data
Upload file with metadata ¶
Upload a file along with additional metadata fields. The file is uploaded as binary data, while other fields are sent as regular form fields.
Responses:
200: uploadResponse 400: errorResponse
Types ¶
type ErrorResponse ¶
type ErrorResponse struct {
// Error message
// Example: Invalid file format
Message string `json:"message"`
}
ErrorResponse represents an error response
swagger:model
type KYBDocumentType ¶
type KYBDocumentType string
KYBDocumentType represents the type of business document
swagger:enum
const ( ArticlesOfIncorporation KYBDocumentType = "articles_of_incorporation" CertificateOfIncorporation KYBDocumentType = "certificate_of_incorporation" DBA KYBDocumentType = "dba" EINConfirmation KYBDocumentType = "ein_confirmation" Formation KYBDocumentType = "formation" Other KYBDocumentType = "other" ProofOfAddress KYBDocumentType = "proof_of_address" OrganizationChart KYBDocumentType = "organization_chart" )
type Meta ¶
type Meta struct{}
swagger:meta Title: File Upload API Version: 1.0.0 Description: API for uploading files with metadata
type UploadDocumentParams ¶
type UploadDocumentParams struct {
// The account ID to upload the document for
// in: query
// required: true
// example: 00000000-0000-0000-0000-000000000000
AccountID string `json:"accountId"`
// The document type
// in: query
// required: true
// example: certificate_of_incorporation
DocumentType KYBDocumentType `json:"documentType"`
// in:form
Body struct {
// The file to upload
// required: true
// format: binary
File string `json:"file"`
}
}
UploadDocumentParams defines parameters for document upload
swagger:parameters uploadDocument
type UploadDocumentRequest ¶
type UploadDocumentRequest struct {
// The file to upload
// required: true
// format: binary
File string `json:"file"`
}
UploadDocumentRequest represents the actual DTO used in your handler This can be your real struct with *multipart.FileHeader
type UploadDocumentResponse ¶
type UploadDocumentResponse struct {
// Document ID
// example: doc_123456
DocumentID string `json:"documentId"`
// Upload status
// example: success
Status string `json:"status"`
}
UploadDocumentResponse represents the response from document upload
swagger:model
type UploadDocumentV2Params ¶
type UploadDocumentV2Params struct {
// The account ID to upload the document for
// in: query
// required: true
AccountID string `json:"accountId"`
// The document type
// in: query
// required: true
DocumentType KYBDocumentType `json:"documentType"`
// in:form
Body UploadDocumentRequest
}
Alternative approach: Using a reference to a DTO struct This is useful when you want to reuse the same struct in your actual handler code
swagger:parameters uploadDocumentV2
type UploadFlexibleParams ¶
type UploadFlexibleParams struct {
// in:body
Body struct {
// The file to upload (can be binary or base64)
// format: binary
File string `json:"file"`
}
}
UploadFlexibleParams defines parameters for flexible upload
swagger:parameters uploadFlexible
type UploadMultipleFilesParams ¶
type UploadMultipleFilesParams struct {
// in:body
Body struct {
// Profile picture
// format: binary
Avatar string `json:"avatar"`
// Resume document
// format: binary
Resume string `json:"resume"`
}
}
UploadMultipleFilesParams defines parameters for multiple file upload
swagger:parameters uploadMultipleFiles
type UploadResponse ¶
type UploadResponse struct {
// Upload ID
// Example: abc123
ID string `json:"id"`
// File name
// Example: document.pdf
Filename string `json:"filename"`
// File size in bytes
// Example: 1024
Size int64 `json:"size"`
// Upload timestamp
// Example: 2024-01-15T10:30:00Z
UploadedAt string `json:"uploaded_at"`
}
UploadResponse represents a successful upload response
swagger:model
type UploadSingleFileParams ¶
type UploadSingleFileParams struct {
// in:body
Body struct {
// The file to upload
// format: binary
File string `json:"file"`
}
}
UploadSingleFileParams defines parameters for single file upload
swagger:parameters uploadSingleFile
type UploadWithMetadataParams ¶
type UploadWithMetadataParams struct {
// in:body
Body struct {
// The file to upload
// format: binary
File string `json:"file"`
// File title
// required: true
Title string `json:"title"`
// File description
Description string `json:"description"`
// File tags
Tags []string `json:"tags"`
// Is file public
IsPublic bool `json:"is_public"`
}
}
UploadWithMetadataParams defines parameters for file upload with metadata
swagger:parameters uploadWithMetadata