Batch
1 operation. All areas
POST/v1/batches
Write up to 50 expenses, checks, bills, invoices, journal entries and bank-line codings in one call (ADR-0201). Each item runs through exactly the operation it names, with that operation's checks, the same policy (an agent's threshold, confidence floor, first-time vendor, sensitive accounts, period locks, an AI app's daily cap, counted item by item in the database) and its own audit events linked to the batch (meta.batch). No bulk bypass: an agent's expenses, bills, invoices and entries are proposals a person approves, exactly as one by one. mode per_item (default): each item commits or is refused on its own, a refused item writes nothing; atomic: all or nothing (any refusal answers 422 batch_refused with every item's verdict, and nothing is written). dry_run previews every item. Idempotency per batch (the Idempotency-Key header replays the whole answer) and per item (idempotency_key, or "<batch key>.<index>"). Rate limits: a batch counts as one request per item.
- Operation
createBatch - Scope: propose
- Write: needs Idempotency-Key (or dry_run)
- Request body
itemsarray of BatchItem, requiredmode"per_item" | "atomic" per_item (default): partial success, each item on its own; atomic: every item or nonedry_runboolean Preview every item (each against the books as they are now); nothing is written
- Responses
200Every item's verdict, in order (a dry run: what each would do; nothing written) (BatchResult)- Errors
400,401,403,409,422,429,500(Error:error.type,message)