Invoice API
POST /api/invoices accepts an invoice as JSON and returns a link to a PDF. It does not read the browser, and it does not send mail. The link works for 24 hours.
Request
Send Content-Type: application/json. No key is required. Each address can render 30 invoices per UTC day. The count resets at midnight UTC.
Response
- 200 application/json
- { "filename", "url", "expiresAt" }. GET the url, with no key, to download the PDF under that filename.
- 400
- The body is not valid. The JSON is { "error": "..." } and names the field.
- 429
- { "error": "Daily limit reached" }
- 404
- The file link is unknown or older than 24 hours.
- 500
- The server could not check the limit, store the file, or render the PDF.
The filename is invoice.number plus .pdf. Spaces and characters other than letters, digits, dots, dashes, and underscores become a dash. With no number, the file is invoice.pdf.
Body
The body is grouped by section: company, invoice, billTo, lines, adjustments, paid, bank, preparedBy, payment, and notes. lines is required, one to forty rows. Each line has description, quantity, and rate as text. A numeric amount is accepted and kept as text. Dates are YYYY-MM-DD or empty.
invoice.currency is required. Use MUR, USD, EUR, GBP, or any other three-letter code such as ZAR. Lower case is accepted and stored in upper case. The code labels the amount column. Amounts are not converted.
A missing section is empty. An omitted string is empty. An omitted toggle is off. discount, tax, and shipping modes default to off. tax2 mode defaults to subtotal. company.logo is null, a data:image base64 URL, or an https URL. company.logoZoom is a number from 1 to 3 and crops the logo from the center.
The totals use the same math as the sheet. The PDF contains those fields and totals. It is not a photograph of the on-screen editor.
From the editor
Copy API JSON, in the toolbar above the invoice, copies the whole body in this format, including the currency you picked. The Copy buttons beside the invoice copy one section at a time.
n8n
First HTTP Request: POST this URL, authentication None, JSON body as in the example.
Second HTTP Request: GET the url from the first response, and set the response format to File.
Example request
{
"company": {
"name": "Example Studio Ltd",
"logo": null,
"logoZoom": 1,
"address": "12 Sample Street\nPort Louis\nMauritius",
"registration": "C00000000"
},
"invoice": {
"number": "INV-2026-0042",
"date": "2026-08-27",
"currency": "MUR"
},
"billTo": {
"name": "Acme Trading Ltd",
"address": "4 Demo Avenue\nEbene\nMauritius",
"registration": "C11111111"
},
"lines": [
{
"description": "Website update - mobile number login",
"quantity": "1",
"rate": "18000"
},
{
"description": "Hosting, September",
"quantity": "1",
"rate": "2500"
}
],
"adjustments": {
"discount": {
"mode": "percent",
"value": "10"
},
"tax": {
"mode": "percent",
"value": "15"
},
"tax2": {
"mode": "after-tax",
"value": "2",
"show": true
},
"shipping": {
"mode": "flat",
"value": "500"
}
},
"paid": {
"value": "5000",
"show": true
},
"bank": {
"name": "Example Bank",
"accountName": "Example Studio Ltd",
"accountNumber": "000123456789",
"swift": "EXMPMUMU",
"showSwift": true
},
"preparedBy": {
"name": "Alex Example",
"title": "Director, Example Studio Ltd",
"date": "2026-08-27",
"show": true
},
"payment": {
"terms": "Net 30 days",
"methods": "Bank transfer, Juice",
"link": "https://pay.example.com/INV-2026-0042",
"showLink": true
},
"notes": {
"text": "Thank you for your business",
"show": true
}
}Example response
{
"filename": "INV-2026-0042.pdf",
"url": "https://invoicenxt.example/api/invoices/files/…",
"expiresAt": "2026-08-28T09:00:00.000Z"
}