Invio REST API

Category Developers Plans Paid plans By Invio

An API token lets your own scripts, a CI job or an automation tool do what you do in Invio: draft invoices, add clients, record expenses and read what you are owed. It runs on the same engine as the Invio AI connector, so the same safety rules apply.

Download for AI assistants

Building with an AI assistant? Give it this file in Claude, ChatGPT or Cursor and it can write correct code against the API.

One Markdown file with the base URL, authentication, limits, errors and every endpoint with its parameters and examples, including the rule that sending an invoice, changing money records, deleting drafts, and changing quote status need {"confirm": true} (or ?confirm=true on DELETE endpoints). It is generated from the same definitions as this page and the OpenAPI document, so it never disagrees with them.

What it is

Plain JSON over HTTPS. One token belongs to one business.

Drafts, not surprises
Creating an invoice or quote makes a draft. Nothing reaches a client until you call the send endpoint on purpose.
Invio does the maths
You send line items. Totals, GST, numbering and currency come from your business settings, the same as in the app. You never send an amount of tax. Give a line the itemId of a saved item (GET /items) and Invio prices it from your Item Library; a rate you send yourself is marked on the draft for a person to check.
The same rules as the app
A request Invio would refuse in the app is refused here: missing bank details, an unverified email address, the free invoice limit, a voided invoice.
Your business only
A token can only see and change the business it was created for. There is no field that lets a request reach another business.

Get a token

Tokens are for paid plans. Free accounts can see the card but not create one.

1

Open Settings

Go to Settings, then AI connections, and stay on the Invio tab.

2

Create a token

Under API tokens choose Create token and give it a name that says what will use it, such as "Nightly export". The name is how you tell your tokens apart later.

3

Copy it now

The token is shown once. Invio keeps only a fingerprint of it, so it cannot be shown again. Store it where you keep passwords or CI secrets.

4

Revoke it when you are done

Revoke it from the same card. Anything using it stops working straight away. If a token leaks, revoke it and create a new one.

Send the token as Authorization: Bearer <token>. Never put it in a web address. A business can hold up to 10 live tokens.

Your first request

List the five most recent unpaid invoices.

Request
curl "https://www.invio.co.nz/api/v1/invoices?status=unpaid&limit=5" \
  -H "Authorization: Bearer <your-api-token>"

The answer is a JSON object with the matching invoices in rows, the totals for every match, and the filters Invio actually applied. List endpoints return up to 20 rows a page; see Read a long list for the rest.

Create an invoice

Name the client, list the work. The client is matched by name or created from the email address.

Request
curl -X POST "https://www.invio.co.nz/api/v1/invoices" \
  -H "Authorization: Bearer <your-api-token>" \
  -H "Content-Type: application/json" \
  -d '{"clientName":"Acme Plumbing","clientEmail":"accounts@acme.example","items":[{"description":"Callout and repair","quantity":2,"rate":95}]}'

The response includes the invoice id, its number and the total Invio calculated. If a client with that name already exists, it is used and nothing is duplicated.

Retry safely

A request that timed out may have run. An Idempotency-Key lets you send it again without doing it twice.

Request
curl -X POST "https://www.invio.co.nz/api/v1/invoices" \
  -H "Authorization: Bearer <your-api-token>" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-10482-invoice" \
  -d '{"clientName":"Acme Plumbing","items":[{"description":"Callout and repair","quantity":2,"rate":95}]}'

Add an Idempotency-Key header to any POST, PATCH or DELETE: 8 to 64 letters, digits, _ or -, one new value for each thing you mean to do (a UUID, or your own order number). Send the same request with the same key again and you get the first answer back with the header Idempotent-Replayed: true; nothing runs a second time. A key belongs to that token and that endpoint, and its stored answer is returned for 24 hours; after that the key counts as new. You only get a stored answer while the token could still make the request: if you revoke it, switch off what the request needs, or the plan lapses, you get that refusal instead.

The same key with a different body or record is refused with a 409 (idempotency_key_reused). If the first request is still running you get a 409 (idempotency_request_in_progress): wait and send it again. A request Invio refused can be sent again with the same key once you have fixed the cause. The one exception is a payment reminder that was queued but not confirmed delivered (409 reminder_queued): do not send it again, read the invoice later to see whether it went. The same goes for a reminder the mail server stopped answering on (409 reminder_delivery_unknown): your client may already have it, so Invio does not send it again and does not count it. If the first request failed on our side with a 500, the key answers 409 (idempotency_outcome_unknown): look at the record, then use a new key if the action is still needed. Recording a payment also needs its own requestId in the body; send both.

