Skip to navigation

List Driver Documents

View as Markdown

Fetches the complete list of all KYC documents uploaded by the authenticated driver, including file URLs, entered numbers, and administrative verification statuses.


Endpoint Overview

  • Method: GET

  • Route: /api/v1/driver/documents

  • Authentication: Bearer Token (Driver JWT)

  • Content-Type: N/A


Request Headers

HeaderTypeRequiredDescription
AuthorizationstringYesFormat: Bearer

Request Body Schema

None (GET request)


Response Body Schema (200 OK)

Top-Level KeyData TypeDescription
documentsarrayArray of all document records submitted by the driver

Document Item Fields

FieldData TypeNullableAllowed Values / ConstraintsDescription
idstringNoPrefixed with ddoc_Unique document ID
driverIdstringNoPrefixed with drv_Driver ID
document_typeenumNo"DRIVING_LICENCE""AADHAAR""PAN""VEHICLE_RC""VEHICLE_MODEL_NUMBER""PERMIT""INSURANCE""FITNESS_CERTIFICATE"Document category
front_image_urlstringYesValid URLHosted front side image URL
back_image_urlstringYesValid URLHosted back side image URL
document_numberstringYesStringDocument identifier number
name_on_docstringYesStringName printed on document
date_of_birthstringYesISO 8601 TimestampDate of birth
fuel_typeenumYes"PETROL", "DIESEL", "CNG", "ELECTRIC", nullVehicle fuel type (for RC)
vehicle_model_numberstringYesStringModel number
verification_statusenumNo"PENDING""APPROVED""REJECTED"Admin approval state
rejection_reasonstringYesStringReason if status is REJECTED
verified_atstringYesISO 8601 TimestampWhen admin reviewed the document
verified_bystringYesAdmin IDAdmin who reviewed the document
created_atstringNoISO 8601 TimestampInitial submission timestamp
updated_atstringNoISO 8601 TimestampLast update timestamp

Response Examples

1. `200 OK` — Multiple Documents Returned

{
"documents": [
{
"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": "APPROVED",
"rejection_reason": null,
"verified_at": "2026-09-21T06:00:00.000Z",
"verified_by": "adm_super123",
"created_at": "2026-09-21T05:30:00.000Z",
"updated_at": "2026-09-21T06:00:00.000Z"
},
{
"id": "ddoc_1b2c3d4e5f",
"driverId": "drv_8a7b6c5d4e",
"document_type": "PAN",
"front_image_url": "https://storage.example.com/docs/pan_front.jpg",
"back_image_url": null,
"document_number": "ABCDE1234F",
"name_on_doc": "Ravi Kumar",
"date_of_birth": null,
"fuel_type": null,
"vehicle_model_number": null,
"verification_status": "PENDING",
"rejection_reason": null,
"verified_at": null,
"verified_by": null,
"created_at": "2026-09-21T05:35:00.000Z",
"updated_at": "2026-09-21T05:35:00.000Z"
}
]
}

2. `200 OK` — No Documents Submitted Yet

{
"documents": []
}

3. `401 Unauthorized` — Missing / Expired Token / Revoked Session

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

4. `403 Forbidden` — Account Blocked / Deactivated

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

5. `500 Internal Server Error`

{
"error": "Failed to fetch documents"
}

Status Codes Reference

HTTP Status CodeCondition
200 OKList of documents returned successfully (can be empty array).
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.