# Invoices

List and read receivable and payable invoices through the TimeSubmit API: filters, each operation's scope and every invoice field.

## The invoice object

Receivables to clients and payables from consultants. Read only.

```json
{
  "id": "p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a",
  "kind": "receivable",
  "invoiceNumber": "INV-0107",
  "status": "sent",
  "isOverdue": false,
  "daysPastDue": null,
  "currency": "GBP",
  "total": 9120,
  "invoiceDate": "2026-11-02T00:00:00.000Z",
  "issuedAt": "2026-11-02T00:00:00.000Z",
  "dueDate": "2026-12-02T00:00:00.000Z",
  "paidAt": null,
  "clientId": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
  "consultantId": null,
  "projectId": "k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t",
  "clientPurchaseOrderId": "q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j",
  "purchaseOrderNumber": "FL-PO-2291",
  "consultantPurchaseOrderNumbers": [],
  "createdAt": "2026-11-02T09:41:17.000Z",
  "updatedAt": "2026-11-02T10:05:42.000Z",
  "client": {
    "id": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
    "name": "Fernhill Logistics Ltd"
  },
  "overBudgetReason": null,
  "notCoveredReason": null,
  "consultantPurchaseOrders": [],
  "subtotal": 7600,
  "taxLines": [
    {
      "name": "VAT",
      "rate": 20,
      "registrationNumber": "GB123456789",
      "amount": 1520
    }
  ],
  "lines": [
    {
      "description": "Warehouse Platform Migration, October: Tomasz Wierzbicki",
      "quantity": 10,
      "unit": "days",
      "unitPrice": 760,
      "amount": 7600,
      "currency": "GBP",
      "consultantId": "m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v"
    }
  ]
}
```

A list answers each invoice without `client`, the reasons, the purchase order shares, `subtotal`, `taxLines` and `lines`. Reading one answers all of it.

Every field below is in every answer. A required field always has a value; a nullable one is `null` when it has none. More fields may be added within `/v1`, so have your code ignore any it doesn't recognise.

| Field | Type | About it |
| --- | --- | --- |
| `id` (required) | string | The invoice's id. |
| `kind` (required) | "receivable" \| "payable" | A receivable is what the organisation bills its client; a payable is what a consultant bills the organisation. |
| `invoiceNumber` (required) | string | The number printed on it. |
| `status` (required) | string | Its status as the dashboard reports it: a sent invoice past its due date is overdue. One of 7 values. Values: `draft`, `sent`, `paid`, `overdue`, `archived`, `discarded`, `rejected`. |
| `isOverdue` (required) | boolean | Whether it is overdue now. |
| `daysPastDue` (nullable) | integer or null | Whole days past its due date, when overdue. |
| `currency` (required) | string | An ISO 4217 code. |
| `total` (required) | number | The total, tax included, as stored. |
| `invoiceDate` (nullable) | time (ISO 8601) or null | Its date: the issue date, or for a draft the day it was made. |
| `issuedAt` (nullable) | time (ISO 8601) or null | When it was sent. |
| `dueDate` (nullable) | time (ISO 8601) or null | When it falls due. |
| `paidAt` (nullable) | time (ISO 8601) or null | When it was paid. |
| `clientId` (nullable) | string or null | The client, for a receivable. |
| `consultantId` (nullable) | string or null | The consultant, for a payable. |
| `projectId` (nullable) | string or null | The project. |
| `clientPurchaseOrderId` (nullable) | string or null | The client purchase order it was raised against. |
| `purchaseOrderNumber` (nullable) | string or null | The client's purchase order number, frozen at raising. |
| `consultantPurchaseOrderNumbers` (required) | string[] | For a payable, the consultancy's purchase order numbers, frozen at raising. |
| `createdAt` (nullable) | time (ISO 8601) or null | When it was created. |
| `updatedAt` (nullable) | time (ISO 8601) or null | When it last changed. |
| `client` (nullable) | object | The client, for a receivable. |
| `client.id` (required) | string | The client's id. |
| `client.name` (required) | string | Its name. |
| `overBudgetReason` (nullable) | string or null | Why it was raised past its purchase order's budget, when it was. |
| `notCoveredReason` (nullable) | string or null | Why time no purchase order covered was billed, when it was. |
| `consultantPurchaseOrders[]` (required) | array of objects | For a payable, the consultant purchase orders it drew on, and how much of each. |
| `consultantPurchaseOrders[].id` (required) | string | The purchase order's id. |
| `consultantPurchaseOrders[].amount` (required) | number | The amount drawn. |
| `subtotal` (required) | number | The total of the lines, before tax. |
| `taxLines[]` (required) | array of objects | Each tax, as printed. |
| `taxLines[].name` (required) | string | The tax's name. |
| `taxLines[].rate` (required) | number | Its rate, as a percentage. |
| `taxLines[].registrationNumber` (nullable) | string or null | The registration number printed with it. |
| `taxLines[].amount` (required) | number | The tax charged. |
| `lines[]` (required) | array of objects | The lines, as printed. On a payable, one per timesheet period, naming the projects it bills. A period whose time is in more than one currency is on one payable per currency, and each of those lines carries only its own currency's projects. |
| `lines[].description` (required) | string | What it is for. |
| `lines[].quantity` (required) | number | How many units. |
| `lines[].unit` (required) | "hours" \| "days" | What the quantity counts. |
| `lines[].unitPrice` (required) | number | The price of one unit. |
| `lines[].amount` (required) | number | The line's amount. |
| `lines[].currency` (required) | string | An ISO 4217 code. |
| `lines[].consultantId` (nullable) | string or null | The consultant whose work it is. |

