fineract API Post recurringdepositaccount not working and It is not also covered in the fineract documentation

249 Views Asked by At

fineract Post recurringdepositaccount api in postman responds with the error message:

{
    "timestamp": 1568640270686,
    "status": 500,
    "error": "Internal Server Error",
    "exception": "java.lang.NullPointerException",
    "message": null,
    "path": "/fineract-provider/api/v1/recurringdepositaccounts"
}

Here is my request body:

{
  "clientId": 67,
  "productId": 6,
  "locale": "en",
  "dateFormat": "dd MMMM yyyy",
  "submittedOnDate": "13 September 2019",
  "depositPeriodFrequencyId":1,
  "depositPeriod":1,
  "recurringFrequencyType":1,
  "recurringFrequency":1,
  "mandatoryRecommendedDepositAmount":1000,
  "isCalendarInherited":false,
  "preClosurePenalApplicable":false,
  "isMandatoryDeposit":true,
   "allowWithdrawal": false,
   "adjustAdvanceTowardsFuturePayments":false
}
1

There are 1 best solutions below

2
Thomas Timbul On

The documentation I could find at https://demo.openmf.org/api-docs/apiLive.htm#rdaccounts (scroll down beyond all the GET examples to get to the POST part) states the following mandatory fields:

clientId or groupId,
productId,
submittedOnDate,
depositPeriod,
depositPeriodFrequencyId,
recurringFrequency,
recurringFrequencyType,
depositAmount,
isCalendarInherited,
mandatoryRecommendedDepositAmount

Of these you appear to be missing depositAmount.