This endpoint will provide clients with the loans that the user is serving or has served.
Request Message description
Field
# |
Field name | Data type | Max length | Required | Description |
1 | customerId | String | true | The Email or Mobile Number of the user for which history data is being retrieved. | |
2 | startDate | Long | true | The Start Date/Time to be used as the filter for the data. This will specify the lower bound of the date range. | |
3 | endDate | String | true | The End Date/Time to be used as the filter for the data. This will specify the upper bound of the date range. | |
4 | channelCode | String | true | The Code of the channel for which this request is originating. | |
5 | pageNumber | Numeric | true | The Number of the page from which the loan history records should be pulled. | |
6 | pageSize | Numeric | true | The Maximum number of Records to be contained on a page of records. |
Endpoint
GET /loans/{customerId}?startDate={startDate}&endDate={endDate}&pageNumber={pageNumber}&pageSize={pageSize}&channelCode={channelCode} |
Headers
Authorization: Bearer {{token}} |
Sample request
/loans/2348123456789?startDate=2017-01-01&endDate=2017-03-01&pageNumber=1&pageSize=10&channelCode=0002 |
Response Message field description
Field
# |
Field name | Description |
1 | responseCode | The response code |
2 | responseMessage | response message |
3 | data | [Array] of the loans |
3a | offerCode | |
3b | providerloanId | |
3c | amount | |
3d | interest | |
3e | provider | |
3f | status | |
3g | statusDescription | |
3h | tenure | |
3i | acceptedDate | |
3j | dueDate | |
4 | count | The Number of Records that is available within the specified date range. |
Sample Response (success)
{
“responseCode”: “00”, “count”: 2, “data”: [ { “id”: 32, “offerId”: “OFFER1497358087100”, “customerId”: “2348135446702”, “providerId”: 3, “providerCode”: “MKT”, “channelId”: 1, “channelCode”: “FBNMOBILE”, “status”: “Accepted”, “amount”: 100000, “amountPayable”: 110000, “tenure”: 30, “dueDate”: 1499950113171, “terms”: “Please read the terms and conditions on https://onefi.com/terms”, “currency”: “566”, “customerDebitMethod”: 2, “customerCreditMethod”: 4, “providerLoanId”: “OFFER1497358087100”, “dateCreated”: 1497361713217 }, { “id”: 30, “offerId”: “OFFER1497351015100”, “customerId”: “2348135446702”, “providerId”: 3, “providerCode”: “MKT”, “channelId”: 1, “channelCode”: “FBNMOBILE”, “status”: “Accepted”, “amount”: 100000, “amountPayable”: 110000, “tenure”: 30, “dueDate”: 1499943066892, “terms”: “Please read the terms and conditions on https://onefi.com/terms”, “currency”: “566”, “customerDebitMethod”: 2, “customerCreditMethod”: 4, “providerLoanId”: “OFFER1497351015100”, “dateCreated”: 1497354667123 } ] } |
Sample Response (failure)
{
“responseCode”: “104”, “responseMessage”: “Unsupported date format. Kindly use ‘yyyy-mm-dd'” } |