create a new account
Endpoint:
Method: POST
Type: RAW
URL: localhost:8080/api/v1/create_account
Body:
{
"initialDeposit":800,
"accountName":"Adamu Cheta",
"accountPassword":"test1234"
}
More example Requests/Responses:
Body:
{
"initialDeposit":800,
"accountName":"Adamu Cheta",
"accountPassword":"test1234"
}
{
"responseCode": 200,
"success": true,
"message": "successfully created",
"data": {
"accountNumber": "0150254002"
}
}
Status Code: 200
This route deposits cash
Endpoint:
Method: POST
Type: RAW
URL: localhost:8080/api/v1/deposit
Body:
{
"accountNumber":"6513138112",
"amount":100.00
}
Get a particular account
Endpoint:
Method: GET
Type: RAW
URL: localhost:8080/api/v1/account_info/:accountNumber
URL variables:
Key | Value | Description |
---|---|---|
accountNumber | 28387876445 |
Body:
{}
Get the statement of an account This is the list of all the transactions by the account
Endpoint:
Method: GET
Type: RAW
URL: localhost:8080/api/v1/account_statement/:accountNumber
URL variables:
Key | Value | Description |
---|---|---|
accountNumber | 6513138112 |
Body:
{}
More example Requests/Responses:
Query:
Key | Value | Description |
---|---|---|
accountNumber | 6513138112 |
Body:
{}
{
"responseCode": 401,
"success": false,
"message": "401 UNAUTHORIZED \"JWT strings must contain exactly 2 period characters. Found: 0 Invalid JWT token, try logging in\""
}
Status Code: 401
Login in to access protected routes
Endpoint:
Method: POST
Type: RAW
URL: localhost:8080/api/v1/login
Body:
{
"accountNumber":"0150254002",
"accountPassword":"test1234"
}
More example Requests/Responses:
Body:
{
"accountNumber":"0150254002",
"accountPassword":"test1234"
}
{
"success": true,
"token": "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIwMTUwMjU0MDAyIiwiYXV0aCI6eyJhY2NvdW50TmFtZSI6IkFkYW11IENoZXRhIiwiZW5hYmxlZCI6InRydWUifSwiZXhwIjoxNjQ2MTIyMjI3fQ.neYY2tKyYtFWnU-kd1qZoaTKk8gStF2fKIOmbb0POFM"
}
Status Code: 200
This route Withdraws cash
Endpoint:
Method: POST
Type: RAW
URL: localhost:8080/api/v1/withdrawal
Body:
{
"accountNumber":"6513138112",
"amount":100.00,
"accountPassword":"test1234"
}