This document describes the API for fetching details associated with the submitted Driver's License

Base URL

https://identity.cladfy.app/api/v1

API Endpoint:

POST /dl

Request Headers:

  • Payload: The data sent to the server in the request body. Here, it's a JSON object with a single key-value pair:
    "drivinglicense": 0 – A placeholder value that should be replaced with an actual Driving License number.

  • Content-Type: "application/json" Indicates that the data in the request body is in JSON format.

  • Accept: "application/json"Tells the server that the client expects the response to be in JSON format.

  • Authorization: "Basic 123"
    Used for HTTP Basic Authentication, where "123" is a placeholder for the base64-encoded username:password credentials. See guide here

Request Body:

The request body contains the driver's license. It should be JSON with the properties below.

  • drivinglicense: The Driving License Number - string.

Example Request Body:

{ "drivinglicense": "string" }

Response - 200:

The response will be a JSON object following the request data type specification: A typed dictionary containing the detailed results. Properties include:

  • success

    • Type: boolean
    • Required: Yes
  • response_code

    • Type: integer
    • Required: Yes
    • Example: 200
  • message

    • Type: string
    • Required: Yes
    • Example: "DL Checked Successfully"
  • data

    • Type: object
    • Required: Yes
  • status

    • Type: string
    • Required: Yes
    • Example: "ok"
  • request_id

    • Type: string
    • Required: Yes
    • Example: "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"

Example Response:

{ "success": true, "response_code": 200, "message": "DL Checked Successfully", "data": { "data": { "points": "XX", "national_id": "XXXXXXXX", "full_name": "XXXXXXXX XXXXXXX XXXXX", "address": "XXXXXXX", "status": "XXXXX", "date_of_issue": "XXXX-XX-XX", "foreignConversionDLNumber": null, "date_of_expiry": "XXXX-XX-XX", "smartDLBookingTestCenter": "XXX", "foreignConversionIssueDate": null, "phoneNumber": "XXXXXXXXXXXX", "city": "XXXXXXX", "kra": "XXXXXXXXXX", "pdl_number": null, "postalAddress": null, "date_of_birth": "XX-XXX-XX", "id_type": "XXXXXXX", "smartDLBookingStatusCd": "XX:XX:XX--XX:XX:XX", "hasSmartDl": "XXXXXXXXXXXXXXXXXXXX", "foreignConversionOrganization": null, "license_number": "XXXXXXXXXX", "blood_group": "XXXXXXX", "sex": "X", "foreignConversionExpiryDate": null, "smartDlChipId": null, "smartDLBookingDate": "XX-XXX-XX", "email": "X@XXXXX.XXX", "dlclass": "X", "smartDLBookingStatus": "XXXXXX", "foreignConversionDtlConversionType": null, "smartDLBookingStartDate": "XX-XXX-XX", "nationality": "XX", "interim_number": "XXXXXXXXX" }, "status": "ok" }, "request_id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX" }

Error Handling:

401 Unauthorized: If the API key is invalid.
400 Bad Request: If the request body is not valid JSON or missing required fields.
500 Internal Server Error: If an internal server error occurs during API request processing. The response will include an error message.

Python Test Example:

This test example demonstrates sending a POST request to the API endpoint with the Driving License. The response will include the associated details.

import requests url = "https://identity.cladfy.app/api/v1/dl" payload = { "drivinglicense": "string" } headers = { "Content-Type": "application/json", "Accept": "application/json", "Authorization": "Basic 123" } response = requests.post(url, json=payload, headers=headers) print(response.json())