Evenbead docs

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_id string The vendor paid (optional)
  • payment_account string, required The bank, cash or credit-card account the money left
  • doc_date string, required Calendar date, YYYY-MM-DD.
  • number string Optional; assigned (EXP-0001) when omitted
  • reference string Receipt or confirmation number
  • memo string
  • lines array of DocumentLineInput, required What the money paid for: expense (or asset) accounts, or products and services (their purchase account and cost). No sales tax.
  • attachments array of object Receipt metadata (the file itself is not stored)
  • dry_run boolean
  • confidence number
  • soft_lock_override_reason string
Responses
  • 200 Dry run: the document, its number, the exact entry, policy verdict; nothing written (DocumentResult)
  • 201 Posted (DocumentResult)
  • 202 Queued 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_id string The vendor paid (optional)
  • payment_account string, required The bank or cash account the check is drawn on
  • doc_date string, required Calendar date, YYYY-MM-DD.
  • number string The check number (default: the highest check number so far + 1, 1001 for the first)
  • reference string Receipt or confirmation number
  • memo string
  • lines array of DocumentLineInput, required What the money paid for: expense (or asset) accounts, or products and services (their purchase account and cost). No sales tax.
  • attachments array of object Receipt metadata (the file itself is not stored)
  • dry_run boolean
  • confidence number
  • soft_lock_override_reason string
Responses
  • 200 Dry run: the document, its number, the exact entry, policy verdict; nothing written (DocumentResult)
  • 201 Posted (DocumentResult)
  • 202 Queued 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_account string, required The bank, cash or card account the money leaves
  • to_account string, required The bank, cash or card account it arrives in
  • amount_cents integer, required Integer cents (100 = $1.00). Never a float.
  • transfer_date string, required Calendar date, YYYY-MM-DD.
  • number string Optional; assigned (TRF-0001) when omitted
  • reference string
  • memo string
  • dry_run boolean
  • confidence number
  • soft_lock_override_reason string
Responses
  • 200 Dry run: the document, its number, the exact entry, policy verdict; nothing written (DocumentResult)
  • 201 Posted (DocumentResult)
  • 202 Queued 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
  • id path, string, required
Request body
  • file_name string, required The file's name, without a path
  • content_type string, required Media type, e.g. image/jpeg or application/pdf
  • size_bytes integer, required
  • sha256 string SHA-256 of the file (lowercase hex): its fingerprint, to match a later upload or OCR run
  • note string
  • dry_run boolean
Responses
  • 200 Dry run (object)
  • 201 Recorded (object)
  • Errors 400, 401, 403, 404, 409, 422, 429, 500 (Error: error.type, message)