https://service.cladfy.com/v1/documents

This endpoint allows you to create a document record in association with a specific client. After a successful creation, the document will be ready for analysis.

❗️

Take Note

The postman collection shows the upload and create document URLs as https://service.cladfy.com/v1/create_document and https://service.cladfy.com/v1/upload ignore them and use https://service.cladfy.com/v1/documents

Request Headers:

  • 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.

  • X-API-KEY: "Your API Key"

Request Body:

This endpoint only requires a file and a document_provider. The rest are optional

📘

Supported document providers

See list of supported statement providers here

],
"file": "pdf",
"document_provider":"string",
"password": "string",- Optional file password
"name": "string", - Optional client name
"webhook": "string"- Optional callback url
}

Python Test Example:

This test example demonstrates sending a POST request to the API endpoint with the CLIENT ID and a FILE.

The response will include the associated details.

Response Body:

{  
    "id": 51479,  
    "transactions": null,  
    "password": null,  
    "props": null,  
    "url": "<https://*****************************.pdf">,  
    "status": 1,  
    "created_by_id": null,  
    "type": null,  
    "client_id": CLIENT_ID,  
    "created_at": "2025-01-24T08:10:12.735662",  
    "updated_at": "2025-01-24T08:10:12.735667",  
    "business_id": 50038,  
    "last_anaylzed_on": null,  
    "attempts_history": \[],  
    "name": "nannenenh",  
    "results": null,  
    "created_by": null,  
    "client": {  
        "id_image_url": null,  
        "dob": null,  
        "first_name": "FN ",  
        "id_image_back_url": null,  
        "business_id": BUSINESS_ID,  
        "home_ownership": null,  
        "last_name": "LN",  
        "occupation": null,  
        "created_by_id": CREATED_BY_ID,  
        "search_vector": null,  
        "occupation_name": null,  
        "preferred_name": null,  
        "timestamp": null,  
        "phone_number": "",  
        "occupation_location": null,  
        "marital_status": null,  
        "id": ID,  
        "national_id": "",  
        "occupation_position": null,  
        "address": null,  
        "kra": null,  
        "occupation_income": null,  
        "created_on": "2025-01-22T08:35:39.210973",  
        "email": "",  
        "selfie_image_url": null,  
        "title": null,  
        "updated_on": "2025-01-22T08:35:39.210980",  
        "loans": \[]  
    },  
    "business": {  
        "wallet_id": 50038,  
        "name": "BUSINESS_NAME",  
        "meta_data": null,  
        "id": ID,  
        "sender_id": "Cladfy FS",  
        "email": null,  
        "created_on": "2024-03-25T11:42:09.229224",  
        "phone": null,  
        "updated_on": "2024-03-25T11:42:09.229229",  
        "is_active": true,  
        "owner_id": OWNER_ID  
    }  
}

Supported Statement Providers

Providercode
Personal Mpesa Statementmpesa
Till Mpesa Statementmpesa_till
Equity Bank Personal Statementequity_personal
Equity Bank Personal Statementequity_business
Cooperative Bank Business Statementcoop_personal
Cooperative Bank Business Statementcoop_business
NCBA Bank Business Statementncba_business