Developers Sign inGet a test key
Docs

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.

Version 1.1.0 · Early access · Updated 28 November 2026 · OpenAPI 3.1

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.

Early access. Sign up and you get a test key straight away, which reads the sandbox: a made-up business with documents in every status. Live keys for a business's real documents are being switched on business by business; if you'd like them for your business, email support@goinvoiceflow.com.

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

  1. Sign up and make an app. You get a test key (if_test_…) straight away. Copy it: it's shown once.
  2. Check it works:
    curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/ping -H "Authorization: Bearer if_test_…"
  3. List the sandbox's latest documents:
    curl "https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents?limit=5" -H "Authorization: Bearer if_test_…"
  4. Get one with its line items: GET /v1/documents/DOC-90001.
  5. 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

PrefixKindWhat it can do
if_live_…Live business keyReads the business's real documents. Scope documents:read.
if_test_…Test keyReaches only the sandbox, a made-up business. From the developer portal, straight away. Scope documents:read.
if_feed_…Data partner keyIssued 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"
  }
}
StatusCodesWhat it means
401invalid_api_keyThe key is missing, wrong or revoked.
403missing_scope, wrong_key_type, account_unavailableThe key can't do this, or the business's account isn't active.
404not_found, no_fileNo such endpoint or document for this business, or the document has no file.
405method_not_allowedOnly GET in this version.
422invalid_limit, invalid_status, invalid_type, invalid_cursor, invalid_updated_since, unknown_parameter…A parameter isn't valid; the message says which.
429rate_limitedToo many requests this minute. Wait for Retry-After seconds.
500server_errorSomething went wrong on our side. Safe to retry.
503busyBriefly 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:

HeaderTypeWhat it is
X-RateLimit-LimitintegerRequests allowed per minute.
X-RateLimit-RemainingintegerRequests left this minute.
X-RateLimit-ResetintegerUnix time (seconds) when the count starts again.
Retry-AfterintegerOn 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.

  1. First run: list with updated_since set to the earliest time you care about, following next_cursor until has_more is false.
  2. Remember the latest updated_at you saw.
  3. 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:

