---
title: "How each row of a client's month was settled (#2587 p8)"
method: GET
path: "/accountant/companies/{customerId}/transactions/settlement"
tags: ["Accountant Portal"]
---

# How each row of a client's month was settled (#2587 p8)

`GET /accountant/companies/{customerId}/transactions/settlement`

## Request

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

Every live transaction of the client dated in `month` (YYYY-MM; default the current UTC month; any month, closed ones included), with how it was settled and why each other row waits for a person. A row needs a person while it is `needs_review`, has no category, or sits on a review-hold account (suspense, Uncategorized). A settled row is `person` when a person set or approved its current category last; `rule`, `history` or `penny` when Penny posted it (a cited rule, the payee's history, her own model call); otherwise `rule` for the engine's rule sources, `penny` for an engine model guess, `person` for a manual source, else `unclassified`. `counts` and `pennySettledPct` (round(100 * pennySettled / all), null when the month has no rows) always cover the whole month; `rows` lists the first `rowLimit` rows, oldest first, and `truncated` says more exist. `rulesOnly` is the patient-data setting Penny reads (no model calls). `whyPerson.label` is fixed wording keyed by `whyPerson.code`. `merchantRule` is the merchant rule cited by the row's newest categorization (#3039), or null, with its last 90 days as GET …/merchant-rule-stats reads them (zero counts when the rule had no hit in the window); `peopleKeepCorrecting` is that read's flag. Read-only: nothing is written and no model is called. 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 month's settled-by counts and rows

- object
  - `success` true, required
  - `data` object, required
    - `companyId` string, uuid, required
    - `month` string, required
    - `dateFrom` string, date, required
    - `dateTo` string, date, required
    - `rulesOnly` boolean, required
    - `counts` object, required
      - `all` integer, required
      - `needsPerson` integer, required
      - `pennySettled` integer, required
      - `byRule` integer, required
      - `byHistory` integer, required
      - `byPennyCall` integer, required
      - `byPerson` integer, required
      - `unclassified` integer, required
    - `pennySettledPct` integer, nullable, required
    - `rows` object[], required
      - `transactionId` string, uuid, required
      - `group` 'needs_person' | 'penny_settled' | 'person' | 'unclassified', required
      - `settledBy` 'rule' | 'history' | 'penny' | 'person' | 'null', nullable, required
      - `whyPerson` object, nullable, required
        - `code` 'penny_unsure' | 'no_history' | 'no_precedent' | 'sources_disagree' | 'sent_back' | 'money_line' | 'rules_only' | 'other', required
        - `label` string, required
      - `proposedCategory` object, nullable, required: Penny's newest non-hold, non-bank/card proposed GL account from agent_decisions on a needs_person row (with optional agent_evidence reasoning), or null (PG-p08-008).
        - `id` string, uuid, required
        - `code` string, required
        - `name` string, required
        - `reason` string, nullable, required: Single-line plain-text reasoning from agent_evidence, sanitized and capped at 240 characters (#5104).
      - `merchantRule` object, nullable, required
        - `ruleId` string, required
        - `hits` integer, required
        - `correctedByPeople` integer, required
        - `lastCorrection` object, nullable, required
          - `at` string, date-time, required
          - `userId` string, nullable, required
          - `name` string, nullable, required
        - `peopleKeepCorrecting` boolean, required
    - `truncated` boolean, required
    - `rowLimit` integer, required

## Other responses

- `401`: Authentication required
- `403`: Insufficient permissions or not a company member
- `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/transactions/settlement/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)
