Invoice Flow API
Read every supplier bill Invoice Flow handles for a business: what was read, the line items, where it went and the original PDF.
Introduction
The Invoice Flow API lets your own software read what Invoice Flow has done with a business's supplier bills: every invoice, credit note and receipt it has read, the line items, where each one was sent (Xero, QuickBooks, WorkflowMax) and the original PDF. Use it to build reports, keep another system in step, or feed a dashboard.
It's a REST API over HTTPS. Every answer is JSON, every request is a GET in this version, and every call needs a key.
Base URL: https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1
The full description is an OpenAPI 3.1 file. Load it into Postman, Insomnia or a code generator to get a client in your language.
Quick start
- Sign up and make an app. You get a test key (
if_test_…) straight away. Copy it: it's shown once. - Check it works:
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/ping -H "Authorization: Bearer if_test_…" - List the sandbox's latest documents:
curl "https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents?limit=5" -H "Authorization: Bearer if_test_…" - Get one with its line items:
GET /v1/documents/DOC-90001. - When it works, swap in a live key. An admin of the business makes one in Invoice Flow: Settings → Integrations → API keys. Nothing else in your code changes.
The sandbox
Test keys read a made-up business, "Sandbox Plumbing Co", with fixed documents you can write tests against: invoices sent to Xero and WorkflowMax, a receipt, a credit note, one waiting to be processed, one on hold, a duplicate, one Xero refused, one that needs checking, a deleted one and one still being read (DOC-90001 to DOC-90012). The answers are the same shape as live ones. The sandbox's file links all open the same sample PDF.
Authentication
Send the key in the Authorization header as a bearer token: Authorization: Bearer if_live_…. A missing, wrong or revoked key gets 401 invalid_api_key.
A key belongs to one business and can only reach that business. No endpoint takes a business id, and another business's document gets 404, the same as one that doesn't exist.
Keys are secrets. Keep them on a server or in a secrets manager, never in a web page, a mobile app or a public repository. If one is exposed, revoke it in Settings → Integrations → API keys (it stops working at once) and make a new one. Invoice Flow only stores a fingerprint (SHA-256) of each key, so we can't show it again.
Key types and scopes
| Prefix | Kind | What it can do |
|---|---|---|
if_live_… | Live business key | Reads the business's real documents. Scope documents:read. |
if_test_… | Test key | Reaches only the sandbox, a made-up business. From the developer portal, straight away. Scope documents:read. |
if_feed_… | Data partner key | Issued by Invoice Flow to approved data partners: reads only what businesses chose to share with that partner. Scope feed:read. |
A key without the scope an endpoint needs gets 403 missing_scope; a partner key on a business endpoint (or the other way round) gets 403 wrong_key_type.
Errors
Errors use the HTTP status and a JSON body. Check error.code: it's stable. error.message is for people and may change.
{
"error": {
"code": "not_found",
"message": "No document with that id.",
"request_id": "req_3f9a1c0d5e7b2a4c6d8e0f12",
"docs": "https://goinvoiceflow.com/developers"
}
}
| Status | Codes | What it means |
|---|---|---|
401 | invalid_api_key | The key is missing, wrong or revoked. |
403 | missing_scope, wrong_key_type, account_unavailable | The key can't do this, or the business's account isn't active. |
404 | not_found, no_file | No such endpoint or document for this business, or the document has no file. |
405 | method_not_allowed | Only GET in this version. |
422 | invalid_limit, invalid_status, invalid_type, invalid_cursor, invalid_updated_since, unknown_parameter… | A parameter isn't valid; the message says which. |
429 | rate_limited | Too many requests this minute. Wait for Retry-After seconds. |
500 | server_error | Something went wrong on our side. Safe to retry. |
503 | busy | Briefly busy. Retry after Retry-After seconds. |
Every response has a Request-Id header (also in error bodies as request_id). Include it when you contact support and we can find the request.
Rate limits
Each key can make 120 requests a minute. Every response tells you where you are:
| Header | Type | What it is |
|---|---|---|
X-RateLimit-Limit | integer | Requests allowed per minute. |
X-RateLimit-Remaining | integer | Requests left this minute. |
X-RateLimit-Reset | integer | Unix time (seconds) when the count starts again. |
Retry-After | integer | On 429 and 503: seconds to wait. |
Retry 429, 500 and 503 answers with a growing wait (for example 1, 2, 4, 8 seconds, plus a little randomness). Don't retry 4xx answers other than 429: they won't change.
Pagination
Lists return { "object": "list", "data": [...], "has_more": true, "next_cursor": "…" }. To get the next page, send the same request with
cursor=<next_cursor>. Keep the other parameters the same. limit is 1 to 100 (default 25). Cursors are opaque: don't build or change them.
Keeping another system in step
To copy documents into another system and keep them current, use updated_since: it lists documents changed at or after a time, oldest change first.
- First run: list with
updated_sinceset to the earliest time you care about, followingnext_cursoruntilhas_moreis false. - Remember the latest
updated_atyou saw. - Every few minutes, list again from that time (a minute earlier is safest), and upsert by
id.
A document's status follows it through Invoice Flow:
| Status | Meaning | |
|---|---|---|
reading | being read | |
to_process | read, waiting for a person to check and send it | |
on_hold | put on hold | |
duplicate | stopped as a duplicate | |
sending | on its way to the accounting system | |
sent | in the accounting system (and job system) | |
needs_checking | sent, but something needs a look (for example the PDF didn't reach the job) | |
send_failed | the accounting system refused it (see problem) | |
failed | couldn't be read (see problem) | |
split | a PDF that held several invoices; each is its own document (split_from) | |
deleted | deleted in Invoice Flow |
Deleted documents stay in the list with status deleted, so a sync can remove them too.
Versioning and changes
The version is in the path: /v1. Within v1 we only add: new endpoints, new optional parameters, new fields, and new values in lists such as
status and type. Write your code so an unknown field or value doesn't break it. Anything that would break an integration
(renaming or removing a field, changing a type) comes as /v2, announced at least six months before v1 changes.
Data use
A key reads one business's own records, and nothing else: no other business's data, no pooled figures, no lists synced from Xero, QuickBooks or WorkflowMax beyond what was chosen on each document, and no AI internals. Use the data only for that business and as its owner agrees. Using the API means agreeing to the Invoice Flow API terms.
Reference
Every endpoint, generated from the OpenAPI file. Paths are relative to https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1.
Keys
Check a key.
Check a key
GET /v1/ping
Says which business (or partner) the key belongs to, its mode and scopes. A good first call.
No parameters.
Errors
| Status | When | |
|---|---|---|
401 | The key is missing, wrong or revoked (invalid_api_key). | |
403 | The key can't do this: missing_scope, wrong_key_type (a partner key on a business endpoint or the other way round) or account_unavailable. | |
429 | Too many requests this minute (rate_limited). Wait for Retry-After seconds. | |
500 | Something went wrong on our side (server_error). Safe to retry; if it keeps happening, send us the request_id. |
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/ping \
-H "Authorization: Bearer $INVOICE_FLOW_KEY"
const res = await fetch("https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/ping", {
headers: { Authorization: `Bearer ${process.env.INVOICE_FLOW_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error.message);
const body = await res.json();
import os, requests
r = requests.get("https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/ping",
headers={"Authorization": f"Bearer {os.environ['INVOICE_FLOW_KEY']}"}, timeout=30)
r.raise_for_status()
body = r.json()
{
"object": "key",
"ok": true,
"mode": "live",
"key": {
"name": "Reporting script",
"prefix": "if_live_4f2a9c1e",
"scopes": [
"documents:read"
]
},
"business": {
"id": "IF-7K3M9Q",
"name": "Harbour Plumbing",
"country": "AU"
},
"partner": null
}Response fields
The key is valid.
| Field | Type | What it is |
|---|---|---|
object | "key" | |
ok | true | |
mode | string | live or test. One of: live, test. |
key | object | |
key.name | string | The name given when it was made. |
key.prefix | string | The key's first characters. |
key.scopes | array of string | |
business | object, or null | For a business key. |
business.id | string | The Invoice Flow business ID. |
business.name | string | The business's name. |
business.country | string | AU, NZ or GB. |
business.sandbox | boolean | True for the sandbox (test keys): made-up documents. |
app | object, or null | For a developer portal key: the app it belongs to. |
app.name | string | The app's name. |
partner | object, or null | For a data partner key. |
partner.name | string | Your organisation. |
Status
Whether the API is up. No key needed.
API status
GET /v1/status
Whether the API and its database are answering. No key needed and not counted against any rate limit. Poll it at most once a minute.
No parameters.
Errors
| Status | When | |
|---|---|---|
503 | Not answering properly (status is degraded). |
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/status \
-H "Authorization: Bearer $INVOICE_FLOW_KEY"
const res = await fetch("https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/status", {
headers: { Authorization: `Bearer ${process.env.INVOICE_FLOW_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error.message);
const body = await res.json();
import os, requests
r = requests.get("https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/status",
headers={"Authorization": f"Bearer {os.environ['INVOICE_FLOW_KEY']}"}, timeout=30)
r.raise_for_status()
body = r.json()
{}Response fields
Up.
| Field | Type | What it is |
|---|---|---|
object | "status" | |
status | string | ok, or degraded when the database isn't answering. One of: ok, degraded. |
version | string | The API version. |
checked_at | string (date-time) | When this was checked. |
database_ms | integer, or null | How long the database took to answer, in milliseconds. |
Documents
Supplier invoices, credit notes, receipts and statements, with their line items and files.
List documents
GET /v1/documents
Newest first. With updated_since, documents changed at or after that time, oldest change first, which is the way to keep another system in step: store the time you last asked, and ask again from it. Pages are joined with cursor.
Parameters
| Name | Type | What it is |
|---|---|---|
limit | integer, default 25 | How many to return, 1 to 100. |
cursor | string | The next_cursor from the previous page. Keep the other parameters the same. |
status | string | Only documents with this status. One of: reading, to_process, on_hold, duplicate, sending, sent, needs_checking, send_failed, failed, split, deleted. |
type | string | Only documents of this type. One of: invoice, credit_note, receipt, statement, other. |
updated_since | string (date-time) | ISO 8601 date and time. Only documents changed at or after it, oldest change first. |
Errors
| Status | When | |
|---|---|---|
401 | The key is missing, wrong or revoked (invalid_api_key). | |
403 | The key can't do this: missing_scope, wrong_key_type (a partner key on a business endpoint or the other way round) or account_unavailable. | |
422 | A parameter isn't valid. code says which, for example invalid_limit or invalid_cursor. | |
429 | Too many requests this minute (rate_limited). Wait for Retry-After seconds. | |
500 | Something went wrong on our side (server_error). Safe to retry; if it keeps happening, send us the request_id. |
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents?limit=25 \
-H "Authorization: Bearer $INVOICE_FLOW_KEY"
const res = await fetch("https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents?limit=25", {
headers: { Authorization: `Bearer ${process.env.INVOICE_FLOW_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error.message);
const body = await res.json();
import os, requests
r = requests.get("https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents?limit=25",
headers={"Authorization": f"Bearer {os.environ['INVOICE_FLOW_KEY']}"}, timeout=30)
r.raise_for_status()
body = r.json()
{
"object": "list",
"data": [
{
"object": "document",
"id": "5f0c2a8e-3b1d-4c6e-9a7f-1d2e3f4a5b6c",
"number": "DOC-10123",
"type": "invoice",
"status": "sent",
"received_at": "2026-11-27T22:14:03.512Z",
"updated_at": "2026-11-27T22:31:40.006Z",
"source": "email",
"file": {
"name": "INV-58821.pdf",
"content_type": "application/pdf",
"pages": 1
},
"supplier": {
"name": "Reece Plumbing",
"printed_name": "Reece Pty Ltd",
"tax_number": "84004313795"
},
"invoice_number": "58821",
"reference": "PO-1044",
"invoice_date": "2026-11-26",
"due_date": "2026-12-31",
"currency": "AUD",
"amounts_are": "exclusive",
"subtotal": 412.5,
"tax": 41.25,
"total": 453.75,
"confidence": 0.97,
"unsure_fields": [],
"sent_to": {
"accounting": {
"system": "xero",
"bill_id": "8b3e1f20-6c4a-4d2b-9e7f-0a1b2c3d4e5f",
"status": "DRAFT",
"organisation": "Harbour Plumbing Pty Ltd"
},
"job_system": "workflowmax",
"sent_at": "2026-11-27T22:31:39.874Z"
},
"problem": null,
"split_from": null,
"deleted_at": null
}
],
"has_more": true,
"next_cursor": "eyJtIjoiYyIsInQiOiIyMDI2LTExLTI3VDIyOjE0OjAzLjUxMloiLCJpIjoiNWYwYy4uLiJ9"
}Response fields
A page of documents (without line items).
| Field | Type | What it is |
|---|---|---|
object | "list" | |
data | array of DocumentSummary | |
has_more | boolean | True when there's another page. |
next_cursor | string, or null | Pass as cursor for the next page. |
Get a document
GET /v1/documents/{id}
One document, with its line items.
Parameters
| Name | Type | What it is |
|---|---|---|
id (in the path) | string | The document's id (a UUID) or its number, like DOC-10123. |
Errors
| Status | When | |
|---|---|---|
401 | The key is missing, wrong or revoked (invalid_api_key). | |
403 | The key can't do this: missing_scope, wrong_key_type (a partner key on a business endpoint or the other way round) or account_unavailable. | |
404 | No such document for this business (not_found), or it has no file (no_file). | |
429 | Too many requests this minute (rate_limited). Wait for Retry-After seconds. | |
500 | Something went wrong on our side (server_error). Safe to retry; if it keeps happening, send us the request_id. |
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents/DOC-10123 \
-H "Authorization: Bearer $INVOICE_FLOW_KEY"
const res = await fetch("https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents/DOC-10123", {
headers: { Authorization: `Bearer ${process.env.INVOICE_FLOW_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error.message);
const body = await res.json();
import os, requests
r = requests.get("https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents/DOC-10123",
headers={"Authorization": f"Bearer {os.environ['INVOICE_FLOW_KEY']}"}, timeout=30)
r.raise_for_status()
body = r.json()
{
"object": "document",
"id": "5f0c2a8e-3b1d-4c6e-9a7f-1d2e3f4a5b6c",
"number": "DOC-10123",
"type": "invoice",
"status": "sent",
"received_at": "2026-11-27T22:14:03.512Z",
"updated_at": "2026-11-27T22:31:40.006Z",
"source": "email",
"file": {
"name": "INV-58821.pdf",
"content_type": "application/pdf",
"pages": 1
},
"supplier": {
"name": "Reece Plumbing",
"printed_name": "Reece Pty Ltd",
"tax_number": "84004313795"
},
"invoice_number": "58821",
"reference": "PO-1044",
"invoice_date": "2026-11-26",
"due_date": "2026-12-31",
"currency": "AUD",
"amounts_are": "exclusive",
"subtotal": 412.5,
"tax": 41.25,
"total": 453.75,
"confidence": 0.97,
"unsure_fields": [],
"sent_to": {
"accounting": {
"system": "xero",
"bill_id": "8b3e1f20-6c4a-4d2b-9e7f-0a1b2c3d4e5f",
"status": "DRAFT",
"organisation": "Harbour Plumbing Pty Ltd"
},
"job_system": "workflowmax",
"sent_at": "2026-11-27T22:31:39.874Z"
},
"problem": null,
"split_from": null,
"deleted_at": null,
"lines": [
{
"object": "line_item",
"id": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
"position": 1,
"description": "Copper pipe 15mm x 6m",
"quantity": 10,
"unit_price": 41.25,
"list_price": null,
"discount_pct": null,
"amount": 412.5,
"tax_amount": 41.25,
"account_code": "310",
"tax_type": "INPUT",
"product_code": "CU15-6",
"tracking": [
{
"category": "Region",
"option": "North"
}
],
"job": {
"number": "J000412",
"name": "Bondi bathroom"
},
"cost_code": "MAT",
"phase": null,
"billable_amount": 474.38
}
]
}Response fields
The document.
| Field | Type | What it is |
|---|---|---|
object | "document" | |
id | string (uuid) | Never changes. |
number | string, or null | Invoice Flow's document number, unique across Invoice Flow. |
type | string, or null | Null while it's still being read. One of: invoice, credit_note, receipt, statement, other. |
status | string | Where it is in Invoice Flow: • reading: being read • to_process: read, waiting for a person to check and send it • on_hold: put on hold • duplicate: stopped as a duplicate • sending: on its way to the accounting system • sent: in the accounting system (and job system) • needs_checking: sent, but something needs a look (for example the PDF didn't reach the job) • send_failed: the accounting system refused it (see problem) • failed: couldn't be read (see problem) • split: a PDF that held several invoices; each is its own document (split_from) • deleted: deleted in Invoice Flow New values may be added within v1. |
received_at | string (date-time) | When it arrived. |
updated_at | string (date-time) | When anything about it last changed. |
source | string, or null | How it arrived, for example email or upload. |
file | object | |
file.name | string, or null | The file's name. |
file.content_type | string, or null | For example application/pdf. |
file.pages | integer, or null | Pages in the file. |
supplier | object | |
supplier.name | string, or null | The supplier, as matched in the accounting system (else as printed). |
supplier.printed_name | string, or null | The name printed on the document. |
supplier.tax_number | string, or null | The supplier's ABN, NZ GST number or UK VAT number, as printed. |
invoice_number | string, or null | As printed. |
reference | string, or null | Purchase order or reference, as printed. |
invoice_date | string, or null (date) | Date on the document. |
due_date | string, or null (date) | Due date. |
currency | string, or null | ISO 4217 code. |
amounts_are | string, or null | Whether line amounts include tax. One of: exclusive, inclusive, no_tax. |
subtotal | number, or null | Total before tax. |
tax | number, or null | GST / VAT. |
total | number, or null | Total including tax. Credit notes are positive. |
confidence | number, or null | How sure the reading was, 0 to 1. |
unsure_fields | array of string | Fields the reading was unsure of, for example due_date. |
sent_to | object, or null | Set once sent. |
sent_to.accounting | object | |
sent_to.accounting.system | string | xero or quickbooks. One of: xero, quickbooks. |
sent_to.accounting.bill_id | string, or null | The bill's id in that system (Xero InvoiceID, QuickBooks Bill or VendorCredit Id). |
sent_to.accounting.status | string, or null | Its status there when sent, in that system's words. |
sent_to.accounting.organisation | string, or null | The organisation or company it went to. |
sent_to.job_system | string, or null | workflowmax when job costs were sent too. One of: workflowmax. |
sent_to.sent_at | string, or null (date-time) | When it was sent. |
problem | string, or null | What went wrong, in plain words (failed, send_failed and needs_checking). |
split_from | string, or null (uuid) | For an invoice split out of a PDF that held several: that PDF's document id. |
deleted_at | string, or null (date-time) | When it was deleted. |
lines | array of LineItem |
List a document's line items
GET /v1/documents/{id}/lines
In order. All of them in one page.
Parameters
| Name | Type | What it is |
|---|---|---|
id (in the path) | string | The document's id (a UUID) or its number, like DOC-10123. |
Errors
| Status | When | |
|---|---|---|
401 | The key is missing, wrong or revoked (invalid_api_key). | |
403 | The key can't do this: missing_scope, wrong_key_type (a partner key on a business endpoint or the other way round) or account_unavailable. | |
404 | No such document for this business (not_found), or it has no file (no_file). | |
429 | Too many requests this minute (rate_limited). Wait for Retry-After seconds. | |
500 | Something went wrong on our side (server_error). Safe to retry; if it keeps happening, send us the request_id. |
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents/DOC-10123/lines \
-H "Authorization: Bearer $INVOICE_FLOW_KEY"
const res = await fetch("https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents/DOC-10123/lines", {
headers: { Authorization: `Bearer ${process.env.INVOICE_FLOW_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error.message);
const body = await res.json();
import os, requests
r = requests.get("https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents/DOC-10123/lines",
headers={"Authorization": f"Bearer {os.environ['INVOICE_FLOW_KEY']}"}, timeout=30)
r.raise_for_status()
body = r.json()
{
"object": "list",
"data": [
{
"object": "line_item",
"id": "9a1b2c3d-4e5f-4a6b-8c7d-0e1f2a3b4c5d",
"position": 1,
"description": "Copper pipe 15mm x 6m",
"quantity": 10,
"unit_price": 41.25,
"list_price": null,
"discount_pct": null,
"amount": 412.5,
"tax_amount": 41.25,
"account_code": "310",
"tax_type": "INPUT",
"product_code": "CU15-6",
"tracking": [
{
"category": "Region",
"option": "North"
}
],
"job": {
"number": "J000412",
"name": "Bondi bathroom"
},
"cost_code": "MAT",
"phase": null,
"billable_amount": 474.38
}
],
"has_more": false,
"next_cursor": null
}Response fields
The line items.
| Field | Type | What it is |
|---|---|---|
object | "list" | |
data | array of LineItem | |
has_more | false | |
next_cursor | null |
Download the original file
GET /v1/documents/{id}/file
A link to the original PDF or image, valid for 5 minutes. Ask again for a new one.
Parameters
| Name | Type | What it is |
|---|---|---|
id (in the path) | string | The document's id (a UUID) or its number, like DOC-10123. |
Errors
| Status | When | |
|---|---|---|
401 | The key is missing, wrong or revoked (invalid_api_key). | |
403 | The key can't do this: missing_scope, wrong_key_type (a partner key on a business endpoint or the other way round) or account_unavailable. | |
404 | No such document for this business (not_found), or it has no file (no_file). | |
429 | Too many requests this minute (rate_limited). Wait for Retry-After seconds. | |
500 | Something went wrong on our side (server_error). Safe to retry; if it keeps happening, send us the request_id. |
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents/DOC-10123/file \
-H "Authorization: Bearer $INVOICE_FLOW_KEY"
const res = await fetch("https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents/DOC-10123/file", {
headers: { Authorization: `Bearer ${process.env.INVOICE_FLOW_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error.message);
const body = await res.json();
import os, requests
r = requests.get("https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents/DOC-10123/file",
headers={"Authorization": f"Bearer {os.environ['INVOICE_FLOW_KEY']}"}, timeout=30)
r.raise_for_status()
body = r.json()
{
"object": "file",
"document_id": "5f0c2a8e-3b1d-4c6e-9a7f-1d2e3f4a5b6c",
"name": "INV-58821.pdf",
"content_type": "application/pdf",
"url": "https://…/storage/v1/object/sign/…",
"expires_at": "2026-11-28T03:05:00.000Z",
"document_status": "sent"
}Response fields
A download link.
| Field | Type | What it is |
|---|---|---|
object | "file" | |
document_id | string (uuid) | The document. |
name | string, or null | File name. |
content_type | string, or null | MIME type. |
url | string (uri) | Download link. |
expires_at | string (date-time) | The link stops working at this time. |
document_status | string | The document's status. One of: reading, to_process, on_hold, duplicate, sending, sent, needs_checking, send_failed, failed, split, deleted. |
Data partners
For approved data partners only (if_feed_ keys): the feed of documents that businesses chose to share with them.
Businesses sharing with you
GET /v1/partner/businesses
Every business that chose to share with your organisation, including ones that stopped (sharing false).
No parameters.
Errors
| Status | When | |
|---|---|---|
401 | The key is missing, wrong or revoked (invalid_api_key). | |
403 | The key can't do this: missing_scope, wrong_key_type (a partner key on a business endpoint or the other way round) or account_unavailable. | |
429 | Too many requests this minute (rate_limited). Wait for Retry-After seconds. | |
500 | Something went wrong on our side (server_error). Safe to retry; if it keeps happening, send us the request_id. |
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/partner/businesses \
-H "Authorization: Bearer $INVOICE_FLOW_FEED_KEY"
const res = await fetch("https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/partner/businesses", {
headers: { Authorization: `Bearer ${process.env.INVOICE_FLOW_FEED_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error.message);
const body = await res.json();
import os, requests
r = requests.get("https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/partner/businesses",
headers={"Authorization": f"Bearer {os.environ['INVOICE_FLOW_FEED_KEY']}"}, timeout=30)
r.raise_for_status()
body = r.json()
{
"object": "list",
"data": [
{
"business_id": "IF-7K3M9Q",
"member_ref": "AG-1203",
"area": "Powys",
"country": "GB",
"sharing": true,
"shared_from": "2026-01-01",
"since": "2026-11-28T09:00:00Z",
"stopped_at": null
}
],
"has_more": false,
"next_cursor": null
}Response fields
The businesses.
| Field | Type | What it is |
|---|---|---|
object | "list" | |
data | array of object | |
has_more | false | |
next_cursor | null |
The sharing feed
GET /v1/partner/feed
Changes in order. Start with after=0, then pass next_after until has_more is false; keep the last next_after and carry on from it next time. document = add or replace by document_id; document.removed = delete your copy; business.sharing_stopped = the business stopped sharing: delete what you hold for it, as your agreement says.
Parameters
| Name | Type | What it is |
|---|---|---|
after | integer, default 0 | The next_after from the last page (0 to start). |
limit | integer, default 100 | 1 to 500. |
Errors
| Status | When | |
|---|---|---|
401 | The key is missing, wrong or revoked (invalid_api_key). | |
403 | The key can't do this: missing_scope, wrong_key_type (a partner key on a business endpoint or the other way round) or account_unavailable. | |
422 | A parameter isn't valid. code says which, for example invalid_limit or invalid_cursor. | |
429 | Too many requests this minute (rate_limited). Wait for Retry-After seconds. | |
500 | Something went wrong on our side (server_error). Safe to retry; if it keeps happening, send us the request_id. |
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/partner/feed?after=0 \
-H "Authorization: Bearer $INVOICE_FLOW_FEED_KEY"
const res = await fetch("https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/partner/feed?after=0", {
headers: { Authorization: `Bearer ${process.env.INVOICE_FLOW_FEED_KEY}` },
});
if (!res.ok) throw new Error((await res.json()).error.message);
const body = await res.json();
import os, requests
r = requests.get("https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/partner/feed?after=0",
headers={"Authorization": f"Bearer {os.environ['INVOICE_FLOW_FEED_KEY']}"}, timeout=30)
r.raise_for_status()
body = r.json()
{
"object": "feed_page",
"items": [
{
"seq": 42,
"type": "document",
"at": "2026-11-28T09:12:00Z",
"business_id": "IF-7K3M9Q",
"document_id": "5f0c2a8e-3b1d-4c6e-9a7f-1d2e3f4a5b6c",
"document": {
"…": "…"
}
}
],
"next_after": 42,
"has_more": false
}Response fields
A page of the feed.
| Field | Type | What it is |
|---|---|---|
object | "feed_page" | |
items | array of object | |
next_after | integer | Pass as after next time. |
has_more | boolean | True when there's more now. |
Objects
LineItem
| Field | Type | What it is |
|---|---|---|
object | "line_item" | |
id | string (uuid) | The line's id. |
position | integer, or null | 1, 2, 3… in order. |
description | string, or null | As sent (or as read, before sending). |
quantity | number, or null | Quantity. |
unit_price | number, or null | Price per unit after any discount. |
list_price | number, or null | The printed price before a line discount. |
discount_pct | number, or null | Line discount, percent. |
amount | number, or null | Line amount (with or without tax, see amounts_are). |
tax_amount | number, or null | Tax on the line. |
account_code | string, or null | The account chosen (QuickBooks: the account's id). |
tax_type | string, or null | The tax rate chosen, as the accounting system names it. |
product_code | string, or null | The product or item code chosen. |
tracking | array of object | Xero tracking, or QuickBooks class and location. |
job | object, or null | The WorkflowMax job. |
job.number | string, or null | Job number. |
job.name | string, or null | Job name. |
cost_code | string, or null | The WorkflowMax cost code. |
phase | string, or null | The WorkflowMax phase. |
billable_amount | number, or null | The billable amount with markup (WorkflowMax). |
Support
Email support@goinvoiceflow.com with the request_id of the request, what you sent and what you expected.