Runs in http://localhost:3001/
check also here for details: https://documenter.getpostman.com/view/445508/bankapidemo/RVnVELGw
Installation
npm install
npm run start
mongod
in seperate terminal
http://localhost:3001/api/transactions
curl --request GET \ --url http://localhost:3001/api/transactions
http://localhost:3001/api/transactions
Content-Type: application/json
{ "Id": Number, "Amount": Number, "Type": Number, "AccountCodeFrom": String, "AccountCodeTo": String, "Comment": String }
curl --request POST \ --url http://localhost:3001/api/transactions \ --header 'Content-Type: application/json' \ --data '{ "Id": 1003, "Amount": 1.45, "Type": 2, "AccountCodeFrom": "nmpegetis", "AccountCodeTo": "habibi", "Comment": "third comment" }'
http://localhost:3001/api/transactions/:id
curl --request GET \ --url http://localhost:3001/api/transactions/1003
http://localhost:3001/api/transactions/:id
Content-Type: application/json
{ "Amount": Number, "Type": Number, "AccountCodeFrom": String, "AccountCodeTo": String, "Comment": String }
curl --request PUT \ --url http://localhost:3001/api/transactions/1003 \ --header 'Content-Type: application/json' \ --data '{ "Amount": 0.8, "Type": 2, "AccountCodeFrom": "habibi", "AccountCodeTo": "habibi", "Comment": "third comment --edited" }'
http://localhost:3001/api/transactions/:id
curl --request DELETE \ --url http://localhost:3001/api/transactions/1002
http://localhost:3001/api/accounts
curl --request GET \ --url http://localhost:3001/api/accounts
http://localhost:3001/api/accounts
Content-Type: application/json
{ "Id": Number, "Code": String, "Name": String }
curl --request POST \ --url http://localhost:3001/api/accounts \ --header 'Content-Type: application/json' \ --data '{ "Id": 2, "Code": "rita", "Name": "Rita Bous" }'
http://localhost:3001/api/accounts/:id
curl --request GET \ --url http://localhost:3001/api/accounts/2
http://localhost:3001/api/accounts/:id
Content-Type: application/json
{"Code":String,"Name":String}
curl --request PUT \ --url http://localhost:3001/api/accounts/2 \ --header 'Content-Type: application/json' \ --data '{"Code":"habibi","Name":"Rita Bous"}'
http://localhost:3001/api/accounts/:id
curl --request DELETE \ --url http://localhost:3001/api/accounts/2
http://localhost:3001/api/branches
curl --request GET \ --url http://localhost:3001/api/branches
http://localhost:3001/api/branches
Content-Type: application/json
{ "Id": Number, "Code": Number, "Description": String }
curl --request POST \ --url http://localhost:3001/api/branches \ --header 'Content-Type: application/json' \ --data '{ "Id": "1001", "Code": "0073", "Description": "N. Ionia Station" }'
http://localhost:3001/api/branches/:id
curl --request GET \ --url http://localhost:3001/api/branches/1002
http://localhost:3001/api/branches/:id
Content-Type: application/json
{"Code":String,"Description":String}
curl --request PUT \ --url http://localhost:3001/api/branches/1002 \ --header 'Content-Type: application/json' \ --data '{"Code":"0073","Description":"Peukakia Station"}'
http://localhost:3001/api/branches/:id
curl --request DELETE \ --url http://localhost:3001/api/branches/1002