💶 Invoices API

Create and manage invoices for your clients. Supports Belgian VAT compliance and automatic invoice numbering.

Invoice Object

{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "invoiceNumber": "INV-2026-0001",
  "invoiceDate": "2026-01-15",
  "dueDate": "2026-02-15",
  "caseId": "case-uuid-here",
  "contactId": "contact-uuid-here",
  "subtotal": 1500.00,
  "vatAmount": 315.00,
  "total": 1815.00,
  "status": "sent",
  "firmId": "firm-uuid-here",
  "createdAt": "2026-01-15T10:00:00Z"
}

Fields

FieldTypeDescription
idstringUnique identifier (UUID)
invoiceNumberstringAuto-generated invoice number
invoiceDatedateInvoice issue date
dueDatedatePayment due date
caseIdstringAssociated case (optional)
contactIdstringClient to invoice
subtotaldecimalAmount before VAT
vatAmountdecimalVAT amount
totaldecimalTotal including VAT
statusstringdraft, sent, paid, overdue, void

List Invoices

GET /api/invoices

Query Parameters

ParameterTypeDescription
statusstringFilter by status (draft, sent, paid)

Example

GET /api/invoices?status=sent

Response:
{
  "success": true,
  "data": [
    {
      "id": "...",
      "invoiceNumber": "INV-2026-0001",
      "total": 1815.00,
      "status": "sent",
      ...
    }
  ]
}

Get Invoice

GET /api/invoices/{id}

Create Invoice

POST /api/invoices

Invoice number is auto-generated.

Request Body

{
  "invoiceDate": "2026-01-15",
  "dueDate": "2026-02-15",
  "caseId": "case-uuid-here",
  "contactId": "contact-uuid-here",
  "subtotal": 1500.00,
  "vatAmount": 315.00,
  "total": 1815.00,
  "status": "draft"
}

Response

{
  "success": true,
  "data": {
    "id": "newly-generated-uuid",
    "invoiceNumber": "INV-2026-0002",
    ...
  }
}

Update Invoice

PUT /api/invoices/{id}

Request Body

{
  "invoiceDate": "2026-01-15",
  "dueDate": "2026-02-28",
  "subtotal": 1600.00,
  "vatAmount": 336.00,
  "total": 1936.00,
  "status": "draft",
  "caseId": "case-uuid-here",
  "contactId": "contact-uuid-here"
}

Mark as Sent

POST /api/invoices/{id}/send

Updates the invoice status to "sent".

Response

{
  "success": true,
  "data": {
    "id": "...",
    "status": "sent",
    ...
  }
}

Mark as Paid

POST /api/invoices/{id}/pay

Updates the invoice status to "paid".

Response

{
  "success": true,
  "data": {
    "id": "...",
    "status": "paid",
    ...
  }
}

Delete Invoice

DELETE /api/invoices/{id}

Only draft invoices can be deleted. Sent invoices must be voided instead.

← Back to API Overview