Track billable and non-billable time for cases. Time entries can be linked to cases and later included in invoices.
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"description": "Research on case precedents",
"date": "2026-01-15",
"hours": 2.5,
"hourlyRate": 150.00,
"billable": true,
"billed": false,
"caseId": "case-uuid-here",
"userId": "user-uuid-here",
"firmId": "firm-uuid-here",
"createdAt": "2026-01-15T14:30:00Z"
}
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier (UUID) |
| description | string | Description of work performed |
| date | date | Date work was performed (YYYY-MM-DD) |
| hours | decimal | Duration in hours (e.g., 1.5 = 1h30m) |
| hourlyRate | decimal | Rate per hour in EUR |
| billable | boolean | Whether time can be billed |
| billed | boolean | Whether time has been invoiced |
| caseId | string | Associated case ID |
| userId | string | User who logged the time |
GET /api/time
| Parameter | Type | Description |
|---|---|---|
| caseId | string | Filter by case ID |
| billed | boolean | Filter by billed status |
GET /api/time?caseId=abc123&billed=false
Response:
{
"success": true,
"data": [
{
"id": "...",
"description": "Client meeting",
"hours": 1.5,
...
}
]
}
GET /api/time/{id}
POST /api/time
{
"description": "Drafting contract",
"date": "2026-01-15",
"hours": 3.0,
"hourlyRate": 150.00,
"billable": true,
"caseId": "case-uuid-here"
}
{
"success": true,
"data": {
"id": "newly-generated-uuid",
"description": "Drafting contract",
"hours": 3.0,
"userId": "your-user-id",
"createdAt": "2026-01-15T10:30:00Z",
...
}
}
PUT /api/time/{id}
{
"description": "Drafting and reviewing contract",
"date": "2026-01-15",
"hours": 3.5,
"hourlyRate": 150.00,
"billable": true,
"caseId": "case-uuid-here"
}
POST /api/time/{id}/bill
Marks a time entry as billed. Typically called automatically when creating an invoice.
{
"success": true,
"data": {
"id": "...",
"billed": true,
...
}
}
DELETE /api/time/{id}
GET /api/time/stats
Returns aggregate time statistics for your firm.
{
"totalHours": 245.5,
"totalAmount": 36825.00,
"unbilledHours": 42.0,
"unbilledAmount": 6300.00
}