Vendor KYC API
API endpoints for managing vendor KYC document uploads, progress tracking, and document management.
Base URL: /admin/vendors
Endpoints Summary
| Method | Endpoint | Description |
|---|---|---|
| POST | /admin/vendors/:id/kyc/upload | Upload KYC document |
| GET | /admin/vendors/:id/kyc/progress | Get KYC progress |
| GET | /admin/vendors/:id/kyc/documents | List uploaded documents |
| DELETE | /admin/vendors/:id/kyc/documents | Delete document |
Upload Document
POST /admin/vendors/:id/kyc/upload
Request: multipart/form-data
| Field | Type | Required | Description |
|---|---|---|---|
file | File | Yes | Document file (max 50MB) |
documentKey | string | Yes | Document type identifier |
Returns: Upload confirmation with URL and metadata
Document Types
| Key | Description | Required |
|---|---|---|
companyRegistration | Certificate of incorporation | Yes |
taxClearance | Valid tax clearance certificate | Yes |
businessLicense | Operating/trading license | Yes |
bankStatement | 3-6 months of bank statements | Yes |
directorId | Director's/owner's ID document | Yes |
proofOfAddress | Business address verification | Yes |
tradingLicense | Additional trading license | No |
other | Other supporting documents | No |
Get KYC Progress
GET /admin/vendors/:id/kyc/progress
Returns:
| Field | Description |
|---|---|
vendorId | Vendor UUID |
verificationStatus | Current status |
totalRequired | Number of required documents (6) |
totalCompleted | Documents uploaded |
progressPercentage | Completion percentage |
documents | Status of each document type |
missingDocuments | List of missing document keys |
List Documents
GET /admin/vendors/:id/kyc/documents
Returns: List of uploaded documents with:
| Field | Description |
|---|---|
key | Storage key |
url | Public URL |
size | File size in bytes |
lastModified | Upload timestamp |
documentType | Document type identifier |
Delete Document
DELETE /admin/vendors/:id/kyc/documents
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
key | string | Yes | Full storage key of document |
File Requirements
| Requirement | Value |
|---|---|
| Maximum file size | 50MB |
| Supported formats | PDF, JPG, PNG, JPEG |
| Recommended resolution | 300 DPI minimum |
Verification Status
| Status | Description |
|---|---|
PENDING | No documents submitted |
DOCUMENTS_SUBMITTED | Some documents uploaded |
UNDER_REVIEW | All documents submitted, being reviewed |
VERIFIED | KYC approved |
REJECTED | KYC rejected |
Storage Structure
Documents are stored in GCP Cloud Storage:
vendors/{vendorId}/kyc/{documentKey}_{originalFilename}Public URLs are generated automatically.
Error Responses
| Status | Error | Description |
|---|---|---|
| 404 | Vendor not found | Invalid vendor ID |
| 400 | No file uploaded | Missing file in request |
| 400 | Document key is required | Missing documentKey field |
| 400 | File size exceeds limit | File > 50MB |
| 400 | Invalid document key | Unknown document type |
| 500 | Upload timeout | Operation cancelled |