Skip to navigation

Submit Driver KYC Document

View as Markdown

Submits or re-submits a verification document (Driving Licence, Aadhaar, PAN, Vehicle RC, Insurance, etc.) for the authenticated driver.

💡 Upsert & Workflow Behavior: Re-submitting an existing document type updates the record, clears previous rejection reasons, and resets verification_status back to “PENDING”.

On the driver’s first document submission, the driver account status automatically transitions from PENDING_ONBOARDING to PENDING_APPROVAL.


Endpoint Overview

  • Method: POST

  • Route: /api/v1/driver/documents

  • Authentication: Bearer Token (Driver JWT)

  • Content-Type: application/json


Request Headers

HeaderTypeRequiredDescription
AuthorizationstringYesFormat: Bearer
Content-TypestringYesMust be application/json

Request Body Schema

FieldData TypeRequiredNullableAllowed Values / ConstraintsDescription
document_typeenumYesNo"DRIVING_LICENCE""AADHAAR""PAN""VEHICLE_RC""VEHICLE_MODEL_NUMBER""PERMIT""INSURANCE""FITNESS_CERTIFICATE"Category of document submitted
front_image_urlstringConditionalYesValid URLHosted URL of the front side of document
back_image_urlstringConditionalYesValid URLHosted URL of the back side of document
document_numberstringConditionalYesAny stringIdentifier number (e.g. DL, Aadhaar, PAN, RC number)
name_on_docstringConditionalYesAny stringName as printed on document (required for PAN)
date_of_birthstringConditionalYesISO 8601 Date stringDate of birth (required for DRIVING_LICENCE)
fuel_typeenumConditionalYes"PETROL", "DIESEL", "CNG", "ELECTRIC"Vehicle fuel type (required for VEHICLE_RC)
vehicle_model_numberstringConditionalYesAny stringRequired for VEHICLE_MODEL_NUMBER

Per-Document Required Fields Matrix

Document TypeRequired Fields
DRIVING_LICENCEfront_image_url, back_image_url, document_number, date_of_birth
AADHAARfront_image_url, document_number
PANfront_image_url, document_number, name_on_doc
VEHICLE_RCfront_image_url, back_image_url, document_number, fuel_type
VEHICLE_MODEL_NUMBERvehicle_model_number
PERMITfront_image_url
INSURANCEfront_image_url
FITNESS_CERTIFICATEfront_image_url

Request Body Examples

Example 1: Driving Licence

{
"document_type": "DRIVING_LICENCE",
"front_image_url": "https://storage.example.com/docs/dl_front.jpg",
"back_image_url": "https://storage.example.com/docs/dl_back.jpg",
"document_number": "KA0120200012345",
"date_of_birth": "1992-05-15"
}

Example 2: Vehicle RC

{
"document_type": "VEHICLE_RC",
"front_image_url": "https://storage.example.com/docs/rc_front.jpg",
"back_image_url": "https://storage.example.com/docs/rc_back.jpg",
"document_number": "KA-01-AB-1234",
"fuel_type": "PETROL"
}

Example 3: PAN Card

{
"document_type": "PAN",
"front_image_url": "https://storage.example.com/docs/pan_front.jpg",
"document_number": "ABCDE1234F",
"name_on_doc": "Ravi Kumar"
}

Response Body Schema (200 OK)

Top-Level KeyData TypeDescription
messagestringConfirmation message ("Document submitted successfully")
documentobjectThe inserted or updated document record

document Object Fields

FieldData TypeNullableAllowed Values / ConstraintsDescription
idstringNoPrefixed with ddoc_Unique document record ID
driverIdstringNoPrefixed with drv_ID of driver submitting document
document_typeenumNoSame as request enumSubmitted document category
front_image_urlstringYesURLURL of front side image
back_image_urlstringYesURLURL of back side image
document_numberstringYesStringDocument identifier number
name_on_docstringYesStringName on document
date_of_birthstringYesISO 8601 TimestampDate of birth
fuel_typeenumYes"PETROL", "DIESEL", "CNG", "ELECTRIC"Fuel type (for RC)
vehicle_model_numberstringYesStringModel number
verification_statusenumNo"PENDING""APPROVED""REJECTED"Admin verification status (defaults to "PENDING")
rejection_reasonstringYesStringFeedback if rejected by admin
verified_atstringYesISO 8601 TimestampTimestamp when admin approved/rejected
verified_bystringYesAdmin IDID of admin who reviewed
created_atstringNoISO 8601 TimestampInitial submission timestamp
updated_atstringNoISO 8601 TimestampLast update timestamp

Response Examples

1. 200 OK — Document Submitted Successfully

{
"message": "Document submitted successfully",
"document": {
"id": "ddoc_9a8b7c6d5e",
"driverId": "drv_8a7b6c5d4e",
"document_type": "DRIVING_LICENCE",
"front_image_url": "https://storage.example.com/docs/dl_front.jpg",
"back_image_url": "https://storage.example.com/docs/dl_back.jpg",
"document_number": "KA0120200012345",
"name_on_doc": null,
"date_of_birth": "1992-05-15T00:00:00.000Z",
"fuel_type": null,
"vehicle_model_number": null,
"verification_status": "PENDING",
"rejection_reason": null,
"verified_at": null,
"verified_by": null,
"created_at": "2026-09-21T05:30:00.000Z",
"updated_at": "2026-09-21T05:30:00.000Z"
}
}

2. 400 Bad Request — Missing Required Per-Document Field

{
"error": "Licence number is required for Driving Licence"
}

Or for Vehicle RC:

{
"error": "Fuel type is required for Vehicle RC"
}

3. 400 Bad Request — Schema / Type Validation Error

{
"success": false,
"message": "Validation failed: document_type: Invalid enum value",
"errors": [
{
"field": "document_type",
"message": "Invalid enum value"
}
]
}

4. 401 Unauthorized — Missing / Expired Token / Revoked Session

{
"error": "Unauthorized",
"message": "Invalid or expired driver access token."
}

5. 403 Forbidden — Account Blocked / Deactivated

{
"error": "Forbidden",
"message": "Driver account is blocked or deactivated."
}

6. 500 Internal Server Error

{
"error": "Failed to submit document"
}

Status Codes Reference

HTTP Status CodeCondition
200 OKDocument successfully stored or updated with status reset to PENDING.
400 Bad RequestMissing required document fields (e.g. missing licence number or invalid fuel type).
401 UnauthorizedMissing, invalid, expired token or session revoked.
403 ForbiddenDriver account is deactivated or blocked.
500 Internal Server ErrorServer or database query error.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.