Acreum Docs
Payables

AP Pipeline

POST
/v1/ap-files

Step two of an upload. Reads the file at storage_path, identifies its type from its bytes (the declared type and the extension are not trusted), and stores it with one placeholder processing item covering the whole file; reading the file starts in the background. The same bytes already held by the organization answer 409 AP_FILE_DUPLICATE naming that file, and the new upload is discarded. A path not issued for this organization is 422 AP_STORAGE_PATH_INVALID; a path nothing was uploaded to is 422 AP_UPLOAD_NOT_FOUND.

Required scope: accounts-payable:write

Error codes: VALIDATION_FAILED, AP_STORAGE_PATH_INVALID, AP_UPLOAD_NOT_FOUND, ATTACHMENT_TYPE_UNSUPPORTED, ATTACHMENT_TOO_LARGE, AP_FILE_DUPLICATE, CONFLICT

Authorization

access-token
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
original_filename*string

The file name to show reviewers.

Lengthlength <= 255
storage_path*string

The storage_path returned by POST /v1/ap-invoices/upload-url, after the file was PUT to its upload URL.

Lengthlength <= 255

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/ap-files' \  -H 'Content-Type: application/json' \  -d '{  "original_filename": "string",  "storage_path": "string"}'
{  "data": {    "file": {      "created_at": "2019-08-24T14:15:22Z",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "mime_type": "application/pdf",      "original_filename": "string",      "page_count": 0,      "sha256": "string",      "size_bytes": 0,      "source": "upload"    },    "items": [      {        "attempt_count": 0,        "created_at": "2019-08-24T14:15:22Z",        "error_message": "string",        "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "kind": "bill",        "page_from": 0,        "page_to": 0,        "status": "processing",        "version": 0      }    ]  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}
GET
/v1/ap-files/{id}/pdf

Redirects (302) to a short-lived signed URL for the stored file. A principal tied to one legal entity may open a file only when none of its items belongs to another entity; otherwise open the item’s own document.

Required scope: accounts-payable:read

Error codes: VALIDATION_FAILED, AP_FILE_NOT_FOUND, LEGAL_ENTITY_NOT_IN_SCOPE, SERVICE_UNAVAILABLE

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Response Body

Redirects to a signed URL for the stored document, valid for five minutes. Follow it right away; do not store it.

curl -X GET 'https://api.acreum.io/v1/ap-files/string/pdf'
Empty
POST
/v1/ap-files/{id}/reread

Starts reading the file again from scratch, in the background: every item of the file goes back to processing with attempt_count 0 and no error_message, and the read may split the file differently (items it no longer finds are removed). Use it on a file whose read failed. Refused with 409 AP_FILE_HAS_DECIDED_ITEMS when any item is accepted, rejected or archived, since a new split could duplicate a decided bill.

Required scope: accounts-payable:write

Error codes: VALIDATION_FAILED, AP_FILE_NOT_FOUND, AP_FILE_HAS_DECIDED_ITEMS, CONFLICT

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/ap-files/string/reread'
{  "data": {    "file": {      "created_at": "2019-08-24T14:15:22Z",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "mime_type": "application/pdf",      "original_filename": "string",      "page_count": 0,      "sha256": "string",      "size_bytes": 0,      "source": "upload"    },    "items": [      {        "attempt_count": 0,        "created_at": "2019-08-24T14:15:22Z",        "error_message": "string",        "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "kind": "bill",        "page_from": 0,        "page_to": 0,        "status": "processing",        "version": 0      }    ]  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}

List AP intake addresses

GET
/v1/ap-intake-addresses

The organization’s inbound email addresses, oldest first by default; the other sorts are -created_at and address. A principal tied to one legal entity sees that entity’s addresses and those with no entity.

Required scope: accounts-payable:read

Pagination: cursor

Error codes: VALIDATION_FAILED, INVALID_CURSOR

Authorization

access-token
headerAuthorizationBearer <token>

Query Parameters

cursor?string
limit?number

1..100, default 100

Range1 <= value <= 100
sort?string

Default: created_at

Value in"created_at""-created_at""address"
search?string

Case-insensitive substring match on: address.

ids?string

Up to 100 ids; returns those rows regardless of other filters and ignores search.

Response Body

application/json
  1. response
data*array<>
meta*
curl -X GET 'https://api.acreum.io/v1/ap-intake-addresses'
{  "data": [    {      "address": "string",      "created_at": "2019-08-24T14:15:22Z",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "is_active": true,      "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",      "sender_policy": "anyone",      "updated_at": "2019-08-24T14:15:22Z"    }  ],  "meta": {    "api_version": "2026-04-23",    "limit": 50,    "next_cursor": "eyJpZCI6ICJhYmMifQ==",    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f"  }}
POST
/v1/ap-intake-addresses

Generates a new inbound address, ap-<10 characters>@<inbound domain>, for the organization. The address cannot be chosen. sender_policy defaults to anyone. A legal_entity_id that is not an active legal entity of the organization is 422 AP_INTAKE_ADDRESS_INVALID; a deployment with no inbound domain is 503 AP_INTAKE_DOMAIN_NOT_CONFIGURED.

Required scope: accounts-payable:write

Error codes: VALIDATION_FAILED, LEGAL_ENTITY_NOT_IN_SCOPE, AP_INTAKE_ADDRESS_INVALID, AP_INTAKE_DOMAIN_NOT_CONFIGURED, CONFLICT, INVALID_IDEMPOTENCY_KEY, IDEMPOTENCY_CONFLICT

Authorization

access-token
headerAuthorizationBearer <token>

Header Parameters

Idempotency-Key?string

Client-chosen key that makes this mutation safe to retry. Optional — a request without one is processed normally, with no replay protection. Reusing a key with the same body replays the original response for ~24 hours; reusing it with a different body returns IDEMPOTENCY_CONFLICT.

Match^[A-Za-z0-9_-]{1,255}$
Lengthlength <= 255

Request Body

application/json
  1. body
legal_entity_id?|

The legal entity bills arriving at this address default to; null for none. An active legal entity of the organization.

Formatuuid
sender_policy?string

anyone ingests mail from any sender; known_only holds mail whose sender is not a known vendor (unknown_sender).

Default"anyone"
Value in"anyone""known_only"

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/ap-intake-addresses' \  -H 'Content-Type: application/json' \  -d '{}'
{  "data": {    "address": "string",    "created_at": "2019-08-24T14:15:22Z",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "is_active": true,    "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",    "sender_policy": "anyone",    "updated_at": "2019-08-24T14:15:22Z"  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}
PATCH
/v1/ap-intake-addresses/{id}

Changes the sender policy, the default legal entity or whether the address is active. Only the keys sent change; legal_entity_id: null clears the entity. An inactive address receives nothing: its mail is ignored as an unknown address.

Required scope: accounts-payable:write

Error codes: VALIDATION_FAILED, AP_INTAKE_ADDRESS_NOT_FOUND, AP_INTAKE_ADDRESS_INVALID, LEGAL_ENTITY_NOT_IN_SCOPE, INVALID_IDEMPOTENCY_KEY, IDEMPOTENCY_CONFLICT

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Header Parameters

Idempotency-Key?string

Client-chosen key that makes this mutation safe to retry. Optional — a request without one is processed normally, with no replay protection. Reusing a key with the same body replays the original response for ~24 hours; reusing it with a different body returns IDEMPOTENCY_CONFLICT.

Match^[A-Za-z0-9_-]{1,255}$
Lengthlength <= 255

Request Body

application/json
  1. body
is_active?boolean

False stops the address receiving mail (addresses are never deleted); true turns it back on.

legal_entity_id?|

The legal entity bills arriving at this address default to; null for none. An active legal entity of the organization. Send null to clear it.

Formatuuid
sender_policy?string

anyone ingests mail from any sender; known_only holds mail whose sender is not a known vendor (unknown_sender).

Value in"anyone""known_only"

Response Body

application/json
  1. response
data*
meta*
curl -X PATCH 'https://api.acreum.io/v1/ap-intake-addresses/string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "data": {    "address": "string",    "created_at": "2019-08-24T14:15:22Z",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "is_active": true,    "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",    "sender_policy": "anyone",    "updated_at": "2019-08-24T14:15:22Z"  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}

List AP invoices

GET
/v1/ap-invoices

The items found in uploaded invoice files. The default order is urgency: fraud risk (high, elevated, low, unchecked), then due date (soonest first, none last), then oldest. The other sorts are created_at, -created_at, due_date (none last) and -due_date. Each row carries its open checks and quick_approvable. meta.counts is the number of items per status over the whole organization, ignoring every filter, for the status tabs. A principal tied to one legal entity sees only that entity’s items.

Required scope: accounts-payable:read

Pagination: cursor

Error codes: VALIDATION_FAILED, INVALID_CURSOR, LEGAL_ENTITY_NOT_IN_SCOPE

Authorization

access-token
headerAuthorizationBearer <token>

Query Parameters

status?array<>

Only items in these statuses. Repeat or comma-separate; an item is listed when its status is any of them.

vendor_party_id?string

Only items of this vendor party.

Formatuuid
legal_entity_id?string

Only items of this legal entity.

Formatuuid
check_code?string

Only items with this check open (not acknowledged or resolved).

Value in"payment_details_changed""sender_lookalike""duplicate_invoice""duplicate_probable""duplicate_content""does_not_foot""extraction_low_confidence""extraction_invalid""suggestion_failed""remit_to_new""remit_to_name_mismatch""sender_freemail""vendor_unmatched""new_vendor""vendor_unverified""unusual_amount""unusual_frequency""legal_entity_conflict""closed_period""inactive_record""under_threshold""invoice_number_regression""past_due""missing_w9"
fraud_risk?string
Value in"low""elevated""high"
kind?string
Value in"bill""credit_memo""statement""w9""receipt""reminder""other"
from_date?string

Inclusive lower bound on the invoice date.

Formatdate
to_date?string

Inclusive upper bound on the invoice date.

Formatdate
cursor?string
limit?number

1..100, default 100

Range1 <= value <= 100
sort?string

Default: urgency

Value in"urgency""-created_at""created_at""due_date""-due_date"
search?string

Case-insensitive substring match on: vendor_name, vendor_invoice_number.

ids?string

Up to 100 ids; returns those rows regardless of other filters and ignores search.

Response Body

application/json
  1. response
data*array<>
meta*
curl -X GET 'https://api.acreum.io/v1/ap-invoices'
{  "data": [    {      "checks": [        {          "code": "payment_details_changed",          "severity": "block"        }      ],      "created_at": "2019-08-24T14:15:22Z",      "currency_code": "string",      "due_date": "2019-08-24",      "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",      "file_name": "string",      "fraud_risk": "low",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "invoice_date": "2019-08-24",      "kind": "bill",      "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",      "page_from": 0,      "page_to": 0,      "quick_approvable": true,      "status": "processing",      "stp_confidence": "string",      "total": "1234.50",      "vendor_invoice_number": "string",      "vendor_name": "string",      "vendor_party_id": "3db9cd53-fdbe-455c-b249-781ab82b533b",      "version": 0    }  ],  "meta": {    "api_version": "2026-04-23",    "counts": {      "accepted": 0,      "archived": 0,      "duplicate": 0,      "flagged": 0,      "needs_review": 0,      "not_a_bill": 0,      "processing": 0,      "ready": 0,      "rejected": 0    },    "limit": 0,    "next_cursor": "eyJpZCI6ICJhYmMifQ==",    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f"  }}
POST
/v1/ap-invoices/upload-url

Step one of an upload. Returns a fresh storage_path under the organization and a signed upload_url (valid two hours) to PUT the file to, straight to Storage. Then call POST /v1/ap-files with the path. The declared type must be PDF, PNG, JPEG or WebP and the size at most 25 MiB; the uploaded bytes are checked again on registration.

Required scope: accounts-payable:write

Error codes: VALIDATION_FAILED

Authorization

access-token
headerAuthorizationBearer <token>

Request Body

application/json
  1. body
content_type*string

The declared type. It chooses the path extension and fails early; what is admitted is decided later from the uploaded bytes.

Value in"application/pdf""image/png""image/jpeg""image/webp"
filename*string

The file name on the client. Informational only.

Lengthlength <= 255
size_bytes*integer

The declared size in bytes; at most 25 MiB.

Range1 <= value <= 26214400

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/ap-invoices/upload-url' \  -H 'Content-Type: application/json' \  -d '{  "content_type": "application/pdf",  "filename": "string",  "size_bytes": 1}'
{  "data": {    "expires_at": "2019-08-24T14:15:22Z",    "storage_path": "string",    "upload_url": "string"  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}

Get an AP invoice

GET
/v1/ap-invoices/{id}

One item with everything the review drawer needs: the working final_fields, the effective_coding a bill would get (the reviewer’s coding where set, else the classifier’s choice), the suggestion, every check with its state and evidence, the extraction result, the file and page range, the other items found in the same file and the bill once accepted.

Required scope: accounts-payable:read

Error codes: VALIDATION_FAILED, AP_INVOICE_NOT_FOUND, LEGAL_ENTITY_NOT_IN_SCOPE

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Response Body

application/json
  1. response
data*
meta*
curl -X GET 'https://api.acreum.io/v1/ap-invoices/string'
{  "data": {    "accepted_at": "2019-08-24T14:15:22Z",    "bill_document_id": "dbe49992-9f30-447c-8c2b-f767997ddc69",    "checks": [      {        "code": "payment_details_changed",        "evidence": {},        "exit": "string",        "note": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "severity": "block",        "state": "open"      }    ],    "created_at": "2019-08-24T14:15:22Z",    "currency_code": "string",    "decided_via": "person",    "due_date": "2019-08-24",    "duplicate_of_document_id": "33b047b8-0352-4ec4-886d-bdef756b1f02",    "duplicate_of_invoice_id": "7c208926-2d57-4bdf-9619-8bca670b277e",    "effective_coding": {      "dimensions": {        "property1": "string",        "property2": "string"      },      "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",      "lines": [        {          "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65",          "dimensions": {            "property1": "string",            "property2": "string"          },          "item_id": "4d8cd62e-a579-4dae-af8c-3172f96f8f7c"        }      ],      "tax_account_id": "55180e69-a576-4e38-b0c0-2002f1d2a386",      "vendor_party_id": "3db9cd53-fdbe-455c-b249-781ab82b533b"    },    "error_message": "string",    "extraction": {      "created_at": "2019-08-24T14:15:22Z",      "errors": [        "string"      ],      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "model": "string",      "status": "passed"    },    "file": {      "created_at": "2019-08-24T14:15:22Z",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "mime_type": "application/pdf",      "original_filename": "string",      "page_count": 0,      "sha256": "string",      "size_bytes": 0,      "source": "upload"    },    "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",    "final_fields": {},    "fraud_risk": "low",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "invoice_date": "2019-08-24",    "kind": "bill",    "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",    "page_from": 0,    "page_to": 0,    "quick_approvable": true,    "rejected_at": "2019-08-24T14:15:22Z",    "rejection_reason": "string",    "sibling_item_ids": [      "af916b33-b947-4dd7-96de-b8d545b50449"    ],    "status": "processing",    "stp_confidence": "string",    "subtotal": "1234.50",    "suggestion": {},    "tax_total": "1234.50",    "total": "1234.50",    "vendor_invoice_number": "string",    "vendor_name": "string",    "vendor_party_id": "3db9cd53-fdbe-455c-b249-781ab82b533b",    "version": 0  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}

Edit an AP invoice

PATCH
/v1/ap-invoices/{id}

Merges final_fields into the working copy: one correction is recorded per changed field, the typed columns follow, and the item is re-staged (its checks and status follow the new values). Picking another vendor_party_id or legal_entity_id classifies the item again with that pick kept; if the classifier fails the edit is kept and the item moves to needs_review with an open suggestion_failed check. Allowed while the item is ready, needs_review, flagged or duplicate; other statuses are 409 AP_INVOICE_NOT_REVIEWABLE. Answers with the item as GET shows it.

Required scope: accounts-payable:write

Error codes: VALIDATION_FAILED, AP_INVOICE_NOT_FOUND, LEGAL_ENTITY_NOT_IN_SCOPE, AP_INVOICE_PRECONDITION_REQUIRED, AP_INVOICE_PATCH_INVALID, DOCUMENT_PARTY_IS_LEGAL_ENTITY, AP_INVOICE_NOT_REVIEWABLE, AP_INVOICE_CHANGED, INVALID_IDEMPOTENCY_KEY, IDEMPOTENCY_CONFLICT

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Header Parameters

x-ap-invoice-version*string

The item version from the read this edit is based on, as a plain integer. Use this, not If-Match: a CDN in front of this API answers conditional requests itself and never forwards them. Missing is 428 AP_INVOICE_PRECONDITION_REQUIRED; not an integer is 422 AP_INVOICE_PATCH_INVALID; stale is 409 AP_INVOICE_CHANGED.

Idempotency-Key?string

Client-chosen key that makes this mutation safe to retry. Optional — a request without one is processed normally, with no replay protection. Reusing a key with the same body replays the original response for ~24 hours; reusing it with a different body returns IDEMPOTENCY_CONFLICT.

Match^[A-Za-z0-9_-]{1,255}$
Lengthlength <= 255

Request Body

application/json
  1. body
final_fields*

The fields to change; every other field keeps its value. Top-level keys replace; line_items merges per index (an element merges into the line at that index, send {} for a line you leave as it is; a shorter array is refused and a longer one adds lines). Keys: the extracted fields (vendor, invoice_number, invoice_date, due_date, currency_code, subtotal, tax, total, payment_terms, po_number, bill_to, remit_to, line_items) and the coding overlay (vendor_party_id, legal_entity_id, dimensions, tax_account_id, and per line account_id, item_id, dimensions). null clears a coding pick and it stays cleared. Caller-defined shape.

Response Body

application/json
  1. response
data*
meta*
curl -X PATCH 'https://api.acreum.io/v1/ap-invoices/string' \  -H 'x-ap-invoice-version: string' \  -H 'Content-Type: application/json' \  -d '{  "final_fields": {}}'
{  "data": {    "accepted_at": "2019-08-24T14:15:22Z",    "bill_document_id": "dbe49992-9f30-447c-8c2b-f767997ddc69",    "checks": [      {        "code": "payment_details_changed",        "evidence": {},        "exit": "string",        "note": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "severity": "block",        "state": "open"      }    ],    "created_at": "2019-08-24T14:15:22Z",    "currency_code": "string",    "decided_via": "person",    "due_date": "2019-08-24",    "duplicate_of_document_id": "33b047b8-0352-4ec4-886d-bdef756b1f02",    "duplicate_of_invoice_id": "7c208926-2d57-4bdf-9619-8bca670b277e",    "effective_coding": {      "dimensions": {        "property1": "string",        "property2": "string"      },      "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",      "lines": [        {          "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65",          "dimensions": {            "property1": "string",            "property2": "string"          },          "item_id": "4d8cd62e-a579-4dae-af8c-3172f96f8f7c"        }      ],      "tax_account_id": "55180e69-a576-4e38-b0c0-2002f1d2a386",      "vendor_party_id": "3db9cd53-fdbe-455c-b249-781ab82b533b"    },    "error_message": "string",    "extraction": {      "created_at": "2019-08-24T14:15:22Z",      "errors": [        "string"      ],      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "model": "string",      "status": "passed"    },    "file": {      "created_at": "2019-08-24T14:15:22Z",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "mime_type": "application/pdf",      "original_filename": "string",      "page_count": 0,      "sha256": "string",      "size_bytes": 0,      "source": "upload"    },    "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",    "final_fields": {},    "fraud_risk": "low",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "invoice_date": "2019-08-24",    "kind": "bill",    "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",    "page_from": 0,    "page_to": 0,    "quick_approvable": true,    "rejected_at": "2019-08-24T14:15:22Z",    "rejection_reason": "string",    "sibling_item_ids": [      "af916b33-b947-4dd7-96de-b8d545b50449"    ],    "status": "processing",    "stp_confidence": "string",    "subtotal": "1234.50",    "suggestion": {},    "tax_total": "1234.50",    "total": "1234.50",    "vendor_invoice_number": "string",    "vendor_name": "string",    "vendor_party_id": "3db9cd53-fdbe-455c-b249-781ab82b533b",    "version": 0  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}

Accept an AP invoice

POST
/v1/ap-invoices/{id}/accept

Turns the item into a bill (a vendor credit for a credit memo) in one step: optional final_fields edits are applied first, then the bill is created from the item’s effective coding with its vendor invoice number and the item’s pages attached, and the item becomes accepted with bill_document_id. The bill then follows the normal path: it posts, or waits in pending_approval when an approval rule holds it. Purchase tax becomes one Tax line on tax_account_id (else the largest line’s account). Allowed only while the item is ready or needs_review with no open block and no unacknowledged warn. Nothing is created when it is refused, and the reason is kept in the item’s error_message. A retried accept of an accepted item is 409 AP_INVOICE_NOT_REVIEWABLE naming the bill in context.bill_document_id.

Required scope: accounts-payable:write

Error codes: VALIDATION_FAILED, AP_INVOICE_NOT_FOUND, LEGAL_ENTITY_NOT_IN_SCOPE, AP_INVOICE_PATCH_INVALID, DOCUMENT_PARTY_IS_LEGAL_ENTITY, AP_INVOICE_NOT_REVIEWABLE, AP_INVOICE_CHANGED, AP_INVOICE_HAS_OPEN_CHECKS, AP_INVOICE_INCOMPLETE, AP_INVOICE_DOES_NOT_FOOT, DIMENSION_REQUIRED, DOCUMENT_VENDOR_INVOICE_NUMBER_TAKEN, IDEMPOTENCY_KEY_REQUIRED, INVALID_IDEMPOTENCY_KEY, IDEMPOTENCY_CONFLICT

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Header Parameters

Idempotency-Key*string

Client-chosen key that makes this mutation safe to retry. Required — a request without one is rejected with IDEMPOTENCY_KEY_REQUIRED. Reusing a key with the same body replays the original response for ~24 hours; reusing it with a different body returns IDEMPOTENCY_CONFLICT.

Match^[A-Za-z0-9_-]{1,255}$
Lengthlength <= 255

Request Body

application/json
  1. body
final_fields?

Edits applied before accepting, exactly as PATCH /v1/ap-invoices/{id} applies them (same keys, same merge, same validation, one correction per changed field, and the item is re-checked). Omit to accept the item as it stands. Caller-defined shape.

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/ap-invoices/string/accept' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "data": {    "bill_document_id": "dbe49992-9f30-447c-8c2b-f767997ddc69",    "bill_status": "posted",    "item": {      "accepted_at": "2019-08-24T14:15:22Z",      "bill_document_id": "dbe49992-9f30-447c-8c2b-f767997ddc69",      "checks": [        {          "code": "payment_details_changed",          "evidence": {},          "exit": "string",          "note": "string",          "resolved_at": "2019-08-24T14:15:22Z",          "severity": "block",          "state": "open"        }      ],      "created_at": "2019-08-24T14:15:22Z",      "currency_code": "string",      "decided_via": "person",      "due_date": "2019-08-24",      "duplicate_of_document_id": "33b047b8-0352-4ec4-886d-bdef756b1f02",      "duplicate_of_invoice_id": "7c208926-2d57-4bdf-9619-8bca670b277e",      "effective_coding": {        "dimensions": {          "property1": "string",          "property2": "string"        },        "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",        "lines": [          {            "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65",            "dimensions": {              "property1": "string",              "property2": "string"            },            "item_id": "4d8cd62e-a579-4dae-af8c-3172f96f8f7c"          }        ],        "tax_account_id": "55180e69-a576-4e38-b0c0-2002f1d2a386",        "vendor_party_id": "3db9cd53-fdbe-455c-b249-781ab82b533b"      },      "error_message": "string",      "extraction": {        "created_at": "2019-08-24T14:15:22Z",        "errors": [          "string"        ],        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "model": "string",        "status": "passed"      },      "file": {        "created_at": "2019-08-24T14:15:22Z",        "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",        "mime_type": "application/pdf",        "original_filename": "string",        "page_count": 0,        "sha256": "string",        "size_bytes": 0,        "source": "upload"      },      "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",      "final_fields": {},      "fraud_risk": "low",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "invoice_date": "2019-08-24",      "kind": "bill",      "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",      "page_from": 0,      "page_to": 0,      "quick_approvable": true,      "rejected_at": "2019-08-24T14:15:22Z",      "rejection_reason": "string",      "sibling_item_ids": [        "af916b33-b947-4dd7-96de-b8d545b50449"      ],      "status": "processing",      "stp_confidence": "string",      "subtotal": "1234.50",      "suggestion": {},      "tax_total": "1234.50",      "total": "1234.50",      "vendor_invoice_number": "string",      "vendor_name": "string",      "vendor_party_id": "3db9cd53-fdbe-455c-b249-781ab82b533b",      "version": 0    }  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}
GET
/v1/ap-invoices/{id}/audit

The reviewer’s edits (kind: correction, with the suggested and final values) and the actions recorded in the audit log about the item (kind: audit), oldest first.

Required scope: accounts-payable:read

Pagination: computed

Error codes: VALIDATION_FAILED, AP_INVOICE_NOT_FOUND, LEGAL_ENTITY_NOT_IN_SCOPE

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Response Body

application/json
  1. response
data*array<>
meta*
curl -X GET 'https://api.acreum.io/v1/ap-invoices/string/audit'
{  "data": [    {      "action": "string",      "actor_id": "04f37679-bfbf-4906-b749-01756515cecf",      "actor_name": "string",      "after": {},      "at": "2019-08-24T14:15:22Z",      "before": {},      "field_path": "string",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "kind": "correction",      "line_index": 0,      "summary": {}    }  ],  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}
POST
/v1/ap-invoices/{id}/checks/{code}/acknowledge

Marks one warn check acknowledged, records the decision and re-stages the item: with no other block or warn open it moves on (for example needs_review to ready). A fraud-class warning needs a note (422 AP_CHECK_NOTE_REQUIRED). A block or info check is 422 AP_CHECK_SEVERITY_MISMATCH. The acknowledgement stays while the check keeps firing with the same evidence. Refused with 409 AP_INVOICE_NOT_REVIEWABLE while the item is processing, not_a_bill or decided.

Required scope: accounts-payable:write

Error codes: VALIDATION_FAILED, AP_INVOICE_NOT_FOUND, AP_CHECK_NOT_FOUND, AP_INVOICE_NOT_REVIEWABLE, AP_CHECK_SEVERITY_MISMATCH, AP_CHECK_NOTE_REQUIRED, AP_INVOICE_CHANGED

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string
code*string

The check to act on, as listed in the item's checks.

Value in"payment_details_changed""sender_lookalike""duplicate_invoice""duplicate_probable""duplicate_content""does_not_foot""extraction_low_confidence""extraction_invalid""suggestion_failed""remit_to_new""remit_to_name_mismatch""sender_freemail""vendor_unmatched""new_vendor""vendor_unverified""unusual_amount""unusual_frequency""legal_entity_conflict""closed_period""inactive_record""under_threshold""invoice_number_regression""past_due""missing_w9"

Request Body

application/json
  1. body
note?string

Why the warning is safe to accept. Required (non-empty) for a fraud-class check, such as remit_to_new or vendor_unverified.

Lengthlength <= 2000

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/ap-invoices/string/checks/payment_details_changed/acknowledge' \  -H 'Content-Type: application/json' \  -d '{}'
{  "data": {    "checks": [      {        "code": "payment_details_changed",        "evidence": {},        "exit": "string",        "note": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "severity": "block",        "state": "open"      }    ],    "item": {      "fraud_risk": "low",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "status": "processing",      "stp_confidence": "string",      "version": 0    }  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}
POST
/v1/ap-invoices/{id}/checks/{code}/resolve

Marks one block check resolved with a note saying how it was cleared (for bank details: verified by phone with the number on file), records the decision and re-stages the item, which then leaves flagged unless another block is open. The fraud risk is recomputed without that check. duplicate_invoice is settled with the duplicate routes (422 AP_CHECK_USE_DUPLICATE_ROUTE); a warn or info check is 422 AP_CHECK_SEVERITY_MISMATCH; a blank note is 422 AP_CHECK_NOTE_REQUIRED. Refused with 409 AP_INVOICE_NOT_REVIEWABLE while the item is processing, not_a_bill or decided.

Required scope: accounts-payable:write

Error codes: VALIDATION_FAILED, AP_INVOICE_NOT_FOUND, AP_CHECK_NOT_FOUND, AP_INVOICE_NOT_REVIEWABLE, AP_CHECK_SEVERITY_MISMATCH, AP_CHECK_USE_DUPLICATE_ROUTE, AP_CHECK_NOTE_REQUIRED, AP_INVOICE_CHANGED

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string
code*string

The check to act on, as listed in the item's checks.

Value in"payment_details_changed""sender_lookalike""duplicate_invoice""duplicate_probable""duplicate_content""does_not_foot""extraction_low_confidence""extraction_invalid""suggestion_failed""remit_to_new""remit_to_name_mismatch""sender_freemail""vendor_unmatched""new_vendor""vendor_unverified""unusual_amount""unusual_frequency""legal_entity_conflict""closed_period""inactive_record""under_threshold""invoice_number_regression""past_due""missing_w9"

Request Body

application/json
  1. body
note*string

How the blocking problem was cleared, for example who was called.

Lengthlength <= 2000

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/ap-invoices/string/checks/payment_details_changed/resolve' \  -H 'Content-Type: application/json' \  -d '{  "note": "string"}'
{  "data": {    "checks": [      {        "code": "payment_details_changed",        "evidence": {},        "exit": "string",        "note": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "severity": "block",        "state": "open"      }    ],    "item": {      "fraud_risk": "low",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "status": "processing",      "stp_confidence": "string",      "version": 0    }  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}
POST
/v1/ap-invoices/{id}/duplicate/confirm

The item is a copy of a bill or item already received: it is archived, keeping duplicate_of_invoice_id / duplicate_of_document_id, and never becomes a bill. Needs an open duplicate check (duplicate_invoice, duplicate_probable or duplicate_content), else 409 AP_INVOICE_NOT_A_DUPLICATE. Refused with 409 AP_INVOICE_NOT_REVIEWABLE while the item is processing, not_a_bill or decided.

Required scope: accounts-payable:write

Error codes: VALIDATION_FAILED, AP_INVOICE_NOT_FOUND, AP_INVOICE_NOT_REVIEWABLE, AP_INVOICE_NOT_A_DUPLICATE, AP_INVOICE_CHANGED

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/ap-invoices/string/duplicate/confirm'
{  "data": {    "checks": [      {        "code": "payment_details_changed",        "evidence": {},        "exit": "string",        "note": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "severity": "block",        "state": "open"      }    ],    "item": {      "fraud_risk": "low",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "status": "processing",      "stp_confidence": "string",      "version": 0    }  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}
POST
/v1/ap-invoices/{id}/duplicate/dismiss

The item is not a duplicate: duplicate_invoice is marked resolved and an open duplicate_probable / duplicate_content acknowledged, each with the reason as its note, and the item is re-staged (usually to needs_review or ready). The decision stays while the same match is found again. Needs an open duplicate check, else 409 AP_INVOICE_NOT_A_DUPLICATE; a blank reason is 422 AP_CHECK_NOTE_REQUIRED. Refused with 409 AP_INVOICE_NOT_REVIEWABLE while the item is processing, not_a_bill or decided.

Required scope: accounts-payable:write

Error codes: VALIDATION_FAILED, AP_INVOICE_NOT_FOUND, AP_INVOICE_NOT_REVIEWABLE, AP_INVOICE_NOT_A_DUPLICATE, AP_CHECK_NOTE_REQUIRED, AP_INVOICE_CHANGED

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Request Body

application/json
  1. body
reason*string

Why the item is not a duplicate of the bill or item it matched.

Lengthlength <= 2000

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/ap-invoices/string/duplicate/dismiss' \  -H 'Content-Type: application/json' \  -d '{  "reason": "string"}'
{  "data": {    "checks": [      {        "code": "payment_details_changed",        "evidence": {},        "exit": "string",        "note": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "severity": "block",        "state": "open"      }    ],    "item": {      "fraud_risk": "low",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "status": "processing",      "stp_confidence": "string",      "version": 0    }  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}
GET
/v1/ap-invoices/{id}/pdf

Redirects (302) to a short-lived signed URL for the stored file the item was found in. The file is the whole upload; use page_from and page_to of the item to find its pages.

Required scope: accounts-payable:read

Error codes: VALIDATION_FAILED, AP_INVOICE_NOT_FOUND, LEGAL_ENTITY_NOT_IN_SCOPE, SERVICE_UNAVAILABLE

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Response Body

Redirects to a signed URL for the stored document, valid for five minutes. Follow it right away; do not store it.

curl -X GET 'https://api.acreum.io/v1/ap-invoices/string/pdf'
Empty

Reject an AP invoice

POST
/v1/ap-invoices/{id}/reject

The item will not become a bill: it is rejected with the reason, the time and the reviewer. fraud: true also blocks the sender’s email on the item’s vendor so it is no longer recognized (nothing is blocked when the item has no vendor). Allowed while the item is ready, needs_review, flagged, duplicate or not_a_bill; processing, accepted, rejected and archived are 409 AP_INVOICE_NOT_REVIEWABLE. Answers with the item as GET shows it.

Required scope: accounts-payable:write

Error codes: VALIDATION_FAILED, AP_INVOICE_NOT_FOUND, LEGAL_ENTITY_NOT_IN_SCOPE, AP_INVOICE_PATCH_INVALID, AP_INVOICE_NOT_REVIEWABLE, AP_INVOICE_CHANGED, IDEMPOTENCY_KEY_REQUIRED, INVALID_IDEMPOTENCY_KEY, IDEMPOTENCY_CONFLICT

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Header Parameters

Idempotency-Key*string

Client-chosen key that makes this mutation safe to retry. Required — a request without one is rejected with IDEMPOTENCY_KEY_REQUIRED. Reusing a key with the same body replays the original response for ~24 hours; reusing it with a different body returns IDEMPOTENCY_CONFLICT.

Match^[A-Za-z0-9_-]{1,255}$
Lengthlength <= 255

Request Body

application/json
  1. body
fraud*boolean

True when the item is fraudulent: the sender’s email (and its domain, when a row holds it) is blocked on the item’s vendor. With no vendor on the item nothing is blocked.

reason*string

Why the item is not a bill to pay.

Lengthlength <= 2000

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/ap-invoices/string/reject' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "fraud": true,  "reason": "string"}'
{  "data": {    "accepted_at": "2019-08-24T14:15:22Z",    "bill_document_id": "dbe49992-9f30-447c-8c2b-f767997ddc69",    "checks": [      {        "code": "payment_details_changed",        "evidence": {},        "exit": "string",        "note": "string",        "resolved_at": "2019-08-24T14:15:22Z",        "severity": "block",        "state": "open"      }    ],    "created_at": "2019-08-24T14:15:22Z",    "currency_code": "string",    "decided_via": "person",    "due_date": "2019-08-24",    "duplicate_of_document_id": "33b047b8-0352-4ec4-886d-bdef756b1f02",    "duplicate_of_invoice_id": "7c208926-2d57-4bdf-9619-8bca670b277e",    "effective_coding": {      "dimensions": {        "property1": "string",        "property2": "string"      },      "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",      "lines": [        {          "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65",          "dimensions": {            "property1": "string",            "property2": "string"          },          "item_id": "4d8cd62e-a579-4dae-af8c-3172f96f8f7c"        }      ],      "tax_account_id": "55180e69-a576-4e38-b0c0-2002f1d2a386",      "vendor_party_id": "3db9cd53-fdbe-455c-b249-781ab82b533b"    },    "error_message": "string",    "extraction": {      "created_at": "2019-08-24T14:15:22Z",      "errors": [        "string"      ],      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "model": "string",      "status": "passed"    },    "file": {      "created_at": "2019-08-24T14:15:22Z",      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "mime_type": "application/pdf",      "original_filename": "string",      "page_count": 0,      "sha256": "string",      "size_bytes": 0,      "source": "upload"    },    "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",    "final_fields": {},    "fraud_risk": "low",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "invoice_date": "2019-08-24",    "kind": "bill",    "legal_entity_id": "8c040143-e03c-45a0-b1bc-85161701d839",    "page_from": 0,    "page_to": 0,    "quick_approvable": true,    "rejected_at": "2019-08-24T14:15:22Z",    "rejection_reason": "string",    "sibling_item_ids": [      "af916b33-b947-4dd7-96de-b8d545b50449"    ],    "status": "processing",    "stp_confidence": "string",    "subtotal": "1234.50",    "suggestion": {},    "tax_total": "1234.50",    "total": "1234.50",    "vendor_invoice_number": "string",    "vendor_name": "string",    "vendor_party_id": "3db9cd53-fdbe-455c-b249-781ab82b533b",    "version": 0  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}

Process an invoice again

POST
/v1/ap-invoices/{id}/reprocess

Starts processing one item again from scratch, in the background: it goes back to processing with attempt_count 0 and no error_message. The 202 body is the item as restarted; an in-house item read arrives in a later step. Refused with 409 AP_INVOICE_NOT_REPROCESSABLE when the item is accepted, rejected or archived, and with 409 AP_INVOICE_NOT_REVIEWABLE while it is still processing. The reviewer’s header corrections are kept and re-applied to the new extraction; line-level corrections are dropped.

Required scope: accounts-payable:write

Error codes: VALIDATION_FAILED, AP_INVOICE_NOT_FOUND, AP_INVOICE_NOT_REPROCESSABLE, AP_INVOICE_NOT_REVIEWABLE, CONFLICT

Authorization

access-token
headerAuthorizationBearer <token>

Path Parameters

id*string

Response Body

application/json
  1. response
data*
meta*
curl -X POST 'https://api.acreum.io/v1/ap-invoices/string/reprocess'
{  "data": {    "attempt_count": 0,    "created_at": "2019-08-24T14:15:22Z",    "error_message": "string",    "file_id": "8a0cfb4f-ddc9-436d-91bb-75133c583767",    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",    "kind": "bill",    "page_from": 0,    "page_to": 0,    "status": "processing",    "version": 0  },  "meta": {    "api_version": "2026-04-23",    "cursor": {      "has_more": true,      "next": "eyJpZCI6ICJhYmMifQ=="    },    "request_id": "018f0b3d-2b1e-7c8a-9d4b-1a2b3c4d5e6f",    "total_count": 1234  }}