This list can grow within `/v1`, so ignore any you don't recognise rather than failing on it. See [versioning](https://www.timesubmit.com/developers/versioning).

## Operations

### `GET /invoices`

**List invoices.** A page of one kind of your organisation's invoices, in the order they were raised. Discarded invoices are left out unless asked for. A filtered page can hold fewer than `limit`, or none, while `nextCursor` leads on. Needs the `invoices:read` scope. Succeeds with 200, a page of them.

| Query parameter | Type | About it |
| --- | --- | --- |
| `kind` (required) | "receivable" \| "payable" | Which kind. Required: the two are never listed together. |
| `status` (optional) | string | Only invoices in this status, as the dashboard reports it. One of 7 values. Values: `draft`, `sent`, `paid`, `overdue`, `archived`, `discarded`, `rejected`. |
| `from` (optional) | date (YYYY-MM-DD) | Only invoices dated on or after this day. |
| `to` (optional) | date (YYYY-MM-DD) | Only invoices dated on or before this day. |
| `discarded` (optional) | boolean | Include discarded invoices. |
| `limit` (optional) | integer | How many to a page, 1 to 100. 25 when absent. From 1 to 100. |
| `cursor` (optional) | string | The `nextCursor` from the page before. |

This list can grow within `/v1`, so ignore any you don't recognise rather than failing on it. See [versioning](https://www.timesubmit.com/developers/versioning).

Example request. The key is read from `TIMESUBMIT_API_KEY`:

curl:

```bash
curl 'https://www.timesubmit.com/api/v1/invoices?kind=receivable' \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY"
```

JavaScript:

```javascript
const response = await fetch("https://www.timesubmit.com/api/v1/invoices?kind=receivable", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.TIMESUBMIT_API_KEY}`,
  },
});
const answer = await response.json();
```

Python:

```python
import os

import requests

