---
# System prepended metadata

title: 'API Documentation: CS203'

---

# API Documentation: CS203

---
## 13.212.86.115 Authentication Server
---
### POST /api/customers/signup
#### Request
```
{
    username: manager_1
    password: 01_manager_01
    fullName: Jonathan Chow
    nric: S9704803G
    phone: 93857577
    address: Jalan Tenaga Blk 635
    authorities: ROLE_MANAGER
    active: true
}
```
#### Response 200 OK / 400 Bad Request
```
{
    string: "Bearer <token>"
}
```
---
### POST /api/customers/login
#### Request
```
{
    username: "example@gmail.com",
    password: "examplePassword"
}
```
#### Response 200 OK / 401 Unauthorized
```
{
    string: "Bearer <token>"
}
```
---
### GET /api/customers/verification
#### Header | Authorization | "Bearer <token>"
#### Response 200 OK / 401 Unauthorized
```
{
  "sub": 0,
  "address": "Jalan Tenaga Blk 635",
  "phone": 93857577,
  "iss": "auth0",
  "fullName": "Jonathan Chow",
  "active": true,
  "exp": 1600733289,
  "iat": 1600646889,
  "nric": "S9704803G",
  "authorities": "ROLE_MANAGER",
  "username": "manager_1"
}
```
---
## PORT:8001 Bank Account Server
---
### GET /api/accounts/info?aid=1234
#### Header | Authorization | "Bearer <token>"
#### Response 200 ok / 401 Unauthorized
```
{
    aid: 1234($int)
    email: example@gmail.com
    balance: 123($int)
}
```
---
### PUT /api/accounts/add
#### Header | Authorization | "Bearer <token>"
#### Request
```
{
    amount: 10
}
```
#### Response 200 OK / 400 Bad Request
```
{
    aid: 1234($int)
    email: example@gmail.com
    balance: 123($int)
}
```
---
### PUT /api/accounts/deduct
#### Header | Authorization | "Bearer <token>"
#### Request
```
{
    amount: 10
}
```
#### Response 200 OK / 400 Bad Request
```
{
    aid: 1234($int)
    email: example@gmail.com
    balance: 123($int)
}
```
---

