Developer

Proposals

Ask Trabalance to draft a document, then approve it — the same producer a person uses, never a direct posting.

A proposal is a request to run one of Trabalance's own producers. Your app describes what it wants; a person in the business approves it; approval posts the document exactly as if they had keyed it in. Nothing an app proposes reaches the books on its own.

Mint a key with the Proposals option (Settings → API keys). The option is not a licence to post: every call is still checked against the key's own scopes and the live rights of the person the key belongs to.

What may be proposed

bash
curl https://api.trabalance.com/api/v1/proposals/kinds -H "Authorization: Bearer tk_live_…"
KindPostsNeeds
draft_invoiceAn invoicesales_invoices (create)
draft_billA supplier bill — priced from the item cost, not your selling ratepurchases_bills (create)
record_receiptA customer receipt, allocated by settlement ordersales_receipts (create)
record_paymentA payment to a supplier, allocated by settlement orderpurchases_payments (create)
import_orderAn invoice from a connected store ordersales_invoices (create)
classify_bank_linesCategorisations for uncategorised statement linesfinance_banking (create)
chase_overdue · month_close · watch_risks · cash_outlookNothing — these are reviews you signa read right

Propose, then decide

bash
# 1. propose — nothing is posted
curl -X POST https://api.trabalance.com/api/v1/proposals \
-H "Authorization: Bearer tk_live_…" -H "Content-Type: application/json" \
-d '{"kind":"draft_invoice","input":{"customer":"<id>","lines":[{"item":"<id>","qty":2,"rate":50}]}}'

# 2. read it back — the exact payload and the evidence behind it
curl https://api.trabalance.com/api/v1/proposals/<id> -H "Authorization: Bearer tk_live_…"

# 3. approve — this is what posts, through the ordinary producer
curl -X POST https://api.trabalance.com/api/v1/proposals/<id>/approve \
-H "Authorization: Bearer tk_live_…" -H "Content-Type: application/json" -d '{"note":"ok"}'

Free text works too — {"kind":"draft_bill","input":{"text":"Bill from Acme for 3 widgets at 50"}} — and a document your users upload can be proposed with {"intake_job_id":"…"}.

ℹ️Approving is not always the last step

If the business runs an approval workflow on that document type, the proposal says so before you approve it, and posting still routes to their approvers. An approve that answers applied has posted; one that answers approved is on its way.

Listening

Subscribe a webhook to proposal.created and proposal.applied to follow the decision without polling.

Errors you should expect

StatusMeaning
400The kind is unknown, or the input is missing a field — the message names it
403The key or its user does not hold the right this kind needs
404No such proposal in this business
409Already decided, or the upload has already been used
422Trabalance will not guess: an unmatched party, a line that is not in the catalogue, or more money than the party has open