Welcome to Go Bank Transfer 🏦
Go Bank Transfer is a simple API for some banking routines, such as creating accounts, listing accounts, listing balance for a specific account, transfers between accounts and listing transfers.
Requirements/dependencies
Golang (not obligatory)
Docker
Docker-compose
Run tests in container (it is necessary to have the application started)
Run tests local (it is necessary to have golang installed)
Endpoint
HTTP Method
Description
/api/accounts
POST
Create accounts
/api/accounts
GET
List accounts
/api/accounts/{{account_id}}/balance
GET
Find balance account
/api/transfers
POST
Create transfer
/api/transfers
GET
List transfers
Test endpoints API using Postman
Test endpoints API using curl
curl -i --request POST ' http://localhost:3001/api/accounts' \
--header ' Content-Type: application/json' \
--data-raw ' {
"name": "Test",
"cpf": "070.910.584-24",
"balance": 1.00
}'
curl -i --request GET ' http://localhost:3001/api/accounts'
curl -i --request GET ' http://localhost:3001/api/accounts/{{account_id}}/balance'
curl -i --request POST ' http://localhost:3001/api/transfers' \
--header ' Content-Type: application/json' \
--data-raw ' {
"account_destination_id": "{{account_id}}",
"account_origin_id": "{{account_id}}",
"amount": 1.00
}'
curl -i --request GET ' http://localhost:3001/api/transfers'
Copyright © 2020 GSabadini .
This project is MIT licensed.