This document describes the API for fetching details associated with the submitted alien ID number

Base URL

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

API Endpoint:

POST /alienid

Request Headers:

The request body contains the AliedID number. It should be JSON with the properties below.

  • Payload: The data sent to the server in the request body. Here, it's a JSON object with a single key-value pair:
    "idnumber": 0 – A placeholder value that should be replaced with an actual ID 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 idnumber. It should be JSON with the properties below.

  • idnumber: The AlienID Number - string.

Example Request Body:

{
  "idnumber": 0
}

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

    • boolean (required)
  • response_code

    • integer (required)
    • Example: 200
  • message

    • string (required)
    • Example: Alien ID Details Fetched Successfully
  • data

    • object (required)

    • first_name

      • string (required)
      • Example: FIRSTNAME
    • last_name

      • string (required)
      • Example: LASTNAME
    • other_name

      • string (required)
      • Example: OTHERNAME
    • name

      • string (required)
      • Example: LASTNAME FIRSTNAME OTHERNAME
    • gender

      • string (required)
      • Example: Female
    • dob

      • string (required)
      • Example: yyyy-mm-dd
    • citizenship

      • string (required)
      • Example: Alien
    • id_number

      • string (required)
      • Example: 52425261
    • serial_no

      • string (required)
      • Example: 3444124
    • valid

      • boolean (required)
  • request_id

    • string (required)
    • Example: 39d81b8f-fcb7-49ff-9405-0ec1c312764e

Example Response:

{
  "success": true,
  "response_code": 200,
  "message": "Alien ID Details Fetched Successfully",
  "data": {
    "first_name": "FIRSTNAME",
    "last_name": "LASTNAME",
    "other_name": "OTHERNAME",
    "name": "LASTNAME FIRSTNAME OTHERNAME",
    "gender": "Female",
    "dob": "yyyy-mm-dd",
    "citizenship": "Alien",
    "id_number": "52425261",
    "serial_no": "3444124",
    "valid": true
  },
  "request_id": "39d81b8f-fcb7-49ff-9405-0ec1c312764e"
}

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 AlienID. The response will include the associated details.

import requests

url = "https://identity.cladfy.app/api/v1/alienid"

payload = { "idnumber": 0 }
headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
    "Authorization": "Basic 123"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())