Financial History - average

METHOD: POST

RESOURCE URL

{base-url}/api/v1/request/customer-insights/financial-attributes-avg


Request body description

FieldField nameData typeMax lengthRequiredDescription
1identificationNumberString10TrueEither the BVN or Phone number
2startYearMonthString7TrueThe start month and year in yyyy-MM
3endYearMonthString7TrueThe end month and year in yyyy-MM

Response message description

FieldField nameData typeDescription
1responseCodeStringResponse code of the request
2responseMessageStringResponse mesaage of the request
3dataList(Object)Response data containing the list of financial history including the average balance of total credit minus total debit of the records assigned to the idendentification Number and the date range


Sample Request

{
	"phone":"2348082135806",
    "startYearMonth":"2024-02",
    "endYearMonth":"2024-07"
}

_Sample Response

_

{
    "responseCode": "00",
    "responseMessage": "Successful",
    "data": {
        "monthOnMonth": [
            {
                "phone": "2348082135806",
                "totalDebit": 4000.0,
                "debitCount": 1.0,
                "totalCredit": 4133200.0,
                "creditCount": 15.0,
                "yearMonth": "2024-04",
                "averageBalance": 369248.425
            },
            {
                "phone": "2348082135806",
                "totalDebit": 1500.0,
                "debitCount": 1.0,
                "totalCredit": 0.0,
                "creditCount": 0.0,
                "yearMonth": "2024-05",
                "averageBalance": 0.0
            },
            {
                "phone": "2348082135806",
                "totalDebit": 581954.0,
                "debitCount": 73.0,
                "totalCredit": 0.0,
                "creditCount": 0.0,
                "yearMonth": "2024-07",
                "averageBalance": 0.0
            }
        ],
        "averageValue": {
            "totalDebit": 195818.0,
            "debitCount": 25.0,
            "totalCredit": 1377733.3333333333,
            "creditCount": 5.0,
            "averageBalance": 123082.80833333333
        }
    }
}