# Reading data

This guide explains how to read records from the Omono API. It covers how
to page through a list, narrow it down with filters, choose its order, get
related records in the same request, and find the records that an ID points
to. It also explains how to download the file behind a document.

## Page through a list

Every list operation returns a page of records in the same shape:

```json
{
  "data": [ … ],
  "hasMore": true,
  "nextCursor": "eyJ2IjoxLCJz…"
}
```

`data` holds the records on this page. `hasMore` tells you whether there
are more records after them, and `nextCursor` is the value that gets you
the next page. On the last page, `hasMore` is `false` and `nextCursor` is
`null`. A [search](/docs/reading#search) of companies or contacts is the one exception:
it has no cursor, so its `nextCursor` is always `null`.

To read a whole list:

1. Make the first request without a cursor. Use `limit` to choose how many
   records you want on each page, between 1 and 200. The default is 50.
2. While `hasMore` is `true`, ask for the next page by sending the
   `nextCursor` from the previous page as `cursor`.

```bash
# The first page
curl "https://api.omono.co/api/v1/companies?limit=200" \
  -H "Authorization: Bearer omk_live_yourKeyHere"

# The next page, using the nextCursor from the first page
curl "https://api.omono.co/api/v1/companies?limit=200&cursor=eyJ2IjoxLCJz…" \
  -H "Authorization: Bearer omk_live_yourKeyHere"
```

Treat a cursor as an opaque value: don't try to read it, and don't build
one yourself. A cursor works only with the same sort order and filters as
the request that produced it. If you change any of them, the request fails
with a `422` error and the code `validation-failed`, and `errors[].field`
is `cursor`. When that happens, start the list again without a cursor. You
can change `limit` and [`include`](/docs/reading#include) from one page to the next.

A cursor doesn't expire, but it's meant for paging straight through a list,
not for storing. After an update to Omono, a cursor you saved earlier can
fail with the same `422` error. So don't keep a cursor to carry on later:
to pick up where you left off, use `updated_since` with the highest
`updated` time you've read, as [Keeping in sync](/docs/syncing) explains.

Always check `hasMore` rather than counting records, because a page can
hold fewer records than your `limit` even when more are on the way. Omono
ends a page early in two cases:

- The related records on the page add up to more than 2,000. This happens
  when you use [`include`](/docs/reading#include), and on the lists of a sales order's
  dispatches and a purchase order's deliveries, where the line items on
  each dispatch or delivery count.
- The page would come to more than about 8 MB of JSON. This can happen on
  any list, for example a page of stock items with long descriptions, or
  of orders with their line items. Omono also measures the records while
  it reads them, so a page with large records can end a little before
  that.

A page always holds at least one record. So keep sending `nextCursor`
until `hasMore` is `false`, and the next page starts right after the last
record you got.

The API doesn't offer offset paging, so you can't jump straight to a page
by its number. The events list pages with `cursor` too, but it also takes
`since`, which is the position you save between polls, as
[Find deleted records](/docs/syncing#deletes) explains.

## Filter a list

All lists use the same rules for filters, so once you know them for one
list, you know them for all. Each list operation in the
[API reference](/docs) shows the filters it accepts.

| Filter                                                                          | What it returns                                                                                                                                                                                                                                                                                                                                                                                                   |
| ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ids=a,b,c`                                                                     | Only the records with these IDs, up to 100 of them. Archived records are included. An ID that doesn't exist, or that your key can't see, is left out.                                                                                                                                                                                                                                                             |
| `status=draft,on_order`, and other filters on a status, a type or an ID         | Records that match any of the values in the comma-separated list.                                                                                                                                                                                                                                                                                                                                                 |
| `created_gte`, `created_lte`, and other `<field>_gte` and `<field>_lte` filters | With `_gte`, records on or after the time you give. With `_lte`, records on or before it. Both ends are included.                                                                                                                                                                                                                                                                                                 |
| `updated_since`                                                                 | Records changed at or after this time. Use it to keep a copy in sync, as [Keeping in sync](/docs/syncing) explains.                                                                                                                                                                                                                                                                                               |
| `companyName`, `accountNo`, `partNo`, `customerOrderNo`                         | Records whose value matches yours exactly. The match ignores capital letters, and `partNo` and `customerOrderNo` also ignore spaces at the start and end of your value. These filters take one value only, except `partNo`: repeat it, as in `partNo=ABC-1&partNo=ABC-2`, to match up to 100 part numbers. A comma is part of a part number, never a separator.                                                   |
| `email`                                                                         | On contacts and users, the records with this email address. The match ignores capital letters and spaces at the start and end of your value. It takes one address only.                                                                                                                                                                                                                                           |
| `quoteNo`, `orderNo`, `purchaseOrderNo`, `creditNoteNo`                         | The document with exactly this number. Leave out the prefix that Omono shows, so send `orderNo=1042` for sales order SO-1042. A `quoteNo`, `orderNo` or `purchaseOrderNo` that starts with the prefix ("SQ-", "SO-" or "PO-"), in any case, fails with a `422` error and the code `validation-failed`. These filters take one number only.                                                                        |
| `invoiceNo`                                                                     | On invoices, the invoices with exactly these numbers, up to 100 of them. Leave out the prefix that Omono shows, so send `invoiceNo=20417` for invoice INV-20417. A number that starts with "INV-", in any case, fails with a `422` error and the code `validation-failed`. On deliveries, the deliveries with exactly these supplier invoice numbers, as staff typed them.                                        |
| `dispatchNo`, `trackingNo`                                                      | On dispatches, the dispatches with exactly these numbers or tracking numbers, up to 100 of each. A dispatch's number counts within its sales order, so `dispatchNo` needs `salesOrderId`: without it, the request fails with a `422` error and the code `validation-failed`. A tracking number must match the whole text saved on the dispatch: its capital letters, and any spaces inside it, must be as stored. |
| `supplierId`                                                                    | On stock items, the items with any of these companies among their suppliers. Send up to 100 company IDs. Your API key also needs the `purchasing:read` scope, or the request fails with a `403` error and the code `insufficient-scope`.                                                                                                                                                                          |
| `archived`                                                                      | On lists that can hold archived records, whether to return them. Send `false` for records that aren't archived, which is the default, `true` for archived records only, or `any` for both.                                                                                                                                                                                                                        |

For example, this request returns the Draft and On Order sales orders
for one customer:

```bash
curl "https://api.omono.co/api/v1/sales-orders?companyId=b2FpLmNvbXBhbnkQQ&status=draft,on_order" \
  -H "Authorization: Bearer omk_live_yourKeyHere"
```

Filters on a list of values, such as `status`, `kind` and
`linkedEntityType`, take the same lower-case words that the records use,
such as `on_order`. The [Enums](/docs/enums) page lists every value known
today. A filter accepts only those values, but a record you read can hold a
value that Omono adds later, so make sure your code copes with one it
doesn't recognise.

If you send a parameter that the list doesn't accept, the request fails
with a `400` error and the code `malformed-request`. If a value is wrong,
for example a date that isn't a date, it fails with a `422` error and the
code `validation-failed`.

A list request can fail with a `503` error and the code `request-timeout`
when its filters match only a few of many records. If it does, don't keep
sending the same request: narrow the list first, for example with
`updated_since` or `ids`, then try again.

Send a list of values as one comma-separated value, such as `ids=a,b,c`.
You can also repeat the parameter, as in `status=draft&status=on_order`,
which many generated clients do. It returns the same records as
`status=draft,on_order`, and a cursor from one form works with the other.
Only a parameter that takes a list can be repeated. If you send any other
parameter more than once, such as `limit`, the request fails with a `400`
error and the code `malformed-request`. The API doesn't accept parameter
names with square brackets either, such as `ids[]` or `ids[0]`, so a
request that sends one fails in the same way.

You can send `:` and `/` in a value as they are, so
`updated_since=2026-09-18T10:15:30.123Z` works. Encode `&`, `#`, `+`, `=`
and spaces in the usual way.

## Search companies, contacts and stock items

To find a company or a person when you know only part of the name, send
`search` to [List all companies](/docs#tag/companies/GET/companies) or
[List contacts](/docs#tag/contacts/GET/contacts). To find a stock item by
part of its part number or title, send it to
[List all stock items](/docs#tag/stock-items/GET/stock-items). It works the
way the search screens in Omono work, and it returns the same records as
the list.

- Each word of your text matches the start of a word, ignoring capital
  letters. `acm` finds Acme Engineering Ltd, but `cme` doesn't.
- On companies, your text matches the company name, the account number
  or the postcode as a phrase: its words must be next to each other in the
  name, in the same order. So `acm eng` finds Acme Engineering Ltd, but
  `eng acm` and `acme ltd` don't.
- On contacts, it matches the contact's full name. The words must be in
  the same order, with a gap of up to two words between them, so `pri sh`
  finds Priya Shah, and `priya shah` finds Priya Anne Shah.
- On contacts, a text that contains `@` matches any part of the email
  address instead, ignoring capital letters. So
  `search=@acme-engineering.example` finds everyone with an address at
  that domain, which helps you match an email you received to a customer.
  To find one exact address, use the `email` filter.
- On stock items, your text matches the part number or the title as a
  phrase, as the Filter box on the Stock screen in Omono does. It doesn't
  search the description. To find one exact part number, use the `partNo`
  filter.
- On stock items, `supplierPartNo` searches your suppliers' part numbers
  instead, as the Supplier Part No filter on the Stock screen does: each
  word matches the start of a word of a supplier's part number. Only spaces
  separate words, so a part number such as `FS-DN50-316` is one word:
  `FS-DN` finds it, but `DN50` doesn't. Send it on its own, or with
  `search`, and then an item must match both. With `supplierId`, the part
  number must belong to one of those suppliers, so
  `supplierId=X&supplierPartNo=ABC` finds the items that supplier X sells
  under a part number starting `ABC`. `supplierPartNo` and `supplierId`
  need the `purchasing:read` scope as well as `stock:read`.

```bash
curl "https://api.omono.co/api/v1/companies?search=acme&isCustomer=true" \
  -H "Authorization: Bearer omk_live_yourKeyHere"
```

Send 2 to 100 characters for `search`, and 1 to 100 for `supplierPartNo`.
On companies and contacts the best matches come
first; on stock items the matches come in part number order, as on the
Stock screen. A search of stock items pages like a list: while `hasMore`
is `true`, send `nextCursor` as `cursor` with the same `search` and
filters, and you get every match once, in part number order. A search by
`supplierPartNo` pages in the same way. A search of companies or contacts
returns its best matches only and has no cursor: you get up to `limit`
records, `nextCursor` is always `null`, and `hasMore` is `true` when more
records match, so make your text longer to narrow the list. You can
combine `search` with `archived` and `limit`, with `isCustomer`,
`isSupplier` and `include` on companies, with `companyId` on contacts, and
with `canSell`, `canBuy`, `insufficientStock`, `kind`, `warehouseId`,
`supplierId`, `supplierPartNo`, `include` and `cursor` on stock items.
`supplierPartNo` combines with the same parameters. If you send `search`
or `supplierPartNo` with `sort`, `updated_since`, `ids`, `created_gte`,
`created_lte`, `externalRef`, a filter on an exact value (`companyName`,
`accountNo`, `email` or `partNo`), `hasPriceList`, or `cursor` on companies
or contacts, the request fails with a `422` error and the code
`validation-failed`.

Search reads a copy of your records that Omono keeps for searching, so a
record you've just created or changed can take a few seconds to appear.
To read a record straight after you write it, use its ID. If the search
isn't available just now, the request fails with a `503` error and the
code `temporarily-unavailable`, with a `Retry-After` header. Retry after
that delay, or list the records without `search`. A search counts as one
request against your [rate limits](/docs/limits), except a search of
contacts by email address, with `@`, which counts as 3 against your
organisation's limit, as [Email searches](/docs/limits#email-search)
explains. A search either finds every match or fails: you never get a
partial list. When a page is too large to return in full, it ends with the
first matches in the search's order, and `hasMore` is `true`.

## Include related records

Some records have related records that belong to them, such as a company's
contacts or an order's line items. With `include`, you get those related
records inside each record, instead of making one more request per record.
It works on lists and when you retrieve a single record.

| Resource        | What you can include      |
| --------------- | ------------------------- |
| Companies       | `contacts`, `addresses`   |
| Quotes          | `lineItems`               |
| Sales orders    | `lineItems`, `dispatches` |
| Purchase orders | `lineItems`, `deliveries` |
| Credit notes    | `lineItems`               |
| Stock items     | `suppliers`               |

For example, `GET /companies?include=contacts,addresses` returns each
company with all of its contacts and addresses, including archived ones. A
sales order's dispatches are the shipments that deliver its goods, and a
purchase order's deliveries bring in the goods you buy from the supplier.

On a list, a related field you don't ask for isn't there at all. For
example, the companies in `GET /companies` have no `contacts` field unless
you send `include=contacts`. When you retrieve one quote, sales order,
credit note or purchase order by its ID, its line items always come with
it.

One record can bring at most 10,000 related records with it, and it can
come to at most 32 MB of JSON with them. The count covers the related
records you get: a document's line items and their BOM items, the
dispatches or deliveries you include with their line items, or a company's
contacts and addresses. A record over either limit is too large for the
API to return. Reading it, or a list page that starts with it and includes
its related records, fails with a `409` error and the code
`document-too-large`. Retrying won't help. Ask for fewer related records
instead, and read that record in Omono. On a list, send the same request
with the same `cursor` but without `include`. That page starts with the
large record, without its related records, and its `nextCursor` works
with `include` again for the page after it.

A list with `include` can return fewer records than your `limit` on a
page, so keep paging until `hasMore` is `false`, as
[Page through a list](/docs/reading#pagination) explains.

A stock item's `suppliers` are part of the stock item, so they don't count
towards these limits. Each supplier has its part number, lead time, price
and the currency of that price, which is the supplier's own currency. An
item's suppliers are purchasing data: `include=suppliers` needs the
`purchasing:read` scope as well as `stock:read`. A change to an item's
suppliers changes the item's `updated` time, so it reaches you through
`updated_since` like any other change to the item.

## Sort a list

To choose the order of a list, send one `sort` value from the list
operation's options. The default is `-created`, which puts the newest
records first. A `-` in front of a field sorts in descending order, and no
`-` sorts in ascending order. For example, `sort=companyName` lists
companies from A to Z.

| List                                                                               | You can sort by                     |
| ---------------------------------------------------------------------------------- | ----------------------------------- |
| Companies                                                                          | `created`, `updated`, `companyName` |
| Stock items                                                                        | `created`, `updated`, `partNo`      |
| Quotes, sales orders, invoices, credit notes, purchase orders, tasks and documents | `created`, `updated`                |
| Contacts, in `GET /contacts`                                                       | `created`, `updated`                |

When two records have the same value, they're sorted by `id`, so the order
never changes between pages.

Some lists always come in a fixed order and don't take `sort`. Reference
lists are in order of `id`. A company's contacts and addresses come newest
first, a sales order's dispatches come in order of `dispatchNo`, and a
purchase order's deliveries come in order of `deliveryNo`.

## Look up the records an ID points to

Records point to other records with fields whose names end in `Id`, such as
`taxRateId`, `currencyId` or `salesPersonId`. To find the record behind one
of these fields, look up its ID in the list it points to:

- Most point to a reference list, and each field's description in the API
  reference names its list. For example, `taxRateId` points to a tax rate
  from `GET /tax-rates`.
- Fields that point to people, such as `salesPersonId` or
  `accountManagerId`, point to your users, from `GET /users`.
- A purchase order's delivery address, in its `addressId`, is usually one of
  your organisation's own addresses, from `GET /organisation-addresses`. On
  a drop-ship order, where the supplier delivers straight to your customer,
  it's one of that customer's addresses instead.

The reference lists are grouped in the API reference like this:

| Section                                                      | Lists                                                                                                                                                                  |
| ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Organisation](/docs#tag/organisation)                       | Your organisation, its settings and closed days, its addresses and bank accounts, users, divisions, departments and warehouses.                                        |
| [Tax and currency](/docs#tag/tax-and-currency)               | Tax rates, currencies, currency rates and countries.                                                                                                                   |
| [Sales settings](/docs#tag/sales-settings)                   | Sales analysis codes, commissions, customer segments, industries, company types, quote validities, conversion probabilities, lost-quote reasons and workflow statuses. |
| [Purchasing and shipping](/docs#tag/purchasing-and-shipping) | Purchase analysis codes, couriers, incoterms, commodity codes and EORI numbers.                                                                                        |
| [Task settings](/docs#tag/task-settings)                     | Task statuses, priorities and types.                                                                                                                                   |

You can only read the reference lists through the API. Your staff set them
up in Omono's Settings, so ask them to add any tax rate, user or workflow
status you need before your integration uses it.

Older records can point to reference list entries that have since been
archived. To find those, use `ids=`, which on a reference list returns the
entries you ask for whether they're archived or not, or send
`archived=any`.

Reference data changes rarely, so cache your lookups rather than resolving
the same ID on every request.

## Read a record only when it has changed

When you retrieve a single record, such as a sales order or a stock item,
the response has an `ETag` header that identifies its current version.
Store it, and send it back in an `If-None-Match` header the next time you
retrieve the same record:

```http
GET /api/v1/sales-orders/{id}
If-None-Match: "1758190530123"
```

If the record hasn't changed, Omono answers `304 Not Modified` with no
body, so you can keep the copy you already have. If it has changed, you get
the usual `200` with the record and its new `ETag`. A `304` still counts as
a request against your rate limits.

A sales order that you retrieve with `include=dispatches`, and a dispatch
that you retrieve on its own, are the exceptions: they always come back in
full, with a `200`. A dispatch's `legalTransitions`, and the `blockedBy`
list in each of them, can change without changing the order, so Omono never
tells you to keep an old copy. The response still has the order's `ETag`,
which you can send in `If-Match`.

Lists don't support `If-None-Match`: to find changed records, use
`updated_since` instead, as [Keep your copy in sync](/docs/syncing)
explains.

## Read costs, margins and base-currency totals

Each quote, sales order, purchase order, credit note, dispatch, delivery
and invoice has its totals in your organisation's base currency next to its
own totals: `totalValueBase`, and `totalTaxBase` where the record has a
`totalTax`. They're the figures Omono saved, converted at the record's
exchange rate, and any key that can read the record gets them.

Costs and margins need one more scope. If your key also has the
`stock:read` scope (or `stock:write`, which includes it), you also get:

- `lastCost` and `margin` on each line item of a quote or a sales order,
  wherever the line items appear: when you retrieve the record, when you
  list records with `include=lineItems`, in
  [List all sales order lines](/docs#tag/sales-orders/GET/sales-order-lines),
  and in the answer to a write.
- `costOfGoodsSold`, `grossProfit` and `grossMargin` on each
  [invoice](/docs#tag/dispatches/GET/invoices), with `costOfGoodsSoldBase` and
  `grossProfitBase` in your base currency.

Without `stock:read`, these fields are left out of the response, rather
than set to `null`, because a `null` would read as a cost of nothing.

A cost of 0 means no cost is known. A line item whose `lastCost` is 0 or
`null` has a `margin` of `null`, and so does an invoice whose
`costOfGoodsSold` is 0 or `null`, because a margin worked out against no
cost means nothing. The cost stays as Omono saved it, so a `lastCost` of
0 reads 0. An invoice's cost is worked out from the costs on its sales
order's line items, and a line item with no cost counts as 0, so the
margin of an invoice with some uncosted goods reads higher than it
should.

Each line item in
[List all sales order lines](/docs#tag/sales-orders/GET/sales-order-lines)
also has its order's `currencyId` and `exchangeRate`. Its prices and
costs are in that currency, so divide them by `exchangeRate` before you
add up line items of orders in different currencies. The list includes
the line items of Draft and Cancelled orders: `orderStatus` tells you
which.

Invoices, credit notes and deliveries also have `xero`, the state of
their sync to Xero, or `null` if your organisation isn't connected to
Xero. It has the status and Xero's ID of the record, but never the texts
of errors or warnings, which staff read in Omono.

## Read a record's notes

Companies, quotes, sales orders, credit notes, purchase orders, stock items
and tasks have notes: the history that staff see in a record's notes in
Omono. Read them with `GET /<record>/{id}/notes`, such as
[`GET /quotes/{id}/notes`](/docs#tag/notes/GET/quotes/{id}/notes). The list
needs the record's own read scope, such as `sales:read` for a quote.

- **Two kinds.** Each note has a `kind`. A `user` note is one that a person
  wrote in Omono, or that an API key added. A `system` note is one that
  Omono wrote itself when something happened to the record, such as a new
  status. A system note is the record's history as staff see it, and it can
  name other records, such as an order number on a stock item. Send
  `kind=user` or `kind=system` to get only one kind.
- **A task's notes are user notes only.** A task's history, which staff
  see under Activity in Omono, isn't part of its notes, because it can name
  records and private tasks that the task itself doesn't show. On a task,
  `kind=system` returns an empty list.
- **Newest first.** The list has no `sort` parameter. It pages like any
  other list, with `limit` and `cursor`.
- **Plain text.** `text` is the note's text with a line break between
  lines. Formatting that staff added in Omono isn't included.
- **The author.** `authorName` is the name Omono shows for the note. A note
  that an API key added shows `API · ` and the key's name, and its
  `apiKeyId` is the key's ID.
- **Notes don't change the record.** A new note doesn't change its
  record's `updated` time, so `updated_since` on the record's list doesn't
  find it. To keep a copy of a record's notes, read its notes list again,
  with `created_gte` set to the `created` time of the newest note you have.
  Deleted task notes aren't returned.

## Download a document's file

A document's details come from `GET /documents/{id}`, and its file comes
from `GET /documents/{id}/content`. That request doesn't return the file
itself. Instead, it answers with a `302` redirect to a storage URL that
works for only 10 to 20 seconds.

1. Call `GET /documents/{id}/content` with your key, as usual.
2. Read the storage URL from the `Location` header of the `302` response.
3. Download the file from that URL straight away, without your
   `Authorization` header.

Never store or share a storage URL. The storage host isn't the API host, so
if your servers can only reach approved hosts, allow the storage host too.

When a document is archived, which is how Omono deletes documents, its file
can't be downloaded any more and the request fails with a `404` error. You
can still read the document's details.

## Download a document as a PDF

Omono creates the paperwork for your quotes, orders, dispatches, invoices
and credit notes as PDFs. Download them with these requests:

| Paperwork         | Request                                                                                                                                                    |
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Quote             | [`GET /quotes/{id}/pdf`](/docs#tag/quotes/GET/quotes/{id}/pdf)                                                                                             |
| Quote proforma    | [`GET /quotes/{id}/proforma-pdf`](/docs#tag/quotes/GET/quotes/{id}/proforma-pdf)                                                                           |
| Sales order       | [`GET /sales-orders/{id}/pdf`](/docs#tag/sales-orders/GET/sales-orders/{id}/pdf)                                                                           |
| Delivery note     | [`GET /sales-orders/{id}/dispatches/{dispatchId}/delivery-note-pdf`](/docs#tag/dispatches/GET/sales-orders/{id}/dispatches/{dispatchId}/delivery-note-pdf) |
| Picking list      | [`GET /sales-orders/{id}/dispatches/{dispatchId}/picking-list-pdf`](/docs#tag/dispatches/GET/sales-orders/{id}/dispatches/{dispatchId}/picking-list-pdf)   |
| Dispatch proforma | [`GET /sales-orders/{id}/dispatches/{dispatchId}/proforma-pdf`](/docs#tag/dispatches/GET/sales-orders/{id}/dispatches/{dispatchId}/proforma-pdf)           |
| Invoice           | [`GET /invoices/{id}/pdf`](/docs#tag/dispatches/GET/invoices/{id}/pdf)                                                                                     |
| Credit note       | [`GET /credit-notes/{id}/pdf`](/docs#tag/credit-notes/GET/credit-notes/{id}/pdf)                                                                           |
| Purchase order    | [`GET /purchase-orders/{id}/pdf`](/docs#tag/purchase-orders/GET/purchase-orders/{id}/pdf)                                                                  |

Each one returns `200` with the PDF file itself as the body, not JSON, and
`Content-Type: application/pdf`. The `Content-Disposition` header gives the
file name that Omono uses, such as `INV-1042.pdf`. The PDF is the same as
the one that Omono's **Print** and **Download** buttons create, with your
logo, your layout settings and your division's details. A Draft document
prints without a "DRAFT" mark.

Omono creates each PDF when you ask for it, so it always shows the record
as it is now. Don't keep a PDF in place of asking again if the record
might have changed. A PDF counts as more than one request against your
organisation's rate limit, as [PDFs](/docs/limits#pdfs) explains.

A document has a PDF only when Omono offers one. For example, a sales
order needs line items, and all of them on dispatches unless it's a
call-off. When it has none, the request fails with a `409` error that
says why, such as `no-line-items`. A dispatch that hasn't shipped has no
invoice, and a dispatch for a customer who doesn't pay on proforma terms
has no proforma: both requests fail with a `404` error.

## Read the dashboard figures

[`GET /dashboard`](/docs#tag/dashboard/GET/dashboard) returns the sales
and output figures that the dashboard in Omono shows: today, this month
and this financial year, each with its target. It needs the `sales:read`
scope, and it takes no parameters.

- **Today is your organisation's today.** Omono works out today and this
  month in your organisation's time zone, which the response returns in
  `timeZone` next to the day in `date`. The dashboard in Omono uses the
  time zone of each person's browser, so near midnight the API and a
  person in another time zone can see different days. The financial
  year's figures run on whole calendar days in UTC, as they do in Omono's
  dashboard.
- **Company-wide, in your base currency.** The figures cover your whole
  organisation, not one person or division. Every amount is net of tax
  and in your base currency, whose ID is in `currencyId`, rounded to 2
  decimal places.
- **What the figures count.** Sales are the sales orders created in the
  period that aren't cancelled, Draft orders included, as Omono's own
  dashboard counts them, less the complete credit notes created in it.
  An order counts on the day it was created, not the day it went active.
  Output is the dispatches at your final workflow status whose dispatch
  date is in the period, less the same credit notes. So an `actual` can
  be negative.
- **Targets and pace.** A target is the daily target from your settings,
  added up over the working days that aren't closed days. Your working
  week is `workingWeek` in
  [`GET /settings`](/docs#tag/organisation/GET/settings), and your closed
  days are in [`GET /closed-days`](/docs#tag/organisation/GET/closed-days).
  The financial year ends on the `financialYearEnd` in
  [`GET /organisation`](/docs#tag/organisation/GET/organisation). `pace` is the
  part of the month's or the year's target up to and including today, so
  comparing `actual` with `pace` tells you whether you're on course. Without
  targets in your settings, every target and `pace` is `0`.
- **Kept for about 30 seconds.** Omono keeps the figures for about 30
  seconds after it works them out, and each request counts as 5 against
  your organisation's
  rate limit, as [Dashboard figures](/docs/limits#dashboard) explains. Ask
  for them once a minute or less often.
