mirror of
https://github.com/acedanger/finance.git
synced 2025-12-05 22:50:12 -08:00
58 lines
1.1 KiB
HTTP
58 lines
1.1 KiB
HTTP
@baseUrl = {{baseUrl}}
|
|
@host = {{host}}
|
|
@port = {{port}}
|
|
|
|
# Bank Account API Testing
|
|
|
|
### Get all accounts
|
|
GET {{baseUrl}}/accounts
|
|
Accept: application/json
|
|
|
|
### Get a specific account
|
|
GET {{baseUrl}}/accounts/1
|
|
Accept: application/json
|
|
|
|
### Get transactions for an account
|
|
GET {{baseUrl}}/accounts/1/transactions
|
|
Accept: application/json
|
|
|
|
### Create a new account
|
|
POST {{baseUrl}}/accounts
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"name": "BofA Joint Checking",
|
|
"bankName": "Bank of America",
|
|
"accountNumber": "4581",
|
|
"balance": 1500,
|
|
"type": "CHECKING",
|
|
"status": "ACTIVE"
|
|
}
|
|
|
|
### Create a new transaction
|
|
POST {{baseUrl}}/transactions
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"accountId": "1",
|
|
"date": "2025-05-06",
|
|
"description": "Coffee Shop",
|
|
"amount": -12.50,
|
|
"category": "Food & Dining",
|
|
"type": "WITHDRAWAL"
|
|
}
|
|
|
|
### Update a transaction
|
|
PUT {{baseUrl}}/transactions/1
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"description": "Updated Coffee Purchase",
|
|
"amount": -15.75,
|
|
"category": "Food & Dining"
|
|
}
|
|
|
|
### Delete a transaction
|
|
DELETE {{baseUrl}}/transactions/1
|
|
|