What this does
The Invoices API lets you manage the full invoice lifecycle programmatically: create invoices, retrieve them individually or as a list, update line items, send by email, and record payments.
When to use it
Use this endpoint when you need to generate invoices from an external system, sync invoice data with your CRM, or automate payment recording.
Endpoints
List invoices
GET /api/v1/invoices
Returns a paginated list of invoices. Supports ?status=draft|sent|paid|void and ?page=1&limit=50 query parameters.
Create an invoice
POST /api/v1/invoices
{
"customerId": "cust_abc123",
"dueDate": "2026-04-30",
"lineItems": [
{
"description": "Web design services",
"quantity": 1,
"unitPrice": 1500.00,
"taxRate": 20
}
]
}
Response (201 Created):
{
"id": "inv_xyz789",
"number": "INV-0042",
"status": "draft",
"total": 1800.00,
"createdAt": "2026-03-31T10:00:00Z"
}
Get a single invoice
GET /api/v1/invoices/:id
Update an invoice
PATCH /api/v1/invoices/:id
Only draft invoices can be updated. Pass the fields you want to change.
Send an invoice
POST /api/v1/invoices/:id/send
Sends the invoice by email to the customer's registered email address. Changes status to sent.
Record a payment
POST /api/v1/invoices/:id/pay
{
"amount": 1800.00,
"paymentDate": "2026-04-15",
"bankAccountId": "acc_123",
"reference": "Bank transfer"
}
All fields are optional. amount, if given, must be the invoice total including VAT, to the penny (omit it to use the total): part payments are not supported yet, and any other amount returns 400 validation_error. Records a payment against the invoice and returns the updated invoice. Returns 403 period_locked if the payment date falls in a locked accounting period.