Spending
4 operations. All areas
POST/v1/expenses
Record money already spent, without a bill: Dr the expense lines, Cr the bank, cash or card account it left. Payee optional. Same governance as bills (agents: within policy it posts, otherwise a proposal; a first document for a payee is queued); dry_run previews.
- Operation
createExpense - Scope: propose
- Write: needs Idempotency-Key (or dry_run)
- Request body
payee_idstring The vendor paid (optional)payment_accountstring, required The bank, cash or credit-card account the money leftdoc_datestring, required Calendar date, YYYY-MM-DD.numberstring Optional; assigned (EXP-0001) when omittedreferencestring Receipt or confirmation numbermemostringlinesarray of DocumentLineInput, required What the money paid for: expense (or asset) accounts, or products and services (their purchase account and cost). No sales tax.attachmentsarray of object Receipt metadata (the file itself is not stored)dry_runbooleanconfidencenumbersoft_lock_override_reasonstring
- Responses
200Dry run: the document, its number, the exact entry, policy verdict; nothing written (DocumentResult)201Posted (DocumentResult)202Queued for approval (DocumentResult)- Errors
400,401,403,409,422,429,500(Error:error.type,message)
POST/v1/checks
Record a check written (Dr the lines, Cr the bank or cash account it is drawn on); the number is the check number. Same governance as bills; dry_run previews.
- Operation
createCheck - Scope: propose
- Write: needs Idempotency-Key (or dry_run)
- Request body
payee_idstring The vendor paid (optional)payment_accountstring, required The bank or cash account the check is drawn ondoc_datestring, required Calendar date, YYYY-MM-DD.numberstring The check number (default: the highest check number so far + 1, 1001 for the first)referencestring Receipt or confirmation numbermemostringlinesarray of DocumentLineInput, required What the money paid for: expense (or asset) accounts, or products and services (their purchase account and cost). No sales tax.attachmentsarray of object Receipt metadata (the file itself is not stored)dry_runbooleanconfidencenumbersoft_lock_override_reasonstring
- Responses
200Dry run: the document, its number, the exact entry, policy verdict; nothing written (DocumentResult)201Posted (DocumentResult)202Queued for approval (DocumentResult)- Errors
400,401,403,409,422,429,500(Error:error.type,message)
POST/v1/transfers
Move money between two bank, cash or card accounts (Dr the account it arrives in, Cr the one it leaves), e.g. to savings or to pay the card. Same governance as any entry; dry_run previews.
- Operation
createTransfer - Scope: propose
- Write: needs Idempotency-Key (or dry_run)
- Request body
from_accountstring, required The bank, cash or card account the money leavesto_accountstring, required The bank, cash or card account it arrives inamount_centsinteger, required Integer cents (100 = $1.00). Never a float.transfer_datestring, required Calendar date, YYYY-MM-DD.numberstring Optional; assigned (TRF-0001) when omittedreferencestringmemostringdry_runbooleanconfidencenumbersoft_lock_override_reasonstring
- Responses
200Dry run: the document, its number, the exact entry, policy verdict; nothing written (DocumentResult)201Posted (DocumentResult)202Queued for approval (DocumentResult)- Errors
400,401,403,409,422,429,500(Error:error.type,message)
POST/v1/documents/{id}/attachments
Record a receipt's or other file's metadata (name, type, size, SHA-256, note) on a posted document. The file itself is not stored; attachments are append-only. Audited; dry_run previews.
- Operation
addDocumentAttachment - Scope: propose
- Write: needs Idempotency-Key (or dry_run)
- Parameters
idpath, string, required
- Request body
file_namestring, required The file's name, without a pathcontent_typestring, required Media type, e.g. image/jpeg or application/pdfsize_bytesinteger, requiredsha256string SHA-256 of the file (lowercase hex): its fingerprint, to match a later upload or OCR runnotestringdry_runboolean
- Responses
200Dry run (object)201Recorded (object)- Errors
400,401,403,404,409,422,429,500(Error:error.type,message)