Read a long list

Lists come a page at a time, up to 20 rows. A cursor takes you to the next page.

Next page
curl "https://www.invio.co.nz/api/v1/invoices?status=unpaid&cursor=<nextCursor>" \
  -H "Authorization: Bearer <your-api-token>"

Every list answer has total (how many records match) and truncated (more follow this page). When more follow it also has nextCursor: send the same request again with cursor set to it, and repeat until there is no nextCursor. Keep the filters and the sort the same on every page; a cursor from one list is refused on another. Pages follow the order of the list, so a record added or removed while you read is never shown twice and never makes you miss one. This works on invoices, quotes, clients, expenses and credit notes. Totals asked for with aggregate are one answer and have no pages.

Send an invoice, quote or reminder

The three calls that email a client, so every one asks you to confirm.

Request
curl -X POST "https://www.invio.co.nz/api/v1/invoices/<invoice-id>/send" \
  -H "Authorization: Bearer <your-api-token>" \
  -H "Content-Type: application/json" \
  -d '{"confirm":true}'

A token can only call POST /invoices/{id}/send, POST /quotes/{id}/send or POST /invoices/{id}/remind if you switched on Can send for it in Settings > AI connections; it is off by default, and an off token gets a 403 sending_off_for_key before body parsing or confirm and nothing is sent. Without {"confirm": true} nothing happens and you get a 400. With it, the same checks as a send from the app apply and cannot be skipped (POST /quotes/{id}/send and POST /invoices/{id}/remind send Invio's standard email only and reject custom messages or subjects). For invoices, if the issue date is in the future the invoice is scheduled instead of sent. Every send is written to your account's audit log with the token that made it.

All endpoints

Base path /api/v1. Every request needs the Authorization header.

GET /invoices
List invoices
POST /invoices
Create a draft invoice
GET /invoices/{id}
Get one invoice
PATCH /invoices/{id}
Update a draft invoice
POST /invoices/{id}/duplicate
Copy an invoice as a new draft
GET /credit-notes
List credit notes
POST /invoices/{id}/send
Send an invoice to the client
POST /invoices/{id}/remind
Send an overdue payment reminder for an invoice
POST /invoices/{id}/payments
Record a payment on an invoice
DELETE /invoices/{id}/payments/{paymentId}
Remove a manual payment from an invoice
POST /invoices/{id}/void
Void a sent, paid or overdue invoice
DELETE /invoices/{id}
Delete a draft invoice
GET /clients
List clients
POST /clients
Create a client
GET /clients/{id}
Get one client
PATCH /clients/{id}
Update a client
GET /quotes
List quotes
POST /quotes
Create a draft quote
GET /quotes/{id}
Get one quote
PATCH /quotes/{id}
Update a quote that has not been accepted
POST /quotes/{id}/convert
Turn a quote into a draft invoice
DELETE /quotes/{id}
Delete a draft quote
POST /quotes/{id}/status
Set a quote status
POST /quotes/{id}/send
Send a quote to the client
GET /items
List saved items (Item Library)
GET /expenses
List expenses
POST /expenses
Record an expense
PATCH /expenses/{id}
Update an expense
GET /reports/revenue
Revenue summary
GET /outstanding
Who owes you
GET /practice/summary
Practice summary (accountants)
GET /team-report
Team report from the roster
GET /business
Business settings

Mileage log

For every business. It needs no Books.

Read the vehicle claim for an income year, the vehicles and the trips. POST /mileage/trips saves a trip that waits for a person: it counts in no kilometres and no claim until they confirm it in Expenses, Mileage. POST /mileage/odometer records an odometer reading the same way: it waits for a person. Vehicles, methods and logbooks are entered in the app.

GET /mileage/claim
Vehicle claim from the mileage log
GET /mileage/vehicles
List the vehicles of the mileage log
GET /mileage/trips
List trips in the mileage log
POST /mileage/odometer
Record an odometer reading for a person to confirm
POST /mileage/trips
Log a trip for a person to confirm

Expense claims

For a business whose team members claim back what they paid.

Read the claims, their status and what is owed to each person. Claimants appear as Team member 1, 2 and so on; names are not given. A submitted or declined claim counts in no total. Approving, declining and paying back are done in the app.

GET /expense-claims
List expense claims

Books

For a business that keeps its books in Invio, on a plan that has Books.

Read the chart of accounts, the general ledger, the trial balance, balance sheet, profit and loss, aged balances, the journal report and your GST return or BAS figures (with TPAR for Australian businesses), what you owe right now, the income tax preparation figures, the depreciation schedule, asset disposals and the asset reconciliation, cash ahead, the Books to-do list and Things to check, and your bills, suppliers, assets, bank lines, bank rules, journal drafts, repeating items and bills sent by email. Create suppliers, draft bills and journal drafts, and submit a bill for approval. With Can record payments switched on for the token and {"confirm": true} in the body, approve, void and pay a bill, post and reverse a manual journal, write, change and delete bank rules, and code a bank line. A bank line above the review limit set for the business (NZ$1,000 or A$1,000 unless the owner set another in Bank, Rules) is never coded by a key: it is refused with 409 over_review_limit and waits for a person to code it in Invio. When the business requires bills to be approved in Invio, approving through the API is refused and the bill waits for a person. A change dated in a locked period is refused with 409 locked_period. The lock date, a GST or BAS confirmation and the Books settings cannot be changed through the API.

GET /ledger/accounts
List the chart of accounts
GET /ledger/transactions
General ledger of one account
GET /reports/trial-balance
Trial balance
GET /reports/balance-sheet
Balance sheet
GET /reports/books-profit-and-loss
Profit and loss from the books
GET /reports/aged
Aged receivables or payables
GET /reports/bas
GST return or BAS figures from the books
GET /reports/close-period
Steps to close a GST return or BAS period
GET /reports/depreciation-schedule
Depreciation schedule
GET /reports/asset-disposals
Assets sold in a year
GET /reports/asset-reconciliation
Asset register against the books
GET /reports/tpar
Taxable payments annual report (Australia)
GET /reports/cash-projection
Cash ahead (cash projection)
GET /books/tasks
What needs doing in the books today
GET /reports/what-i-owe
What the business owes in tax right now
GET /reports/checks
Things to check in the books
GET /reports/journal
Journal report
GET /reports/income-tax-prep
Income tax preparation (NZ IR3B / IR10, AU P8)
GET /inbound-bills
List bills that arrived by email
GET /suppliers
List suppliers
GET /bills
List bills
GET /bills/{id}
Get one bill
GET /assets
List assets
GET /ledger/journals
List manual journals
GET /ledger/journal-drafts
List journal drafts
GET /ledger/repeating
List repeating journals and bills
GET /bank-lines
List bank lines with their coding
GET /bank-rules
List bank rules
POST /suppliers
Create a supplier
PATCH /suppliers/{id}
Update a supplier
POST /ledger/journal-drafts
Save a journal draft
POST /bills
Create a draft bill
POST /bills/{id}/approve
Approve a bill
POST /bills/{id}/submit
Send a bill for approval
POST /bills/{id}/void
Void a bill
POST /bills/{id}/payments
Record a bill payment
POST /ledger/journals
Post a manual journal
POST /ledger/journals/{id}/reverse
Reverse a manual journal
POST /bank-rules
Create a bank rule
PATCH /bank-rules/{id}
Change a bank rule
DELETE /bank-rules/{id}
Delete a bank rule
POST /bank-lines/{id}/code
Code a bank line

Errors

Every error has the same shape, so a script can branch on the code.

Error response
{
  "error": {
    "code": "validation_error",
    "message": "items.0.rate: Required"
  }
}
400 invalid_json, confirm_required, invalid_idempotency_key
The body is not valid JSON, an action that needs {"confirm": true} was sent without it, or the Idempotency-Key header is not 8 to 64 letters, digits, "_" or "-". Nothing was changed.
401 missing_token, invalid_token
No token was sent, or it is wrong or has been revoked. Check the Authorization header.
403 plan_required, plan_limit, sending_off_for_key, money_changes_off_for_key
The REST API is on paid plans, a limit of your plan was reached (for example the free invoice limit when sending), the token is not allowed to send (sending_off_for_key: switch on Can send in Settings > AI connections), or the token is not allowed to change money records (money_changes_off_for_key: switch on Can record payments in Settings > AI connections before recording payments, removing manual payments, or voiding invoices).
404 not_found
No such record on the business the token belongs to. Another business's record is always "not found".
409 client_ambiguous, invoice_voided, invoice_not_payable, invoice_already_paid, invoice_state_changed, payment_not_removable, invoice_not_voidable, invoice_not_draft, invoice_not_overdue, no_outstanding_balance, reminder_limit_reached, reminder_already_sent, reminder_queued, reminder_delivery_unknown, email_suppressed, quote_not_draft, quote_not_sendable, quote_expiry_passed, quote_status_change_refused, invoice_locked, quote_locked, request_id_reused, idempotency_key_reused, idempotency_request_in_progress, idempotency_outcome_unknown, email_verification_required
The request conflicts with the state of a record or your account, for example two clients match the name you gave, an invoice or payment cannot be changed or deleted in its current state, a draft-only delete targeted a sent record, a quote cannot be sent or a reminder limit was hit, a reminder is queued and its delivery is not confirmed yet (reminder_queued: do not resend, read the invoice later), the mail server stopped answering in the middle of a reminder so the client may or may not have it (reminder_delivery_unknown: Invio does not resend or count it, another reminder is possible after 3 days), the client address is on hold after a bounce or complaint (`email_suppressed`), a requestId was reused with different details, an Idempotency-Key was reused for a different request or its first request is still running or ended without an answer (see Retry safely), or your email address is not verified yet.
422 validation_error, unknown_field, invalid_cursor
A field is missing, wrong, or not one this endpoint accepts (the message names it), or a paging cursor was sent with different filters than the list it came from. Nothing was changed.
429 rate_limited, daily_send_limit, reminder_too_soon, auto_reminder_cooldown
The token used its hourly allowance (rate_limited: the Retry-After header says how many seconds until it resets), or a sending rule says wait: the daily sending limit of a free or trial account, 3 days between manual reminders, or 24 hours after an automatic reminder.
503 audit_unavailable, idempotency_unavailable
The audit log or the Idempotency-Key could not be written before the action, so nothing was done. Safe to send the same request again.

Limits and what is left out

Each token can make 600 requests an hour.

Outside Books the API runs the same tools as Invio's AI connector, so it can do nothing the connector cannot, and it does not offer all of them. In Books the API can post where an AI assistant can only propose. These are not available:

Reading one expense by id (list them with a filter), or deleting an expense or a client.
Editing an invoice that has been sent (void it, or make a new version in the app), issuing a refund, or removing an automatically recorded payment.
Deleting an invoice or quote that is not a draft.
Writing the subject or the message of an email, or choosing who receives it. A send goes to the client's saved address with the standard Invio email.
Changing a client's email address, where a client's invoices are sent, a client's GST-free default, or how GST applies to a line. Those decide where documents go and how they are taxed, so only a person can change them in the app.
Changing your business settings, bank details, tax numbers, region or invoice numbering.
Saved items, recurring invoices and scheduled sends. They are available through the Invio connector for AI assistants.
Adding a vehicle, choosing or changing its method, logbook test periods, the running costs of a year and "sold or no longer used": each of these sets what the vehicle claim is, so a person enters them in the app. An odometer reading sent through the API waits like a trip; confirming, changing or deleting a trip or a reading, and putting a claim into the books, are done by a person in the app.
Setting or moving the lock date, confirming a GST return or BAS, changing a Books setting or the chart of accounts, turning Books on. Those are a person's decisions, made in the app.
Setting up, changing or ending a repeating journal or bill (a schedule that may post by itself is set by a person in the app), posting a journal draft (a person posts it in the app).
Undoing a bank coding, editing or deleting a bill payment, supplier credits, and the asset register (read-only: adding, changing, selling an asset and marking it as the vehicle claimed at the kilometre rate or by cents per kilometre): do those in the app.
What a person entered in the income tax preparation (adjustments, the home office figures, losses brought forward, the return type) and its CSV export: the figures are read with GET /reports/income-tax-prep and changed in the app.
Bills by email: accepting or discarding a message, allowing a sender, and changing or turning off the address. A held message may come from a stranger, so a person decides in the app.

OpenAPI document

Generate a client library or import the API into your own tools.

The full description of every endpoint, parameter and body is an OpenAPI 3.1 file: https://www.invio.co.nz/api/v1/openapi.json. It is generated from the same definitions the API validates with, so it matches what the API accepts.

Building with an AI coding assistant? Download the same documentation as a single Markdown file to give it:

Related guides

Connect your AI
Payment reminders
Recurring invoices
All guides →

Ready to get started?

Create your account and put this guide into practice in Invio.

Start free. Choose a plan when you need more.

Invio REST API: API Tokens for Scripts and CI | Invio