---
title: "Accounts payable aging report"
method: GET
path: "/companies/{companyId}/reports/ap-aging"
tags: ["Reports"]
---

# Accounts payable aging report

`GET /companies/{companyId}/reports/ap-aging`

## Request

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

Returns unpaid bills grouped by vendor and by age bucket (current, 1-30, 31-60, 61-90, 90+) based on due date vs asOfDate. The aggregate and each line item carry currency/minorUnitExponent; mixed, invalid, missing, and non-two-decimal currency authority fails closed with 422 rather than publishing a false total.

## Query parameters

- `asOfDate` string, date

## Response `200`

AP aging payload

- object
  - `success` boolean
  - `data` object
    - `unlinkedAccountantEntries` UnlinkedAccountantEntries: #1417: posted accountant invoice, bill or payment entries (business-event journal entries on the receivables or payables side of the conversion ownership map) that have no AR/AP item linked to the entry or its event. They are in the general ledger but not in this aging. Present only when the company reads AR/AP from the items tables; absent otherwise. `count` is exact; `items` is capped at 50, newest first.
      - `count` integer, required
      - `items` UnlinkedAccountantEntry[], required
        - `journalEntryId` string, uuid, required
        - `entryDate` string, date, required
        - `eventType` string, required: Stored business-event type, e.g. vendor_bill
        - `amountCents` integer, nullable, required: Total debits in minor units; null when the entry has no single-currency lines.
        - `currency` string, nullable, required

## Other responses

- `401`: Authentication required
- `422`: MONETARY_AGGREGATE_CURRENCY_UNAVAILABLE

---

[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)
