Common workflows
End-to-end examples that chain the endpoints an integration uses most, from a posted invoice to a report.
Each example below is complete: it names the scopes the key needs, the calls in order, and what the ledger looks like afterwards. Shapes are abbreviated; the API Reference has every field.
All examples assume:
export API_BASE=https://api.acreum.io
export ACREUM_API_KEY=live_…
auth() { curl -sS -H "Authorization: Bearer $ACREUM_API_KEY" -H "Content-Type: application/json" "$@"; }Create and post a customer invoice
Scopes: documents:write, plus parties:read, accounting:read, items:read,
legal-entities:read to look up the ids.
-
Find the issuing legal entity and the customer.
auth "$API_BASE/v1/legal-entities?limit=100" | jq '.data[] | {id, name}' auth "$API_BASE/v1/parties?search=Acme&role=tenant" | jq '.data[] | {id, name}' -
Pick what each line bills: an item (which carries its own income account) or an account directly.
auth "$API_BASE/v1/items?item_type=income" | jq '.data[] | {id, code, name}' -
Create the invoice. Setting
"post": trueposts it in the same call; leave it out to keep a draft.auth -X POST "$API_BASE/v1/documents" -H "Idempotency-Key: $(uuidgen)" -d '{ "entity_id": "<legal-entity-id>", "document_type": "invoice", "party_id": "<customer-party-id>", "document_date": "2026-10-01", "due_date": "2026-10-31", "memo": "October base rent", "items": [ { "item_id": "<rent-item-id>", "description": "Base rent — Suite 200", "quantity": 1, "rate": "6000.00" } ], "post": true }' | jq '.data | {id, status}'The create response carries only the document's
idandstatus. Read the number and totals back withGET /v1/documents/{id}.If an approval rule matches, the response comes back
pending_approvalinstead ofposted; the document posts when an approver accepts it.To charge sales tax on a line, add its
tax_rate_id(fromGET /v1/tax-rates, scopetax-rates:read). The server calculates the tax; send no tax amount. A line without one is untaxed. Tax rates apply to invoice and credit memo lines only.
Ledger effect: DR Accounts Receivable 6,000.00 / CR Rental Income 6,000.00 on the
issuing entity, dated document_date.
Post a draft later
auth -X POST "$API_BASE/v1/documents/<id>/post" -H "Idempotency-Key: $(uuidgen)"A draft in a closed period is refused with PERIOD_CLOSED. Re-send with
period_override_reason on the document (and a key that holds
accounting:periods_override), or change the date.
Record a manual journal entry
Scopes: documents:write, accounting:read.
Journal lines use debit_amount / credit_amount instead of item_total, and the
entry must balance.
auth -X POST "$API_BASE/v1/documents" -H "Idempotency-Key: $(uuidgen)" -d '{
"entity_id": "<legal-entity-id>",
"document_type": "journal_entry",
"document_date": "2026-10-31",
"memo": "Amortize prepaid insurance — October",
"items": [
{ "account_id": "<insurance-expense-account-id>", "debit_amount": "100.00",
"dimensions": { "property": "<property-id>" } },
{ "account_id": "<prepaid-insurance-account-id>", "credit_amount": "100.00",
"dimensions": { "property": "<property-id>" } }
],
"post": true
}'An unbalanced entry is refused before anything is written. A line that names a party (for example on an AR or AP control account) must use the matching control account; the API refuses a control-account line without the party it belongs to.
Record a customer payment against an invoice
Scopes: documents:write, accounting:read.
The simplest path is to mark the invoice paid from a cash account:
auth -X POST "$API_BASE/v1/documents/<invoice-id>/mark-paid" -H "Idempotency-Key: $(uuidgen)" -d '{
"account_id": "<cash-gl-account-id>",
"payment_date": "2026-10-05",
"amount": "6000.00",
"memo": "Check 1042"
}'This creates a posted payment_in document applied to the invoice:
DR Cash / CR Accounts Receivable. A partial amount leaves the balance open.
When the cash arrives through a connected bank feed, prefer processing the bank
transaction instead (PUT /v1/banking/transactions/{id}/process in match mode); it
records the payment and links it to the bank line in one step, which is what bank
reconciliation expects.
Void a posted document
Scopes: documents:write and documents:delete.
auth -X POST "$API_BASE/v1/documents/<id>/void" -H "Idempotency-Key: $(uuidgen)" -d '{
"memo": "Duplicate of INV-000121"
}'A posted document is never deleted: the void posts a reversing journal entry dated today
(or in the original period when reverse_in_original_period is true and that period is
still open). A document that has payments applied, that is cleared on a completed bank
reconciliation, or that a lease, loan or asset still depends on is refused with a code
that names the blocker.
List what changed since last night
Scopes: documents:read.
auth "$API_BASE/v1/documents?all_types=true&from_date=2026-10-14&to_date=2026-10-15&sort=-document_date&limit=100"Iterate with next_cursor as described in Pagination. Filter by
document_type, status, legal_entity_id, party_id, property_id or open_only=true
as needed. overdue=true returns only posted documents past their due date.
Pull a profit and loss statement
Scopes: reports:read.
auth "$API_BASE/v1/reports/pl?legal_entity_id=<id>&from_date=2026-01-01&to_date=2026-09-30&basis=accrual" \
| jq '{totals: .data.totals, groups: [.data.groups[] | {label, total}]}'Useful variations:
consolidation_group_id=<id>instead oflegal_entity_idfor a consolidated statement with intercompany eliminations.basis=cashfor cash-basis figures.compare=budgetto add the active budget and variances.property_id=<id>to restrict to one property;pivot_by=system:monthfor monthly columns.ownership_kind=allto include managed entities, which are excluded by default.
The other statements take similar filters, with these differences:
| Endpoint | Required | Dates | Notes |
|---|---|---|---|
/v1/reports/trial-balance | mode | as_of_date, or from_date / to_date | No consolidation_group_id, basis or compare. |
/v1/reports/balance-sheet | as_of_date | as_of_date only | Takes basis, pivot_by and consolidation_group_id; no compare. |
/v1/reports/cash-flow | from_date, to_date | the range | Takes pivot_by and consolidation_group_id; no basis or compare. |
/v1/reports/aging | side (ar or ap) | as_of_date | Takes party_ids, bucket, property_id; no date range. |
All four accept legal_entity_id and ownership_kind.
Drill from a report figure to the journal lines
auth "$API_BASE/v1/accounting/gl-activity?account_id=<id>&legal_entity_id=<id>&from_date=2026-01-01&to_date=2026-09-30"Scope: accounting:read. This is the same query the app runs when you click a P&L
line, so the rows sum to the figure you clicked.