Automations
Durable accounting recipes, from contact upserts to accepting a quote and raising its invoice, that resume from their last completed step after a failure.
Queue a recipe with POST /v1/automations:
{
"connection_id": "00000000-0000-0000-0000-000000000000",
"recipe": "quote.accept_and_create_invoice",
"input": {
"quote_resource_id": "00000000-0000-0000-0000-000000000000",
"external_reference": "deal_814"
}
}Recipes
| Recipe | Result | Runs on |
|---|---|---|
contact.upsert | Creates or reconciles a contact | All six |
item.upsert | Creates or updates a catalog item or SKU | Xero, QuickBooks Online |
quote.draft | Creates a draft quote | Xero, NetSuite |
quote.accept_and_create_invoice | Accepts a quote, creates a linked draft invoice, and optionally creates supplier POs | Xero |
invoice.create | Creates an invoice | All six |
invoice.record_payment | Records a payment against an invoice | Xero, QuickBooks Online, NetSuite, FreshBooks, Wave |
purchase_order.create | Creates a purchase order | Xero, QuickBooks Online, NetSuite |
document.fetch | Fetches an invoice, quote, or purchase-order PDF | Xero; invoices only on QuickBooks Online and Wave |
Linked supplier purchase orders on quote acceptance
quote.accept_and_create_invoice accepts an optional purchase_orders array alongside the quote
and invoice fields. Each entry specifies a supplier_contact_id, line_items, and optional
external_reference, issue_date, delivery_date, currency, or status. AccountingKit
validates every supplier PO before making any provider write, then executes one durable step per
supplier (create_purchase_order:<index>) with cross-linked references so a transient failure on
one supplier resumes without duplicating the invoice or earlier purchase orders.
Recipes need a cached connection; a zero-retention connection rejects them.
Every recipe runs as a durable operation: claimed under a lease, retried with bounded exponential
backoff, resumed from its last completed step, and moved to dead_letter when attempts are
exhausted rather than failing silently. Operations covers the states, the
reconciliation safety net, and replay.
An automation run is metered once, after it succeeds. Failed attempts do not create duplicate usage events.
Concepts
The building blocks of AccountingKit: organizations, test and live environments, provider apps, connections, resources, operations, and idempotency.
Webhooks
Receive signed AccountingKit events for connections, syncs, invoices, and automations, verify their signatures, and configure inbound Xero, QuickBooks Online, FreshBooks, and Wave callbacks.