This document describes the API for fetching details associated with the submitted Business registration number

Base URL

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

API Endpoint:

POST /business

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:
    "regnumber": 0 – A placeholder value that should be replaced with an actual Business Registration 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.

  • regnumber: The Business Registered Number - string.

Example Request Body:

{
  "regnumber": "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: Business Details Fetched Successfully
  • data

    • Type: object

    • Required: Yes

    • status

      • Type: string
      • Required: Yes
      • Example: XXXXXXXXXX
    • registration_date

      • Type: string
      • Required: Yes
      • Example: XX XXXX XXXX
    • postal_address

      • Type: string
      • Required: Yes
      • Example: XXXXX - XXXXX
    • physical_address

      • Type: string
      • Required: Yes
      • Example: XXXXX-XXXXXXXXXX/XXX & XXX, XXXXXXX, Fl: Xst floor, Room/Door: X, XXXXX-XXXXXXXXXX/XXX & XXX, XXXXXXX
    • phone_number

      • Type: string
      • Required: Yes
      • Example: +XXXXXXXXXXXX
    • kra_pin

      • Type: string
      • Required: Yes
      • Example: XXXXXXXXXXX
    • email

    • business_name

      • Type: string
      • Required: Yes
      • Example: XXXXXXXX XXXXXXXX XXXXX XXXXXXX
    • partners

      • Type: array[string]
      • Required: Yes
      • Number of items: 0 or more
  • request_id

    • Type: string
    • Required: Yes
    • Example: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Example Response:

{
  "success": true,
  "response_code": 200,
  "message": "Business Details Fetched Successfully",
  "data": {
    "status": "XXXXXXXXXX",
    "registration_date": "XX XXXX XXXX",
    "postal_address": "XXXXX - XXXXX",
    "physical_address": "XXXXX-XXXXXXXXXX/XXX & XXX, XXXXXXX, Fl: Xst floor, Room/Door: X, XXXXX-XXXXXXXXXX/XXX & XXX, XXXXXXX",
    "phone_number": "+XXXXXXXXXXXX",
    "kra_pin": "XXXXXXXXXXX",
    "email": "[email protected]",
    "business_name": "XXXXXXXX XXXXXXXX XXXXX XXXXXXX",
    "partners": []
  },
  "request_id": "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
}

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

import requests

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

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

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

print(response.json())