edscaylart / bytebank-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bytebank API

Rest API made with AdonisJS to speed up things. This is a simple project to assist the Bytebank Flutter App.

Install

$ yarn
$ docker-compose up
$ node ace serve

End-points

  • GET: /transactions
    • return all the transactions made for your contact
// response body
[
  {
    "id": 1,
    "contact_id": 1,
    "value": 250,
    "created_at": "2021-03-26T17:47:09.553-04:00",
    "contact": {
      "id": 1,
      "name": "John doe",
      "document": "04859856555",
      "agency": 2565,
      "account_number": 152365,
      "created_at": "2021-03-26T17:47:09.460-04:00",
      "updated_at": "2021-03-26T17:47:09.478-04:00",
      "nameInitials": "IF"
    }
  }
]
  • POST: /transactions
    • return create a new transaction with the contact
// request body
{
  "value": 100,
  "contact": {
    "name": "John doe",
    "document": "04859856555",
    "agency": 2565,
    "account_number": 152365
  }
}
// response body
{
  "id": 1,
  "contact_id": 1,
  "value": 250,
  "created_at": "2021-03-26T17:47:09.553-04:00",
  "contact": {
    "id": 1,
    "name": "John doe",
    "document": "04859856555",
    "agency": 2565,
    "account_number": 152365,
    "created_at": "2021-03-26T17:47:09.460-04:00",
    "updated_at": "2021-03-26T17:47:09.478-04:00",
    "nameInitials": "IF"
  }
}

About


Languages

Language:TypeScript 99.7%Language:Shell 0.3%