FSG Planner APP API v0.1

Host API: https://api.fsgplanner.ca

Debt
Get all debts forAuth0 ID
GET/api/debt/{auth0Id}
Get specific debt by debtId
GET/api/debt/{auth0Id}/{debtId}
Delete specific debt by debtId
DELETE/api/debt/{auth0Id}/{debtId}
Update specific debt by debtId
PATCH/api/debt/{auth0Id}/{debtId}

{
  "debt_id": "example-id",
  "name": "Sample Debt",
  "description": "Example description",
  "images": [],
  "interestRate": 5.5,
  "amount": 1000,
  "duration": {
    "goalStartDate": "2025-01-01T00:00:00.000Z",
    "goalEndDate": "2025-12-31T00:00:00.000Z"
  },
  "paymentPlan": [
    {
      "amount": 100,
      "principal": 90,
      "interest": 10,
      "date": "2025-02-01T00:00:00.000Z",
      "isPaid": false
    }
  ],
  "percentPaidOff": 0
}
Create new debt
POST/api/debt/{auth0Id}

{
  "debt_id": "example-id",
  "name": "Sample Debt",
  "description": "Example description",
  "images": [],
  "interestRate": 5.5,
  "amount": 1000,
  "duration": {
    "goalStartDate": "2025-01-01T00:00:00.000Z",
    "goalEndDate": "2025-12-31T00:00:00.000Z"
  },
  "paymentPlan": [
    {
      "amount": 100,
      "principal": 90,
      "interest": 10,
      "date": "2025-02-01T00:00:00.000Z",
      "isPaid": false
    }
  ],
  "percentPaidOff": 0
}
Initiate User Database
Initiate user database with empty overview and no budgets
POST/api/initiate/{userId}
Overview
Get overview data by Auth0 ID
GET/api/overview/{auth0Id}
Update overview data by Auth0 ID
PATCH/api/overview/{auth0Id}

{
  "income": 5000,
  "expenses": 3000,
  "savings": 2000,
  "debt": 10000,
  "investments": 15000
}
Overview Category Budget
Update category budgets for Auth0 ID
PATCH/api/overview/category-budget/{auth0Id}

{
  "Food": 200,
  "Transport": 100
}
Get specific category budget by Auth0 ID and category
GET/api/overview/category-budget/{auth0Id}/{category}
Overview Total Expense
Update total expenses for Auth0 ID
PATCH/api/overview/total-expense/{auth0Id}

{
  "amount": 500
}
Transaction
Get all transactions for Auth0 ID
GET/api/transaction/{auth0Id}
Create or update a transaction
POST/api/transaction/{auth0Id}

{
  "date": "2025-10-05",
  "category": "Food",
  "amount": 100,
  "note": "Lunch"
}
Get specific transaction by transactionId
GET/api/transaction/{auth0Id}/{transactionId}
Update specific transaction by transactionId
PATCH/api/transaction/{auth0Id}/{transactionId}

{
  "amount": 120,
  "note": "Updated lunch"
}
Delete specific transaction by transactionId
DELETE/api/transaction/{auth0Id}/{transactionId}
User
Get user by Auth0 ID
GET/api/user/{auth0Id}
Create or update user by Auth0 ID
POST/api/user/{auth0Id}

{
  "name": "John Doe",
  "email": "john@example.com",
  "phone": "+1234567890",
  "country": "US",
  "picture": "https://example.com/pic.jpg",
  "created_at": "2025-10-05T12:00:00Z"
}