Ideas for the Mambu Banking Engine

As a developer I want to get client investments per saving account and per client

Why: In order to get the info about the investments of a client there have to be performed multiple API calls.

  • Get saving(funding source) accounts for P2P
  • Get funded loans for each funding source
  • Loop over funds to pin point the investment based on savingsAccountKey(this is not an API call)

Even though the above way works, P2P investors usually fund lots of loans which means that in a case that a customer has funded 50 loans from a single source, 51 API calls are needed each one performing joins in the DB.

What: The idea is to have one endpoint to:

  • get all client investments 

GET: ~api/clients/{CLIENT_ID}/investments (same for groups)

Response:

{

{
"encodedKey": "ANOTHER_ENCODED_KEY1",
"savingsAccountKey": "SAVINGS_ENCODED_KEY1",
"amount": "90"
}

{
"encodedKey": "ANOTHER_ENCODED_KEY2",
"savingsAccountKey": "SAVINGS_ENCODED_KEY2",
"amount": "522"
}

}

  • get client investments per founding source/saving account (same for groups)

GET: ~api/clients/{CLIENT_ID}/investments/{SAVINGS_ACCOUNT_ID}

Response:

{

{
"encodedKey": "ANOTHER_ENCODED_KEY3",
"amount": "90"
}

{
"encodedKey": "ANOTHER_ENCODED_KEY4",
"amount": "522"
}

}

 

Impact: Less traffic, less stress on API endpoints, less (DB and HTTPs)connections used to fulfill 1 goal

  • Alin Burlacu
  • Jul 18 2016
  • Attach files