API - Parent-Child Loan Linking

General

Parent-child loan linking functionality lets you designate multiple loans as the child of a single loan. When transactions are posted to the parent loan, a transaction is also posted to each child loan, in a percentage the user specifies. Transactions that get split and posted to child loans include: paymentschargesadvancementscredits, and AutoPays. This allows you to give multiple loans to the same borrower, with the ability to track them as both a single loan, and individual loans. This is a one-dimensional link. This means that if a loan is a child of a parent, it cannot be the parent loan itself.

To link child loans to a parent, use the following request:

PUT https://loanpro.simnang.com/api/public/api/1/odata.svc/Loans(id)

Make sure to replace id with the ID of the parent loan. The payload should look like this:

{  
"id":"114",
"LoanChilds":{
"results":[
{
"id":null,
"childId":"81",
"enrolled":1,
"percentage":50
},
{
"id":null,
"childId":"79",
"enrolled":1,
"percentage":50
}
]
},
"__update":true,
"__id":"114"
}

Then each child loan should have the following information:

  • childId - This is the ID of the child loan.
  • enrolled - 1 means the loan will log a transaction for a percentage of each transaction logged on the parent loan.
  • percentage - This is the percentage of the parent loan transaction that a corresponding transaction on the child loan will be logged for.


How did we do?


Powered by HelpDocs (opens in a new tab)