osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Questions regarding Swagger APIs for GSOC


Dear Ed, ALeks & Sanyam, 

Dear Ed, thanks for your help on facilitating our communication. Actually I found out some of the usage of APIs based on the requirements, could you all take a look and tell me if there is any inappropriate usage about the API?

The reference of APIs: https://demo.openmf.org/api-docs/apiLive.htm#loans_list <https://demo.openmf.org/api-docs/apiLive.htm#loans_list>
Outstanding principal and interest
GET https://DomainName/fineract-provider/api/v1/loans <https://domainname/fineract-provider/api/v1/loans>
There are two fields in the response of this request principalOutstanding & interestOutstanding
Next due date, due principal and interest
For due principal, GET https://DomainName/api/v1/loans/{loanId} <https://domainname/api/v1/loans/%7BloanId%7D> There is a field called “principalOverdue”
I have a question about the difference between overdue and due 
For due date, “overdueSinceDate” + “repaymentEvery” (one time period of repayment)
For due interest, “interestOverdue”
Previous payment date, principal and interest (the last transaction of loan)
For previous due date, GET https://DomainName/api/v1/loans/{loanId} <https://domainname/api/v1/loans/%7BloanId%7D> inside there is a field called “overdueSinceDate”
Loan maturity date
GET https://DomainName/api/v1/loans/{loanId} <https://domainname/api/v1/loans/%7BloanId%7D> “expectedMaturityDate”
Overdue loan principal and interest (if have)
GET https://DomainName/api/v1/loans/{loanId} <https://domainname/api/v1/loans/%7BloanId%7D> “principalOverdue”, “interestOverdue”
Number of days in arrears for loan
Current date - “overdueSinceDate”
Penalty fees/charges
GET https://DomainName/api/v1/loans/{loanId} <https://domainname/api/v1/loans/%7BloanId%7D> “penaltyChargesCharged”
Client activation date
GET https://DomainName/api/v1/clients/template <https://domainname/api/v1/clients/template> “activationDate”
Loan disbursed date/amount/interest
GET https://DomainName/api/v1/loans/{loanId} <https://domainname/api/v1/loans/%7BloanId%7D> fields about disbursement
First repayment date
POST https://DomainName/api/v1/loans?command=calculateLoanSchedule <https://domainname/api/v1/loans?command=calculateLoanSchedule> “period” —> “dueDate”
Regards,
Dingfan

> On 6 Jul 2018, at 10:28 PM, Ed Cable <edcable@xxxxxxxxx> wrote:
> 
> Dingfan,
> 
> I'll let you connect with Sanyam on list about your Swagger connections for your GCI Swagger API pull request: Swagger API work: https://github.com/apache/fineract/pull/409 <https://github.com/apache/fineract/pull/409>
> 
> Ed
>