> For the complete documentation index, see [llms.txt](https://docs.amala.cloud/amalacloud-api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.amala.cloud/amalacloud-api-docs/business/drivers-license-verification/basic-drivers-license-verification.md).

# Basic Driver's License Verification

The Driver's License Verification API allows users to verify an individual's driver's license number against their basic personal details to ensure identity authenticity.

### Base URL

```
https://acs-uat-verifications.amala.cloud/
```

```
https://acs-prod-verifications.amala.cloud/
```

### Endpoint

```swift
POST verification/api/v1/idv/basic/driverlicense
```

### Request Headers

You can use either the API key or Bearer Token for Authorization

| Header          | Type               | Description                                        |
| --------------- | ------------------ | -------------------------------------------------- |
| `Content-Type`  | `application/json` | Specifies that the request body is in JSON format. |
| `Authorization` | `Bearer <token>`   | API Key or Bearer Token for authentication.        |
| `x-api-key`     | `API KEY`          | API Key for authentication                         |

***

### Request Body

The request body should include the individual's driver's license number and basic identity information for verification.

#### Example Request

```json
{
  "idDocumentNumber": "AAD2320823198",
  "dateOfBirth": "1999-12-21",
  "firstName": "test",
  "lastName": "test",
  "reference": "DL_REF_98765",
  "serviceProviderCode": "SPC002"
}
```

#### Request Body Schema

| Field                 | Type   | Required | Description                                            |
| --------------------- | ------ | -------- | ------------------------------------------------------ |
| `idDocumentNumber`    | string | ✅        | The driver's license number of the individual.         |
| `dateOfBirth`         | string | ✅        | The individual's date of birth in `YYYY-MM-DD` format. |
| `firstName`           | string | ✅        | The individual's first name.                           |
| `lastName`            | string | ✅        | The individual's last name.                            |
| `reference`           | string | ✅        | Unique reference number for the verification request.  |
| `serviceProviderCode` | string | ✅        | Code identifying the service provider.                 |

### Responses

#### Success Response (200 OK)

If the verification is successful, the API returns whether the driver's license matches the provided details.

```json
 {
  "apiVersion": "1.0",
  "success": true,
  "code": "00",
  "message": "Verification successful",
  "requestId": "REQ-123456789",
  "data": {
    "isMatch": true,
    "message": "The driver's license matches the provided details."
  }
}
```

#### Response Schema

| Field          | Type    | Description                                                                |
| -------------- | ------- | -------------------------------------------------------------------------- |
| `apiVersion`   | string  | API version.                                                               |
| `success`      | boolean | Indicates whether the request was successful.                              |
| `code`         | string  | Response code.                                                             |
| `message`      | string  | Description of the response.                                               |
| `requestId`    | string  | Unique ID for tracking the request.                                        |
| `data.isMatch` | boolean | Indicates whether the provided driver's license matches the input details. |
| `data.message` | string  | Additional information about the match result.                             |

#### Error Responses

| Status Code | Description           | Example Response                                                         |
| ----------- | --------------------- | ------------------------------------------------------------------------ |
| `400`       | Bad Request           | `{ "success": false, "message": "Invalid request.", "code": "400" }`     |
| `401`       | Unauthorized          | `{ "success": false, "message": "Unauthorized access.", "code": "401" }` |
| `500`       | Internal Server Error | `{ "success": false, "message": "Server error.", "code": "500" }`        |

### Usage Example (cURL)

```bash
curl -X POST "https://acs-uat-verifications.amala.cloud/verification/api/v1/idv/basic/driverlicense" \
     -H "Authorization: Bearer YOUR_API_KEY" \
     -H "Content-Type: application/json" \
     -d '{
           "idDocumentNumber": "DL1234567890",
           "dateOfBirth": "1990-08-25",
           "firstName": "Jane",
           "lastName": "Smith",
           "reference": "DL_REF_98765",
           "serviceProviderCode": "SPC002"
         }'
```