StatusMeaning
readingbeing read
to_processread, waiting for a person to check and send it
on_holdput on hold
duplicatestopped as a duplicate
sendingon its way to the accounting system
sentin the accounting system (and job system)
needs_checkingsent, but something needs a look (for example the PDF didn't reach the job)
send_failedthe accounting system refused it (see problem)
failedcouldn't be read (see problem)
splita PDF that held several invoices; each is its own document (split_from)
deleteddeleted 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

StatusWhen
401The key is missing, wrong or revoked (invalid_api_key).
403The 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.
429Too many requests this minute (rate_limited). Wait for Retry-After seconds.
500Something went wrong on our side (server_error). Safe to retry; if it keeps happening, send us the request_id.
curl
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/ping \
  -H "Authorization: Bearer $INVOICE_FLOW_KEY"
JavaScript (Node 18+)
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();
Python
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()
Response
{
  "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.

FieldTypeWhat it is
object"key"
oktrue
modestringlive or test.
One of: live, test.
keyobject
key.namestringThe name given when it was made.
key.prefixstringThe key's first characters.
key.scopesarray of string
businessobject, or nullFor a business key.
business.idstringThe Invoice Flow business ID.
business.namestringThe business's name.
business.countrystringAU, NZ or GB.
business.sandboxbooleanTrue for the sandbox (test keys): made-up documents.
appobject, or nullFor a developer portal key: the app it belongs to.
app.namestringThe app's name.
partnerobject, or nullFor a data partner key.
partner.namestringYour 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

StatusWhen
503Not answering properly (status is degraded).
curl
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/status \
  -H "Authorization: Bearer $INVOICE_FLOW_KEY"
JavaScript (Node 18+)
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();
Python
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
{}

Response fields

Up.

FieldTypeWhat it is
object"status"
statusstringok, or degraded when the database isn't answering.
One of: ok, degraded.
versionstringThe API version.
checked_atstring (date-time)When this was checked.
database_msinteger, or nullHow 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

NameTypeWhat it is
limitinteger, default 25How many to return, 1 to 100.
cursorstringThe next_cursor from the previous page. Keep the other parameters the same.
statusstringOnly documents with this status.
One of: reading, to_process, on_hold, duplicate, sending, sent, needs_checking, send_failed, failed, split, deleted.
typestringOnly documents of this type.
One of: invoice, credit_note, receipt, statement, other.
updated_sincestring (date-time)ISO 8601 date and time. Only documents changed at or after it, oldest change first.

Errors

StatusWhen
401The key is missing, wrong or revoked (invalid_api_key).
403The 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.
422A parameter isn't valid. code says which, for example invalid_limit or invalid_cursor.
429Too many requests this minute (rate_limited). Wait for Retry-After seconds.
500Something went wrong on our side (server_error). Safe to retry; if it keeps happening, send us the request_id.
curl
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents?limit=25 \
  -H "Authorization: Bearer $INVOICE_FLOW_KEY"
JavaScript (Node 18+)
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();
Python
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()
Response
{
  "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).

FieldTypeWhat it is
object"list"
dataarray of DocumentSummary
has_morebooleanTrue when there's another page.
next_cursorstring, or nullPass as cursor for the next page.

Get a document

GET /v1/documents/{id}

One document, with its line items.

Parameters

NameTypeWhat it is
id (in the path)stringThe document's id (a UUID) or its number, like DOC-10123.

Errors

StatusWhen
401The key is missing, wrong or revoked (invalid_api_key).
403The 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.
404No such document for this business (not_found), or it has no file (no_file).
429Too many requests this minute (rate_limited). Wait for Retry-After seconds.
500Something went wrong on our side (server_error). Safe to retry; if it keeps happening, send us the request_id.
curl
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents/DOC-10123 \
  -H "Authorization: Bearer $INVOICE_FLOW_KEY"
JavaScript (Node 18+)
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();
Python
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()
Response
{
  "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.

FieldTypeWhat it is
object"document"
idstring (uuid)Never changes.
numberstring, or nullInvoice Flow's document number, unique across Invoice Flow.
typestring, or nullNull while it's still being read.
One of: invoice, credit_note, receipt, statement, other.
statusstringWhere 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_atstring (date-time)When it arrived.
updated_atstring (date-time)When anything about it last changed.
sourcestring, or nullHow it arrived, for example email or upload.
fileobject
file.namestring, or nullThe file's name.
file.content_typestring, or nullFor example application/pdf.
file.pagesinteger, or nullPages in the file.
supplierobject
supplier.namestring, or nullThe supplier, as matched in the accounting system (else as printed).
supplier.printed_namestring, or nullThe name printed on the document.
supplier.tax_numberstring, or nullThe supplier's ABN, NZ GST number or UK VAT number, as printed.
invoice_numberstring, or nullAs printed.
referencestring, or nullPurchase order or reference, as printed.
invoice_datestring, or null (date)Date on the document.
due_datestring, or null (date)Due date.
currencystring, or nullISO 4217 code.
amounts_arestring, or nullWhether line amounts include tax.
One of: exclusive, inclusive, no_tax.
subtotalnumber, or nullTotal before tax.
taxnumber, or nullGST / VAT.
totalnumber, or nullTotal including tax. Credit notes are positive.
confidencenumber, or nullHow sure the reading was, 0 to 1.
unsure_fieldsarray of stringFields the reading was unsure of, for example due_date.
sent_toobject, or nullSet once sent.
sent_to.accountingobject
sent_to.accounting.systemstringxero or quickbooks.
One of: xero, quickbooks.
sent_to.accounting.bill_idstring, or nullThe bill's id in that system (Xero InvoiceID, QuickBooks Bill or VendorCredit Id).
sent_to.accounting.statusstring, or nullIts status there when sent, in that system's words.
sent_to.accounting.organisationstring, or nullThe organisation or company it went to.
sent_to.job_systemstring, or nullworkflowmax when job costs were sent too.
One of: workflowmax.
sent_to.sent_atstring, or null (date-time)When it was sent.
problemstring, or nullWhat went wrong, in plain words (failed, send_failed and needs_checking).
split_fromstring, or null (uuid)For an invoice split out of a PDF that held several: that PDF's document id.
deleted_atstring, or null (date-time)When it was deleted.
linesarray of LineItem

List a document's line items

GET /v1/documents/{id}/lines

In order. All of them in one page.

Parameters

NameTypeWhat it is
id (in the path)stringThe document's id (a UUID) or its number, like DOC-10123.

Errors

StatusWhen
401The key is missing, wrong or revoked (invalid_api_key).
403The 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.
404No such document for this business (not_found), or it has no file (no_file).
429Too many requests this minute (rate_limited). Wait for Retry-After seconds.
500Something went wrong on our side (server_error). Safe to retry; if it keeps happening, send us the request_id.
curl
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents/DOC-10123/lines \
  -H "Authorization: Bearer $INVOICE_FLOW_KEY"
JavaScript (Node 18+)
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();
Python
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()
Response
{
  "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.

FieldTypeWhat it is
object"list"
dataarray of LineItem
has_morefalse
next_cursornull

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

NameTypeWhat it is
id (in the path)stringThe document's id (a UUID) or its number, like DOC-10123.

Errors

StatusWhen
401The key is missing, wrong or revoked (invalid_api_key).
403The 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.
404No such document for this business (not_found), or it has no file (no_file).
429Too many requests this minute (rate_limited). Wait for Retry-After seconds.
500Something went wrong on our side (server_error). Safe to retry; if it keeps happening, send us the request_id.
curl
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/documents/DOC-10123/file \
  -H "Authorization: Bearer $INVOICE_FLOW_KEY"
JavaScript (Node 18+)
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();
Python
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()
Response
{
  "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.

FieldTypeWhat it is
object"file"
document_idstring (uuid)The document.
namestring, or nullFile name.
content_typestring, or nullMIME type.
urlstring (uri)Download link.
expires_atstring (date-time)The link stops working at this time.
document_statusstringThe 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

StatusWhen
401The key is missing, wrong or revoked (invalid_api_key).
403The 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.
429Too many requests this minute (rate_limited). Wait for Retry-After seconds.
500Something went wrong on our side (server_error). Safe to retry; if it keeps happening, send us the request_id.
curl
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/partner/businesses \
  -H "Authorization: Bearer $INVOICE_FLOW_FEED_KEY"
JavaScript (Node 18+)
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();
Python
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()
Response
{
  "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.

FieldTypeWhat it is
object"list"
dataarray of object
has_morefalse
next_cursornull

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

NameTypeWhat it is
afterinteger, default 0The next_after from the last page (0 to start).
limitinteger, default 1001 to 500.

Errors

StatusWhen
401The key is missing, wrong or revoked (invalid_api_key).
403The 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.
422A parameter isn't valid. code says which, for example invalid_limit or invalid_cursor.
429Too many requests this minute (rate_limited). Wait for Retry-After seconds.
500Something went wrong on our side (server_error). Safe to retry; if it keeps happening, send us the request_id.
curl
curl https://jqrnxvdvcfrzamziofsb.supabase.co/functions/v1/ap-api/v1/partner/feed?after=0 \
  -H "Authorization: Bearer $INVOICE_FLOW_FEED_KEY"
JavaScript (Node 18+)
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();
Python
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()
Response
{
  "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.

FieldTypeWhat it is
object"feed_page"
itemsarray of object
next_afterintegerPass as after next time.
has_morebooleanTrue when there's more now.

Objects

LineItem

FieldTypeWhat it is
object"line_item"
idstring (uuid)The line's id.
positioninteger, or null1, 2, 3… in order.
descriptionstring, or nullAs sent (or as read, before sending).
quantitynumber, or nullQuantity.
unit_pricenumber, or nullPrice per unit after any discount.
list_pricenumber, or nullThe printed price before a line discount.
discount_pctnumber, or nullLine discount, percent.
amountnumber, or nullLine amount (with or without tax, see amounts_are).
tax_amountnumber, or nullTax on the line.
account_codestring, or nullThe account chosen (QuickBooks: the account's id).
tax_typestring, or nullThe tax rate chosen, as the accounting system names it.
product_codestring, or nullThe product or item code chosen.
trackingarray of objectXero tracking, or QuickBooks class and location.
jobobject, or nullThe WorkflowMax job.
job.numberstring, or nullJob number.
job.namestring, or nullJob name.
cost_codestring, or nullThe WorkflowMax cost code.
phasestring, or nullThe WorkflowMax phase.
billable_amountnumber, or nullThe billable amount with markup (WorkflowMax).

Support

Email support@goinvoiceflow.com with the request_id of the request, what you sent and what you expected.