A banking software implementing REST api.
- Java 11
- Spring Boot
- Gradle
- Postgres
https://documenter.getpostman.com/view/14063258/TzCP8Tgb
Get request to /health
You will receive OK if server is alive
Creates a bank account for the customer and returns an object together with balance object.
Post request to /accounts with a json file contraining following fields
{
"customerId": 1,
"firstname": "Shahriar",
"lastname": "Tanvir",
"country": "Bangladesh",
"currencies": ["BDT", "USD"]
}
{
"accountId": 5,
"customerId": 1,
"balances": [
{
"balance": 0,
"currency": "BDT"
},
{
"balance": 0,
"currency": "USD"
}
]
}
Return the account object.
Get request to /accounts/{account_id} with account id as path variable
{
"accountId": 2,
"customerId": 1,
"balances": [
{
"balance": 400.00,
"currency": "BDT"
},
{
"balance": 100.00,
"currency": "USD"
}
]
}
Create a transaction on the account and return the transaction object.
Post a json object to /transactions with following fields
*Remember direction is of 2 types: IN and OUT
{
"accountId" :2,
"amount" : 100,
"currency": "BDT",
"direction": "OUT"
}
{
"transactionId": 12,
"accountId": 2,
"amount": 100,
"currency": "BDT",
"direction": "OUT",
"balance": 300.00
}
Returns a list of all transactions of an account.
Get request to /transaction/{account_id} with account id as path variable
[
{
"transactionId": 8,
"accountId": 2,
"amount": 500.00,
"currency": "BDT",
"direction": "IN",
"balance": null
},
{
"transactionId": 9,
"accountId": 2,
"amount": 100.00,
"currency": "USD",
"direction": "IN",
"balance": null
}
]