Skip to content

Getting Loan History

This document provides an overview of how to retrieve loan history data using the Exchange API. Loan history includes information about past transactions, payments, and other relevant activities associated with a loan.

This is a continuation of the Getting Loan Data guide. Ensure you have reviewed that section before proceeding.

To access the history of a specific loan, you will need to use the loan’s unique identifier (loan ID) to query the API for its events. The following example demonstrates how to retrieve the event history for a loan.

GET https://qa.exchange.crfusa.com/api/loan/events
?partnerId={{partnerId}}
&loanId={{sellerLoanId}}
&kinds=Add
&kinds=Payment
x-api-key: {{key}}
  • partnerId (string, required): The unique identifier for the partner making the request.
  • loanId (string, required): The unique identifier of the loan for which you
  • fromDate (string, optional): The start date for filtering events (ISO 8601 format).
  • toDate (string, optional): The end date for filtering events (ISO 8601 format).
  • kinds (array of LoanEventKind, optional): A list of event kinds to filter the results. The above query filters for “Add” and “Payment” events.

The response will be a JSON array containing the loan events that match the specified criteria. Below is an example of what the response might look like. We discuss each event type in moer detail in the Event Types document.

[
{
"kind": "Add",
"dateCreated": "2022-12-01T15:39:05.2475327+00:00",
"eventId": "Add|de4c6b6d-5a3d-4619-b0f2-fa92710c8f57|1440",
"loanId": "de4c6b6d-5a3d-4619-b0f2-fa92710c8f57|1440",
"sellerPartnerId": "de4c6b6d-5a3d-4619-b0f2-fa92710c8f57",
"sellerLoanId": "1440",
"listingMetadata": {
"loanAmount": 239818,
"percent": 0.8,
"multiplier": 1,
"dateFunded": "2022-10-31T19:00:00+00:00",
"listingTag": "ssbci-mn",
"interestRate": 0.0725,
"termMonths": 60,
"interestOnlyPaymentAmount": 1448.90041666667,
"principalAndInterestPaymentAmount": 17651.6224370318,
"dateFirstPayment": "2022-11-30T18:00:00+00:00",
"datePaymentTypeConversion": "2023-11-30T18:00:00+00:00",
"isRefinance": false,
"serviceFee": {
"type": "PercentWithFloor",
"percentAnnual": 0.0125,
"floorFeeMonthly": 40
},
"businessType": "SoleProprietorship",
"businessAddressState": "Minnesota",
"businessAddressCity": "Waconia",
"businessEmployeeCount": 1,
"businessIndustry": "51321",
"OriginationFee": 8393.63,
"BusinessYearIncorporated": 2001,
"JobsAdded": 0,
"PriorBankruptcy": "None",
"BorrowerAssessedOriginationFee": "150",
"JobsRetained": "0",
"UseofProceeds": "LND, BLD",
"OwnersResidentInCDFIInvestmentArea": "No",
"OperatingInCDFIInvestmentArea": "Yes",
"ExpansionIntoCDFIInvestmentArea": "No",
"IsSEDIBusiness": "No",
"BIPOCOwnershipMajority": "Yes",
"WomenOwnershipMajority": "No",
"VeteranOwnershipMajority": "No",
"PrincipalOwnerDemographics": "PNR",
"LastCalendarYearRevenue": "403758",
"LastCalendarYearProfitLoss": "141315.3",
"IsBusinessClimateAligned": "No",
"AffectedByClimateChange": "No"
},
"privateMetadata": {
"c2CLeadId": null,
"businessName": "John's Tacos",
"businessAddress": {
"line1": "1252 Crosswinds Way",
"line2": null,
"city": "Waconia",
"state": "Minnesota",
"postalCode": "55387"
},
"OwnerCreditScore": 392
}
},
{
"kind": "Payment",
"dateCreated": "2022-12-01T15:50:34.3149257+00:00",
"eventId": "fd9d7ac4-5aae-4e17-94df-75c8daa5d295",
"loanId": "de4c6b6d-5a3d-4619-b0f2-fa92710c8f57|1440",
"sellerPartnerId": "de4c6b6d-5a3d-4619-b0f2-fa92710c8f57",
"sellerLoanId": "1440",
"datePaid": "2022-11-30T18:00:00+00:00",
"paymentMetadata": {
"unpaidPrincipalBeginningBalance": 239818,
"unpaidInterestBeginningBalance": 1448.90041666667,
"paymentAmount": 1448.9,
"unpaidPrincipalEndingBalance": 239818,
"unpaidInterestEndingBalance": 0,
"serviceFees": 249.81,
"principalDueBuyer": 0,
"interestDueBuyer": 909.31,
"paymentDueDate": "2022-11-30T18:00:00+00:00",
"daysDelinquent": 0,
"isInDefault": false,
"lateFee": null,
"lateFeeDueBuyer": null,
"paymentType": "OnTime",
"isPartialMonth": false
}
}
]