Accountant Portal

Record evidence before a write

Changed on

Agent key only. Reserves the run's row cap atomically. There is no amount cap: the amount at stake is read from the target rows by the server and recorded on the evidence, and never refuses a record. The returned evidence id authorizes exactly one write on the named action and target, sent with the X-Agent-Run-Id and X-Agent-Evidence-Id headers. That write is refused, before its evidence is used, with 409 AGENT_BOOKS_UNSOUND and extensions { reason, unwaivedCount } (#4323) unless the company's latest scheduled current_month integrity run finished under 26 hours ago, did not error, ran all 8 hard checks, and every hard-check violation is on an active waiver; reason is the first of no_run_within_26h, run_errored, hard_check_not_run, hard_check_red. Mounted only when the deployment enables the bookkeeping agent (default off); otherwise 404. The shared cloud-bookkeeping service token gets 404 here.

post/accountant/companies/{customerId}/agent/runs/{runId}/evidence

Request

  • Base URL
    https://api.medianfi.com/api/v1
  • Auth
    HTTP bearer

Path parameters

customerId, string uuid required
runId, string uuid required

Request body

BookkeepingAgentEvidenceInput required
actionType, 'recategorize' | 'match_document' | 'match_transfer' | 'complete_reconciliation' | 'queue_task' | 'repair_duplicate_stripe_je' | 'run_revenue' | 'run_bills' | 'run_close' required
targetType, string required
targetIds, string[] required
before, unknown
after, unknown
sources, unknown[]
reasoning, string
confidence, number

Response

Success envelope

object required

Changes

    • info

      added the new run_bills enum value to the request property actionType

    • info

      added the new run_close enum value to the request property actionType

    • info

      added the new run_revenue enum value to the request property actionType