> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.driver.olycab.in/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.driver.olycab.in/_mcp/server.

# Submit Driver KYC Document

GET https://driver/#get9

# Submit Driver KYC Document

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

| Header          | Type     | Required | Description                |
| --------------- | -------- | -------- | -------------------------- |
| `Authorization` | `string` | **Yes**  | Format: `Bearer`           |
| `Content-Type`  | `string` | **Yes**  | Must be `application/json` |

***

### Request Body Schema

| Field                  | Data Type | Required    | Nullable | Allowed Values / Constraints                                                                                | Description                                          |
| ---------------------- | --------- | ----------- | -------- | ----------------------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| `document_type`        | `enum`    | **Yes**     | No       | `"DRIVING_LICENCE""AADHAAR""PAN""VEHICLE_RC""VEHICLE_MODEL_NUMBER""PERMIT""INSURANCE""FITNESS_CERTIFICATE"` | Category of document submitted                       |
| `front_image_url`      | `string`  | Conditional | Yes      | Valid URL                                                                                                   | Hosted URL of the front side of document             |
| `back_image_url`       | `string`  | Conditional | Yes      | Valid URL                                                                                                   | Hosted URL of the back side of document              |
| `document_number`      | `string`  | Conditional | Yes      | Any string                                                                                                  | Identifier number (e.g. DL, Aadhaar, PAN, RC number) |
| `name_on_doc`          | `string`  | Conditional | Yes      | Any string                                                                                                  | Name as printed on document (required for `PAN`)     |
| `date_of_birth`        | `string`  | Conditional | Yes      | ISO 8601 Date string                                                                                        | Date of birth (required for `DRIVING_LICENCE`)       |
| `fuel_type`            | `enum`    | Conditional | Yes      | `"PETROL"`, `"DIESEL"`, `"CNG"`, `"ELECTRIC"`                                                               | Vehicle fuel type (required for `VEHICLE_RC`)        |
| `vehicle_model_number` | `string`  | Conditional | Yes      | Any string                                                                                                  | Required for `VEHICLE_MODEL_NUMBER`                  |

***

### Per-Document Required Fields Matrix

| Document Type          | Required Fields                                                         |
| ---------------------- | ----------------------------------------------------------------------- |
| `DRIVING_LICENCE`      | `front_image_url`, `back_image_url`, `document_number`, `date_of_birth` |
| `AADHAAR`              | `front_image_url`, `document_number`                                    |
| `PAN`                  | `front_image_url`, `document_number`, `name_on_doc`                     |
| `VEHICLE_RC`           | `front_image_url`, `back_image_url`, `document_number`, `fuel_type`     |
| `VEHICLE_MODEL_NUMBER` | `vehicle_model_number`                                                  |
| `PERMIT`               | `front_image_url`                                                       |
| `INSURANCE`            | `front_image_url`                                                       |
| `FITNESS_CERTIFICATE`  | `front_image_url`                                                       |

***

### Request Body Examples

#### Example 1: Driving Licence

```json
{
  "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

```json
{
  "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

```json
{
  "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 Key | Data Type | Description                                                |
| ------------- | --------- | ---------------------------------------------------------- |
| `message`     | `string`  | Confirmation message (`"Document submitted successfully"`) |
| `document`    | `object`  | The inserted or updated document record                    |

#### `document` Object Fields

| Field                  | Data Type | Nullable | Allowed Values / Constraints                  | Description                                         |
| ---------------------- | --------- | -------- | --------------------------------------------- | --------------------------------------------------- |
| `id`                   | `string`  | No       | Prefixed with `ddoc_`                         | Unique document record ID                           |
| `driverId`             | `string`  | No       | Prefixed with `drv_`                          | ID of driver submitting document                    |
| `document_type`        | `enum`    | No       | Same as request enum                          | Submitted document category                         |
| `front_image_url`      | `string`  | Yes      | URL                                           | URL of front side image                             |
| `back_image_url`       | `string`  | Yes      | URL                                           | URL of back side image                              |
| `document_number`      | `string`  | Yes      | String                                        | Document identifier number                          |
| `name_on_doc`          | `string`  | Yes      | String                                        | Name on document                                    |
| `date_of_birth`        | `string`  | Yes      | ISO 8601 Timestamp                            | Date of birth                                       |
| `fuel_type`            | `enum`    | Yes      | `"PETROL"`, `"DIESEL"`, `"CNG"`, `"ELECTRIC"` | Fuel type (for RC)                                  |
| `vehicle_model_number` | `string`  | Yes      | String                                        | Model number                                        |
| `verification_status`  | `enum`    | No       | `"PENDING""APPROVED""REJECTED"`               | Admin verification status (defaults to `"PENDING"`) |
| `rejection_reason`     | `string`  | Yes      | String                                        | Feedback if rejected by admin                       |
| `verified_at`          | `string`  | Yes      | ISO 8601 Timestamp                            | Timestamp when admin approved/rejected              |
| `verified_by`          | `string`  | Yes      | Admin ID                                      | ID of admin who reviewed                            |
| `created_at`           | `string`  | No       | ISO 8601 Timestamp                            | Initial submission timestamp                        |
| `updated_at`           | `string`  | No       | ISO 8601 Timestamp                            | Last update timestamp                               |

***

### Response Examples

#### 1. `200 OK` — Document Submitted Successfully

```json
{
  "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

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

```

Or for Vehicle RC:

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

```

#### 3. `400 Bad Request` — Schema / Type Validation Error

```json
{
  "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

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

```

#### 5. `403 Forbidden` — Account Blocked / Deactivated

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

```

#### 6. `500 Internal Server Error`

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

```

***

### Status Codes Reference

| HTTP Status Code                | Condition                                                                            |
| ------------------------------- | ------------------------------------------------------------------------------------ |
| **`200 OK`**                    | Document successfully stored or updated with status reset to `PENDING`.              |
| **`400 Bad Request`**           | Missing required document fields (e.g. missing licence number or invalid fuel type). |
| **`401 Unauthorized`**          | Missing, invalid, expired token or session revoked.                                  |
| **`403 Forbidden`**             | Driver account is deactivated or blocked.                                            |
| **`500 Internal Server Error`** | Server or database query error.                                                      |

Reference: https://docs.driver.olycab.in/oly-driver/document/submit-driver-kyc-document

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Examples

**SDK Code**

```python
import requests

url = "https://driver/#get9"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://driver/#get9';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://driver/#get9"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://driver/#get9")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://driver/#get9")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://driver/#get9', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://driver/#get9");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://driver/#get9")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```