AR/AP

Apply a customer workflow transition to an AP item

DARK — 404s unless company_subledger_flags.ar_ap_items_enabled is true. Workflow-only customer state machine (Wave 2, Option A); no money moves and no journal entry is posted. scheduled records a payment-intent date (requires scheduledPayDate); unscheduled cancels that intent; recorded_paid is a fail-closed reflection of an already-applied bank match that covers the bill (requires matchedTransactionId) and never touches the reconciled transaction. The response echoes the updated item plus its recomputed availableTransitions.

post/companies/{companyId}/ap/{id}/transitions

Request

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

Path parameters

companyId, string uuid required
id, 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.

Request body

object required
to, 'scheduled' | 'unscheduled' | 'recorded_paid' | 'void' required
scheduledPayDate, string date

Required when to=scheduled (YYYY-MM-DD).

matchedTransactionId, string uuid

Required when to=recorded_paid.

reason, string nullable

Optional reason; recorded on void (terminal cancellation) and recorded_paid.

Response

Transition applied; returns the AP item (with availableTransitions). void is a terminal cancellation delegating to the FSM void edge (open/partially_paid/paid → void); no money moves and the customer is offered no re-open target.

Changes

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