Add Loan Repayment Data to a Client

PUT /v1/api/clients/loans

This endpoint adds loan repayment data to a client

Headers

Name
Value

Content-Type

application/json

x-api-key

Business Secret Key

Body

Name
Type
Description

clientId

String

The client ID (optional, required if externalClientId is not provided).

externalClientId

String

The external client ID (optional, required if clientId is not provided).

loanReferenceId

String

The loan reference ID (required).

applicationDate

String

The application date (format: YYYY-MM-DD, required).

dateLoanWasGranted

String

The date the loan was granted (format: YYYY-MM-DD, optional).

applicationStatus

String

The application status (valid values: "approved", "rejected", "pending", "in_review", required).

amount

Number

The loan amount (required).

currency

String

The currency (3-letter code, required).

tenure

Object

The loan tenure (required).

value

Number

The tenure value (required)

interval

String

The tenure interval (valid values: "days", "weeks", "months", required).

totalInstallments

Number

The total number of installments (required).

installmentRepayments

Object[]

The installment repayments array (required).

dueDate

String

The due date of the installment (format: YYYY-MM-DD, required).

datePaid

String

The date the installment was paid (format: YYYY-MM-DD, required).

amountDue

Object

The amount due for the installment (required).

amount

Number

The amount due (required).

currency

String

The currency of the amount due (3-letter code, required).

amountPaid

Object

The amount paid for the installment (required).

amount

Number

The amount paid (required).

currency

String

The currency of the amount paid (3-letter code, required).

status

String

The status of the installment repayment (valid values: "fully_paid", "not_paid", "incomplete_payment","paid_early", "paid_late", required).

loanRepaymentStatus

String

The loan repayment status (valid values: "settled", "not_settled", "in_progress","settled_early", "settled_late", required).

dateLastInstallmentIsDue

String

The date the last installment is due (format: YYYY-MM-DD, required).

dateLoanIsSettled

String

The date the loan is settled (format: YYYY-MM-DD, optional, can be null).

{
    "clientId": "60d21b4667d0d8992e610c85",
    "loanReferenceId": "loan_12345",
    "applicationDate": "2023-01-01",
    "dateLoanWasGranted": "2023-01-15",
    "applicationStatus": "approved",
    "amount": 10000,
    "currency": "NGN",
    "tenure": {
        "value": 12,
        "interval": "months"
    },
    "totalInstallments": 12,
    "installmentRepayments": [
        {
            "dueDate": "2023-02-01",
            "datePaid": "2023-02-01",
            "amountDue": {
                "amount": 833.33,
                "currency": "NGN"
            },
            "amountPaid": {
                "amount": 833.33,
                "currency": "NGN"
            },
            "status": "fully_paid"
        }
    ],
    "loanRepaymentStatus": "in_progress",
    "dateLastInstallmentIsDue": "2024-01-01",
    "dateLoanIsSettled": null
}

Response

{
"success": true,
"statusCode": 200,
"message": "Client data updated successfully!",
"data": {
    "loans": [
        {
            "tenure": {
                "value": 0
            },
            "dateLoanIsSettled": null,
            "_id": "669baf94ff3c2f8f82666716",
            "installmentRepayments": [],
            "_createdAt": "2024-07-20T13:37:4040+01:00",
            "_lastModifiedAt": "2024-07-20T13:37:4040+01:00",
            "id": "669baf94ff3c2f8f82666716"
        }
    ],
    "latestDigitalCreditInfo": null,
    "digitalCreditInfoHistory": [],
    "externalReferenceId": "1234567890",
    "businessId": "667d38938450ddf0f7ea2468",
    "createdAt": "2024-07-20T12:34:35.459Z",
    "lastModifiedAt": "2024-07-20T12:37:40.506Z",
    "_createdAt": "2024-07-20T13:34:3535+01:00",
    "_lastModifiedAt": "2024-07-20T13:37:4040+01:00",
    "clientId": "669baedbff3c2f8f8266670c",
    "id": "669baedbff3c2f8f8266670c"
},
"links": []
}

Last updated