Developers
API referenceReferenceDocuments

Documents - List

List accounting documents for the selected business. Supports search and extensive filtering (including account type, date range, draft/flag state, tags, attachments, ACCRUAL_PAIR due mismatch, and bank-account mismatches). Numeric `search` values also match entry amounts. Use `number` for deterministic lookup when the document number is known. By default list `relation_network_signals` include mismatch flags only. Pass `include_relation_network=true` (not with `view=list`) to also populate ACCRUAL_PAIR / SALARY_PAYMENT due_effect, invoice_total, and payment_total on the current page after pagination. The following fields are searched: | field | match mode | |--------------------------------|--------------| | `number` | prefix | | `description` | contains | | `contact__name` | contains | | `contact__name_aliases` | contains | | `contact__contact_business_id` | prefix | | `import_data__contact_hint` | contains |

GET
/v1/business/{business_slug}/document/

Path Parameters

business_slug*string

Business slug that scopes this request. If you do not have one yet, call common_accessible_businesses_list and pick a slug from the response.

Query Parameters

account?number

Filter documents by account ID.

account_type?string

Filter documents that include at least one entry matching the provided account type. The parameter can be repeated, e.g. account_type=ASS_DUE&account_type=LIA_DUE. Values must be valid AccountType enum values. Use account_type_match=all to require every provided type to be present on the same document.

account_type_match?string

Controls how repeated account_type values are combined. Use 'any' (default) or 'all'.

attachment_exempt?boolean

Filter documents marked as not needing an attachment. Pass true for documents that are complete without a receipt.

contact?number

Filter documents by contact ID.

date_from?string

Filter documents from this date onwards. Date is inclusive.

Formatdate
date_to?string

Filter documents up to this date. Date is inclusive.

Formatdate
expense?boolean

Filter documents that have expense entries.

file?integer

Filter documents by attachment ID.

has_attachments?boolean

Filter documents that have attachments.

has_bank_mismatch?boolean

Filter documents by bank-account amount mismatch. Pass true for bank transactions whose booked amount does not match the bank transaction amount. Pass false to exclude those documents.

has_due_mismatch?boolean

Filter documents by ACCRUAL_PAIR due-amount mismatch (the list warning icon). Pass true for documents whose linked invoice/payment network does not net to zero. Pass false to exclude those documents.

has_rule?boolean

Filter documents that have an accounting rule.

include_relation_network?boolean

When true, annotate ACCRUAL_PAIR / SALARY_PAYMENT network due_effect, invoice_total, and payment_total on the current page after pagination. Ignored when view=list. Default list responses keep mismatch flags only.

income?boolean

Filter documents that have income entries.

is_draft?boolean

Filter documents by draft status.

is_flagged?boolean

Filter documents by flagged status.

is_linked?boolean

Filter documents by whether they are linked to another document via a relation. Pass true for linked documents and false for unlinked documents.

is_locked?boolean

Filter documents by locked status.

missing_attachment?boolean

Filter documents that still need an attachment. Pass true for documents with no attachment that are not marked as not needing one. Pass false for documents that have an attachment or are marked as not needing one.

number?string

Filter documents by exact document number. Use this when the document number is known.

ordering?string

Order by one or more comma-separated fields. Allowed fields: date, created_at. Prefix a field with - for descending order. Rows with equal values are ordered by -id.

page?integer

A page number within the paginated result set.

page_size?integer

Number of results to return per page.

relation_role?string

Filter linked documents by the role the document plays in its relations, e.g. relation_role=ACCRUAL or relation_role=SETTLEMENT. Values must be valid DocumentRelationRole values. Unknown values yield an empty result set (HTTP 200), not a 400.

rule?number

Filter documents by accounting rule ID.

search?string

A search term.

tagged?number

Filter documents by user ID tagged in comments.

tags?integer

Filter documents by tag ID.

vat_code?number

Filter documents that include at least one entry with the provided VAT code.

vat_rate?number

Filter documents that include at least one entry with the provided VAT rate.

Response Body

application/json

curl -X GET "https://example.com/v1/business/string/document/"
{  "count": 123,  "next": 2,  "prev": 1,  "size": 30,  "results": [    {      "id": 0,      "created_at": "2019-08-24T14:15:22Z",      "updated_at": "2019-08-24T14:15:22Z",      "number": "string",      "is_flagged": true,      "is_locked": true,      "is_draft": true,      "attachment_exempt": true,      "date": "2019-08-24",      "description": "string",      "contact_id": 0,      "contact_name": "string",      "balance": 0.1,      "attachment_ids": [        0      ],      "type": 0,      "blueprint": {        "debet_account_id": 0,        "debet_entries": [],        "credit_account_id": 0,        "credit_entries": [],        "expense_entries": []      },      "blueprint_type": "string",      "import_data": {        "id": 0,        "trace_id": "df570c03-5a03-4cea-8df0-c162d05127ac",        "algo_status": "INITIAL",        "data_source": "BANK",        "identifier": "string",        "date": "2019-08-24",        "amount": 0.1,        "description": "string",        "contact_hint": "string",        "balance_after_transaction": 0,        "reference_number": "string",        "payment_account_id": 0,        "pending_workflow_runs": [          {            "id": 0,            "workflow_id": 0,            "workflow_name": "string",            "status": "pending"          }        ]      },      "entry_ui_rows": [        {          "account_name": "string",          "account_number": "string",          "vat_code": 1,          "vat_rate": "string",          "is_debet": true,          "amount": 0.1        }      ],      "audit_trail_last_seen_at": "2019-08-24T14:15:22Z",      "audit_trail_has_unseen_actions": true,      "audit_trail_last_mention_at": "2019-08-24T14:15:22Z",      "audit_trail_last_comment_at": "2019-08-24T14:15:22Z",      "tag_ids": [        0      ],      "relations": [        {          "id": 0,          "created_at": "2019-08-24T14:15:22Z",          "updated_at": "2019-08-24T14:15:22Z",          "related_document": 0,          "related_document_summary": {            "property1": null,            "property2": null          },          "description": "string",          "role": "ACCRUAL",          "type": "ACCRUAL_PAIR",          "source_document_signals": {            "property1": null,            "property2": null          },          "related_document_signals": {            "property1": null,            "property2": null          }        }      ],      "relation_network_signals": "string",      "relation_entry_signals": "string",      "available_link_kinds": "string",      "eu_b2b_vat_details_missing": true,      "eu_sale_to_private_person": true,      "bank_balance_warning": {        "reason": "balance_mismatch",        "diff": 0,        "bank_balance": 0,        "accounting_balance": 0,        "cause": "account_not_used",        "ledger_account": {          "number": "string",          "name": "string"        }      },      "ignore_bank_balance_mismatch": true,      "ordering_label": "string"    }  ]}