response = requests.request(
    "GET",
    "https://www.timesubmit.com/api/v1/invoices?kind=receivable",
    headers={
        "Authorization": f"Bearer {os.environ['TIMESUBMIT_API_KEY']}",
    },
)
answer = response.json()
```

Example response, with status 200:

```json
{
  "data": [
    {
      "id": "p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a",
      "kind": "receivable",
      "invoiceNumber": "INV-0107",
      "status": "sent",
      "isOverdue": false,
      "daysPastDue": null,
      "currency": "GBP",
      "total": 9120,
      "invoiceDate": "2026-11-02T00:00:00.000Z",
      "issuedAt": "2026-11-02T00:00:00.000Z",
      "dueDate": "2026-12-02T00:00:00.000Z",
      "paidAt": null,
      "clientId": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
      "consultantId": null,
      "projectId": "k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t",
      "clientPurchaseOrderId": "q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j",
      "purchaseOrderNumber": "FL-PO-2291",
      "consultantPurchaseOrderNumbers": [],
      "createdAt": "2026-11-02T09:41:17.000Z",
      "updatedAt": "2026-11-02T10:05:42.000Z"
    }
  ],
  "nextCursor": "eyJjcmVhdGVkQXQiOjE3NjQwNjA4MDB9"
}
```

The [error codes](https://www.timesubmit.com/developers/errors) it can answer with:

- `unauthorised` (401)
- `api_not_included` (403)
- `insufficient_scope` (403)
- `invalid_request` (400)
- `rate_limited` (429)

### `GET /invoices/{id}`

**Read an invoice.** One invoice in full: its lines, totals and tax as printed, its client and purchase orders. There is no invoice write and no PDF. Needs the `invoices:read` scope. Succeeds with 200.

Example request. The key is read from `TIMESUBMIT_API_KEY`:

curl:

```bash
curl 'https://www.timesubmit.com/api/v1/invoices/p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a' \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY"
```

JavaScript:

```javascript
const response = await fetch("https://www.timesubmit.com/api/v1/invoices/p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.TIMESUBMIT_API_KEY}`,
  },
});
const answer = await response.json();
```

Python:

```python
import os

import requests

response = requests.request(
    "GET",
    "https://www.timesubmit.com/api/v1/invoices/p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a",
    headers={
        "Authorization": f"Bearer {os.environ['TIMESUBMIT_API_KEY']}",
    },
)
answer = response.json()
```

Example response, with status 200:

```json
{
  "id": "p15v8x2z5b9d3f7h1k4m6q0s3u5w8y2a",
  "kind": "receivable",
  "invoiceNumber": "INV-0107",
  "status": "sent",
  "isOverdue": false,
  "daysPastDue": null,
  "currency": "GBP",
  "total": 9120,
  "invoiceDate": "2026-11-02T00:00:00.000Z",
  "issuedAt": "2026-11-02T00:00:00.000Z",
  "dueDate": "2026-12-02T00:00:00.000Z",
  "paidAt": null,
  "clientId": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
  "consultantId": null,
  "projectId": "k93d6f1h8j2m5q7s0v4x6z9b3c1e8g2t",
  "clientPurchaseOrderId": "q47b1d4f8h2k6m9p3s5v7x0z4c6e9g1j",
  "purchaseOrderNumber": "FL-PO-2291",
  "consultantPurchaseOrderNumbers": [],
  "createdAt": "2026-11-02T09:41:17.000Z",
  "updatedAt": "2026-11-02T10:05:42.000Z",
  "client": {
    "id": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
    "name": "Fernhill Logistics Ltd"
  },
  "overBudgetReason": null,
  "notCoveredReason": null,
  "consultantPurchaseOrders": [],
  "subtotal": 7600,
  "taxLines": [
    {
      "name": "VAT",
      "rate": 20,
      "registrationNumber": "GB123456789",
      "amount": 1520
    }
  ],
  "lines": [
    {
      "description": "Warehouse Platform Migration, October: Tomasz Wierzbicki",
      "quantity": 10,
      "unit": "days",
      "unitPrice": 760,
      "amount": 7600,
      "currency": "GBP",
      "consultantId": "m24p7r9t3w6y8a1c5e0g2j4l7n9q3s6v"
    }
  ]
}
```

The [error codes](https://www.timesubmit.com/developers/errors) it can answer with:

- `unauthorised` (401)
- `api_not_included` (403)
- `insufficient_scope` (403)
- `not_found` (404)
- `rate_limited` (429)
- `unreadable_invoice` (500)
