Base URL: /api/v1
All responses follow the format:
{
"success": true,
"data": { ... }
}Error responses:
{
"success": false,
"error": {
"code": "ERROR_CODE",
"message": "Human-readable message",
"details": { "field": ["error"] }
}
}All endpoints except auth require Authorization: Bearer <token> header.
Create a new account.
{
"email": "user@example.com",
"password": "min8chars",
"firstName": "Mario",
"lastName": "Rossi",
"locale": "it"
}{ "email": "user@example.com", "password": "min8chars" }Returns: { user, tokens: { accessToken, refreshToken } }
{ "refreshToken": "..." }Revokes all refresh tokens for the user.
Returns current user profile.
Query params: page, limit, search, type, sortBy, sortOrder
Returns CSV file with all clients. Response: text/csv.
Soft delete.
Query params: page, limit, status, clientId, search, fromDate, toDate, sortBy, sortOrder
Only DRAFT invoices can be edited.
Only DRAFT invoices can be deleted.
{ "status": "SENT" }Valid transitions: DRAFT->SENT/CANCELLED, SENT->PAID/OVERDUE/CANCELLED, OVERDUE->PAID/CANCELLED, CANCELLED->DRAFT
Creates a new DRAFT invoice as a copy.
Returns CSV file with all invoices. Response: text/csv.
Returns PDF binary.
Returns the next available invoice number.
Note: SENT invoices past their due date are automatically marked as OVERDUE. This check runs every hour and also on every invoice list request.
Upload company logo. multipart/form-data with field logo. Max 2MB, accepted formats: PNG, JPG, JPEG, SVG, WebP.
Remove company logo.