Business Events

Create a business event and post its journal entry

Strict by default (#1705/#1790/#1815): a request that cannot produce a journal entry — unknown event type, unresolvable accounts, or a resolve-time posting blocker (closed or missing period, filing-locked period, locked/non-postable account, out-of-domain date) — returns 422 naming the blocker, before any row is written. Pass allowWithoutJournalEntry: true to save the event with jeGenerationSkipped instead and retry-post after fixing the blocker. A client idempotencyKey identifies one create operation within this company. An identical completed request returns its existing event with 200 and idempotentReplay: true; this never posts again. A changed request or unfinished/uncertain create returns 409. Safely skipped stored outcomes remain visible on replay. A keyed posting or schedule failure returns 409 even on its first response and stays held for review because its write may already have committed. Exception (#2529): when a vendor bill's journal entry posts but its Payables bill cannot be written, the entry is voided and the outcome is known, so the create completes with 201 and jeGenerationError naming the reason; the event stays listed and can be retried or deleted. Vendor bills (#2529) also return 422 field errors for parameters.apItemId (must be a UUID), parameters.dueDate (a real YYYY-MM-DD date, not before the bill date) and parameters.createNewApItem (boolean; not together with apItemId).

post/companies/{companyId}/business-events

Request

  • Base URL: https://api.medianfi.com/api/v1
  • URL: https://api.medianfi.com/api/v1/companies/{companyId}/business-events
  • Auth: HTTP bearer

Request body

idempotencyKeystring

Optional trimmed client operation key, unique per company. Retain it across retries; use a new key for a new intentional operation. Keyless legacy creates remain separate. Customer creates compare canonical request values (object key order ignored) and bind the authorized primary entity; unfinished creates require review and cannot be retried as new postings.

eventTypestring

Generator key, e.g. adjusting_entry. Defaults to "custom" when absent.

titlestring
descriptionstring nullable
amountCentsinteger
eventDatestring

ISO date (YYYY-MM-DD). Derived from parameters or today when absent.

parametersobject

Generator parameters (e.g. debitAccount, creditAccount, amount).

allowWithoutJournalEntryboolean

Opt into the save-now/fix-later flow — the event saves with metadata.jeGenerationSkipped naming the blocker instead of the request failing with 422.

entityIdstring uuid

Response

Completed operation replayed without creating or posting again; a safely skipped outcome remains visible

successboolean

Changes

No recorded changes to this operation across all 1 revision of this API.