---
title: "Do next, in order, root cause first (#2587 p7)"
method: GET
path: "/accountant/companies/{customerId}/do-next"
tags: ["Accountant Portal"]
---

# Do next, in order, root cause first (#2587 p7)

`GET /accountant/companies/{customerId}/do-next`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/do-next`
- Auth: HTTP bearer

One client's open Inbox items as ordered steps, composed only from the Inbox (the same items and the same `waitingSince`; no new store). `month` (YYYY-MM; default the current UTC month) keeps items that began waiting on or before the month's last day. Order: what you can do before what the client must do (`who: "client"` last); then items that block a close step; then root cause first (a feed before the rows it holds up: bank feeds, held documents and Stripe holds, ledger changes and reconcile, then categorize, revenue and bills, then close prep and mail); then the close step's place in the checklist; then the oldest waiting; then id. `clears` names the function, what hangs off a blocked close step (B1 cash tie-out M1, B4 payroll clearing M4) and the close step itself. `minutes` is the person's own time, a fixed estimate per closing action (0 when the client acts), not a measurement. `then: "client"` is set where the client answers after the person's send (reconnect, get journal). `action` is the Inbox closing action and the item to act on. At most 50 steps; `meta.total` is the number returned, `meta.waitingOnUs` the true count waiting on us (PG-p07-002). Read-only; the read is the Inbox's own list, so it carries the Inbox's access rule. A signed-in person only: every API key is refused, the service token included (404).

## Path parameters

- `customerId` string, uuid, required

## Query parameters

- `month` string

## Response `200`

The ordered steps

- object
  - `success` true, required
  - `data` object[], required
    - `order` integer, required
    - `title` string, required
    - `clears` string[], required
    - `who` 'you' | 'client', required
    - `then` 'client' | 'null', nullable, required
    - `minutes` integer, required
    - `waitingSince` string, date-time, required
    - `action` object, required
      - `kind` 'approve' | 'answer' | 'decide' | 'close_flag' | 'assign_client' | 'get_journal' | 'record_payment' | 'reconnect' | 'await_statement' | 'resolve_at_source' | 'sign_off', required
      - `inboxItemId` string, uuid, required
  - `meta` object, required
    - `month` string, required
    - `total` integer, required
    - `waitingOnUs` integer, required: PG-p07-002: every open item in the month that waits on us (who you), for 'N waiting on us'; not capped at the 50 steps.
    - `oldestWaitingSince` string, date-time, nullable, required: The oldest waitingSince among those items; null when none.
    - `countCapped` boolean, required: True when more open items exist than the 1,000 read; waitingOnUs is then a floor.

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `404`: Resource not found
- `422`: Request failed validation

## Changes

- **2026-11-26** `4a2098becaf9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/accountant/companies/:customerId/do-next/get.md)

---

[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/4f4c2d34276b?raw)
