---
title: "Every invoice, with the contact and unit resolved"
method: GET
path: "/api/v1/invoices"
tags: ["Money"]
---

# Every invoice, with the contact and unit resolved

`GET /api/v1/invoices`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/invoices`
- Auth: API key in cookie `better-auth.session_token`

One page of the invoices on file, in primary key order, each carrying the name it was raised against and the unit it belongs to, so a list needs no second lookup. `limit` caps a page and `offset` moves the window, so a client reads the lot a page at a time until `offset + invoices.length` reaches `total`. `collection` is measured over every invoice falling due this month, never over the page. `structuredRef` is the key automatic reconciliation matches a bank line on. Every amount is integer cents.

## Query parameters

- `limit` integer
- `offset` integer

## Response `200`

Invoices and this month’s collection status.

- object
  - `ok` unknown, required
  - `data` object, required
    - `invoices` object[], required
      - `id` string, required: Stable record id, e.g. `lse_012`.
      - `number` string, required
      - `leaseId` string: Stable record id, e.g. `lse_012`.
      - `contactId` string, required: Stable record id, e.g. `lse_012`.
      - `teamId` string, required: Stable record id, e.g. `lse_012`.
      - `kind` string, required
      - `status` string, required
      - `issueDate` string, required: A calendar date, `YYYY-MM-DD`.
      - `dueDate` string, required: A calendar date, `YYYY-MM-DD`.
      - `subtotal` integer, required: Money, always in integer cents. €1,250.00 is 125000.
      - `vatTotal` integer, required: Money, always in integer cents. €1,250.00 is 125000.
      - `total` integer, required: Money, always in integer cents. €1,250.00 is 125000.
      - `paidAmount` integer, required: Money, always in integer cents. €1,250.00 is 125000.
      - `structuredRef` string: Belgian-style structured reference, the key to automatic reconciliation.
      - `currency` string, required
      - `contactName` string, required: Who the invoice was raised against. `None` when the contact is gone.
      - `unitLabel` string, required: Resolved through buildingLabel(), so an owner alias is honoured. `None` for an invoice tied to no unit.
    - `collection` object, required: Where this month stands against what was due, measured on due date. The same figures /payments returns, and read over the whole month rather than this page.
      - `expected` integer, required: Money, always in integer cents. €1,250.00 is 125000.
      - `collected` integer, required: Money, always in integer cents. €1,250.00 is 125000.
      - `outstanding` integer, required: Money, always in integer cents. €1,250.00 is 125000.
      - `rate` number, nullable, required: collected ÷ expected, 0–1. Null when nothing was due, because a share of nothing is not a figure.
      - `invoiceCount` number, required
      - `paidCount` number, required
      - `overdueCount` number, required: Notices whose grace days are over and whose bank has reported past the due date. One not seen yet is never counted.
      - `allInBank` boolean, required: True when every payment behind what was collected came off a bank movement. False when nothing was collected.
    - `limit` number, required: The page size this response was actually read at, which is `limit` capped at 200.
    - `offset` number, required: The offset this page was read at.
    - `total` number, required: Every invoice on file, not just the ones returned. Every one of them is reachable through `offset`.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

## Other responses

- `400`: `limit` or `offset` is out of range.

---

[API](https://skmtc.dev/dardaris/apis/dardaris-api.md) · [All operations](https://skmtc.dev/dardaris/apis/dardaris-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dardaris/apis/dardaris-api/revisions/4aff33835c73?raw)
