AR/AP

Create an invoice from the composer (server-owned totals)

DARK — 404s unless ar_ap_items_enabled. Line items carry revenue category, quantity, unit price, tax bps, and a per-line service period; every line subtotal/tax/total and the item amount_cents are recomputed server-side (client totals are rejected by the strict schema). dueDate derives from terms when not supplied; status "sent" composes and sends in one call.

post/companies/{companyId}/ar/compose

Request

  • Base URL
    https://api.medianfi.com/api/v1
  • Auth
    HTTP bearer

Path parameters

companyId, string uuid required

Query parameters

entityId, string uuid

Concrete legal entity that owns this AR/AP request. Omission is accepted only when the actor is authorized to exactly one concrete entity; consolidated scope cannot mutate or serve these entity-only resources.

Headers

X-Median-App-Surface, 'qa'

Optional customer-app bundle marker for production-promoted demo-parity routes. Production customer calls omit this header. When present, qa selects the QA bundle and the server additionally requires an allowlisted test company with persisted client_status=test.

Response

Invoice created (item with lines and availableTransitions)

Changes

No recorded changes to this operation across all 110 revisions of this API.