Check supplier invoices
Use this recipe to copy the supplier invoices that your staff record in Omono into another system, such as an accounting package or a tool that checks invoices against what you ordered and received. You read every supplier invoice once, and then read only the new and changed ones every few minutes.
Every request in this recipe sends your API key in an
Authorization: Bearer <key> header. Paths are relative to
https://<host>/api/v1, and the examples show the full path. This recipe
only reads, but GET /deliveries is in beta, so it can change in any way,
at any time, until it's marked stable. Learn more about
beta operations.
Note: If your organisation uses the Xero integration, Omono already sends supplier invoices to Xero as bills. Each delivery's
xerotells you where it stands in that sync.
You need the scope purchasing:read.
How supplier invoices work in Omono#
A purchase order arrives in one or more deliveries. When the goods on a
delivery arrive, staff receive it in Omono, and when the supplier's invoice
arrives, staff record its number and date on that delivery. So each
supplier invoice is one delivery whose invoiceNo is set. After that, the
delivery, its status and its line items can't change.
Each delivery has:
invoiceNoandinvoiceDate: the supplier's invoice number, as staff typed it, and its date.totalValue: the value of the goods on the delivery, before tax, in the purchase order's currency. Omono works it out from the quantities on the delivery and the prices on the purchase order's line items.totalValueBase: the same value in your base currency, as Omono saved it. It'snullon some old deliveries.xero: the status of its sync to Xero, and Xero's ID for the bill. It'snullwhen your organisation isn't connected to Xero.purchaseOrderId,purchaseOrderNoandcompanyId, the supplier.currencyIdandexchangeRate: the purchase order's currency, whichtotalValueis in, and its exchange rate. DividetotalValuebyexchangeRateto get your base currency.
A delivery has no tax. Staff type the tax from the supplier's invoice when
they record it, but Omono stores only the difference between that and the
tax it worked out itself, not the tax on the invoice, so the API can't
give it to you. Read the tax from the invoice itself. For the line item
prices, read the purchase order with
GET /purchase-orders/{id}?include=lineItems, once for all its
deliveries.
Load everything once#
GET /api/v1/deliveries?invoiced=true&updated_since=1970-01-01T00:00:00.000Z&sort=updated&limit=200
Follow nextCursor until hasMore is false. Save the highest updated
value you saw: it's the mark where your first check for changes begins.
Take the mark from the deliveries you received, never from your own
clock, as Load everything the first time
explains.
A page can hold fewer deliveries than your limit even when more are on
the way, because it ends early once the line items on its deliveries add
up to more than 2,000. So always check hasMore before you stop.
Check for new and changed invoices#
Every few minutes, ask for the supplier invoices that changed since your
mark, minus 60 seconds. For example, if the highest updated you saw was
2026-10-03T09:55:30.123Z, send:
GET /api/v1/deliveries?invoiced=true&updated_since=2026-10-03T09:54:30.123Z&sort=updated&limit=200
Follow nextCursor until hasMore is false, then save the highest
updated value you saw as your new mark.
Poll for changes explains each step.
Recording the invoice changes the delivery's updated time, so a new
supplier invoice comes in your next check. A sync to Xero changes it too.
Because of the 60-second overlap, you'll also see some deliveries twice.
So match each one to your copy by id, and add it or replace it.
Find one supplier invoice#
To find a supplier invoice by its number, send it in invoiceNo, exactly
as staff typed it, capital letters and spaces included. Different
suppliers can use the same number, so add the supplier in companyId:
GET /api/v1/deliveries?invoiceNo=RE-2026-4471&companyId=<supplier id>
Send up to 100 numbers, separated by commas. A number that no delivery
has is left out, so the list can be empty. A delivery whose invoice staff
marked as unavailable, because the supplier won't send one, has
invoiceUnavailable set to true and no invoiceNo. It isn't in the
list with invoiced=true.
Errors to handle#
| Status | Code | What to do |
|---|---|---|
| 409 | document-too-large |
The first delivery on the page has more than 10,000 line items, or comes to more than 32 MB of JSON with them. Ask your staff to look at it in Omono. |
| 422 | validation-failed |
A query parameter is wrong, for example an updated_since that isn't a date and time. Fix the request. If errors[].field is cursor, start the check again from your mark, without a cursor. |
| 429, 503 | rate-limited, temporarily-unavailable |
Retry after the number of seconds in Retry-After. Don't save a new mark until you've read the last page, so that you miss nothing. |