Base URL: http://localhost:5000/api
All endpoints accept and return JSON unless otherwise noted.
Returns all clients.
Response: 200 OK
[
{ "id": 1, "name": "John Doe", "email": "john@example.com", "company": "Acme Ltd", "created_at": "..." }
]Create a new client.
Body:
| Field | Type | Required |
|---|---|---|
name |
string | Yes |
email |
string | No |
company |
string | No |
Response: 200 OK — Returns the created client with id.
Returns all projects with joined clientName.
Create a new project.
Body:
| Field | Type | Required |
|---|---|---|
clientId |
integer | Yes |
name |
string | Yes |
description |
string | No |
status |
string | No |
Status values: active (default), completed, on-hold
Update an existing project. Same body as POST.
Returns all invoices with projectName, clientName, clientEmail, and nested items array.
Create a new invoice with line items.
Body:
| Field | Type | Required |
|---|---|---|
projectId |
integer | Yes |
amount |
number | Yes |
status |
string | No |
dueDate |
string | No |
notes |
string | No |
items |
array | No |
Item object:
| Field | Type | Required |
|---|---|---|
description |
string | Yes |
quantity |
number | Yes |
unitPrice |
number | Yes |
total |
number | Yes |
Status values: draft (default), sent, paid, cancelled
Update an existing invoice. If items array is provided, existing items are replaced.
Additional fields for status tracking:
| Field | Type | Description |
|---|---|---|
sentAt |
string | Date invoice was sent |
paidAt |
string | Date invoice was paid |
Download the invoice as a PDF file.
Response: application/pdf — Branded Astrium invoice document.
Returns all tasks with projectName, ordered by creation date (newest first).
Create a new task.
Body:
| Field | Type | Required |
|---|---|---|
projectId |
integer | No |
task |
string | Yes |
description |
string | No |
startDate |
string | No |
endDate |
string | No |
Toggle task status.
Body:
| Field | Type | Required |
|---|---|---|
status |
string | Yes |
Status values: pending, completed
Returns all meetings with projectName, ordered by date (newest first).
Create a new meeting record.
Body:
| Field | Type | Required |
|---|---|---|
projectId |
integer | No |
title |
string | Yes |
date |
string | Yes |
duration |
string | No |
participants |
string | No |
notes |
string | No |
Notes support Markdown formatting.
Returns the current inbox content.
Response:
{ "content": "# My Notes\n..." }Update inbox content (overwrites the single document).
Body:
| Field | Type | Required |
|---|---|---|
content |
string | Yes |
Content supports Markdown formatting.