---
title: "Apply customer workflow transitions to multiple AP items"
method: POST
path: "/companies/{companyId}/ap/transitions/batch"
tags: ["AR/AP"]
---

# Apply customer workflow transitions to multiple AP items

`POST /companies/{companyId}/ap/transitions/batch`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/companies/{companyId}/ap/transitions/batch`
- Auth: HTTP bearer

DARK — 404s unless company_subledger_flags.ar_ap_items_enabled is true. Per-item atomic batch of the single-item transition (1..100 items, no duplicate itemIds). Returns 200 even on mixed outcomes — each entry in `results` carries its own `ok` flag and one item's failure never aborts a sibling. Envelope-level failures (auth, validation, entity authority) still surface as non-200.

## Request body

- object
  - `transitions` object[], required
    - `itemId` string, uuid, 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

## Response `200`

Batch processed; returns { results: [...] } where each entry is { itemId, ok: true, item } (item includes availableTransitions) or { itemId, ok: false, error: { code, message } }.

## Other responses

- `403`: Insufficient role for this company/entity
- `404`: AR/AP not enabled for this company
- `422`: Validation error on the batch envelope (VALIDATION_ERROR)

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) · [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) · [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/20090ea32b0d?raw)
