Posting events

You describe what happened in plain business terms; SYNC checks it, applies the business’s own posting rules and writes one balanced journal entry. You never send debits and credits; a few fields can name one of the business’s accounts where you know it, such as the bank a payment went into.

The events

What every event has

  • external_id: your own id for it, unique for each connection. SYNC refuses a second one with duplicate_external_id, so a retry never books twice, and later events refer to it (a refund names the sale it refunds).
  • occurred_on: the business date it happened, YYYY-MM-DD.
  • currency, memo, and dimensions such as {"location": "maui"} to tag it.

What comes back

202 with the event. Its status is posted with the journal_entry_id, or needs_review when the business has to tell SYNC something first, such as which income account a new category goes to. Once they have, the held event is re-posted, from SYNC or with POST /v1/events/{event_id}/repost; you don’t send it again. An event SYNC can’t accept at all is refused with an error, and nothing is stored.

Corrections

  • An invoice or bill is voided with the same endpoint and action: "void".
  • A sale is refunded, line by line, with a refund event; money given back from a sale or a customer payment by amount is a payment refund.
  • Anything else: the business reverses the entry in SYNC. Posted entries are never edited.

Next: webhooks.