Skip to main content
POST
/
api
/
loans
/
:id
/
disburse
curl -X POST "https://api.example.com/api/loans/cm4newloan1/disburse" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "success": true,
  "message": "Loan disbursed successfully",
  "data": {
    "id": "cm4newloan1",
    "loanNumber": "LN00000042",
    "unionMemberId": "cm4xyz789",
    "unionId": "cm4union1",
    "loanTypeId": "cm4type1",
    "principalAmount": 50000.00,
    "currencyCode": "NGN",
    "termCount": 6,
    "termUnit": "MONTH",
    "startDate": "2026-03-15T00:00:00.000Z",
    "endDate": "2026-09-15T00:00:00.000Z",
    "processingFeeAmount": 1000.00,
    "processingFeeCollected": true,
    "penaltyFeePerDayAmount": 100.00,
    "status": "ACTIVE",
    "disbursedAt": "2026-03-12T09:00:00.000Z",
    "closedAt": null,
    "notes": "Business expansion loan",
    "unionMember": {
      "id": "cm4xyz789",
      "firstName": "John",
      "lastName": "Doe",
      "email": "john.doe@example.com",
      "phone": "+2341234567890"
    },
    "union": {
      "id": "cm4union1",
      "name": "Lagos Central Union",
      "location": "Lagos"
    },
    "loanType": {
      "id": "cm4type1",
      "name": "Business Loan"
    },
    "createdAt": "2026-03-11T14:30:00.000Z",
    "updatedAt": "2026-03-12T09:00:00.000Z"
  }
}

Authentication

Requires authentication. Available to: ADMIN, SUPERVISOR (Branch Manager role) Note: CREDIT_OFFICER role cannot disburse loans.

Path Parameters

id
string
required
Loan ID

Request Body

disbursedAt
datetime
Custom disbursement date and time (ISO 8601 format). If not provided, current date/time is used.

Response

success
boolean
Indicates if the request was successful
message
string
Response message (“Loan disbursed successfully”)
data
object
Updated loan object with disbursement details

Behavior

Prerequisites

Before a loan can be disbursed:
  • Loan status must be APPROVED
  • Attempting to disburse a loan with any other status will result in an error

Actions Performed

  1. Status Update: Loan status is changed from APPROVED to ACTIVE
  2. Disbursement Timestamp: disbursedAt field is set to the provided date or current date/time
  3. Repayment Schedule: The existing repayment schedule becomes active and due dates start counting

Permission Model

  • ADMIN: Can disburse any approved loan
  • SUPERVISOR/Branch Manager: Can disburse approved loans in their scope
  • CREDIT_OFFICER: Cannot disburse loans (403 error - “Only union managers and admins can disburse loans”)

Difference from Status Update

While you can transition from APPROVED to ACTIVE using the status update endpoint, using the /disburse endpoint is recommended because:
  • It’s more semantically correct
  • It explicitly sets the disbursedAt timestamp
  • It provides clearer audit trails
  • It enforces stricter validation
curl -X POST "https://api.example.com/api/loans/cm4newloan1/disburse" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "success": true,
  "message": "Loan disbursed successfully",
  "data": {
    "id": "cm4newloan1",
    "loanNumber": "LN00000042",
    "unionMemberId": "cm4xyz789",
    "unionId": "cm4union1",
    "loanTypeId": "cm4type1",
    "principalAmount": 50000.00,
    "currencyCode": "NGN",
    "termCount": 6,
    "termUnit": "MONTH",
    "startDate": "2026-03-15T00:00:00.000Z",
    "endDate": "2026-09-15T00:00:00.000Z",
    "processingFeeAmount": 1000.00,
    "processingFeeCollected": true,
    "penaltyFeePerDayAmount": 100.00,
    "status": "ACTIVE",
    "disbursedAt": "2026-03-12T09:00:00.000Z",
    "closedAt": null,
    "notes": "Business expansion loan",
    "unionMember": {
      "id": "cm4xyz789",
      "firstName": "John",
      "lastName": "Doe",
      "email": "john.doe@example.com",
      "phone": "+2341234567890"
    },
    "union": {
      "id": "cm4union1",
      "name": "Lagos Central Union",
      "location": "Lagos"
    },
    "loanType": {
      "id": "cm4type1",
      "name": "Business Loan"
    },
    "createdAt": "2026-03-11T14:30:00.000Z",
    "updatedAt": "2026-03-12T09:00:00.000Z"
  }
}

Build docs developers (and LLMs) love