---
title: "Interactive AR aging (buckets shared with /reports/ar-aging)"
method: GET
path: "/companies/{companyId}/receivables/aging"
tags: ["Receivables"]
---

# Interactive AR aging (buckets shared with /reports/ar-aging)

`GET /companies/{companyId}/receivables/aging`

## Request

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

DARK — 404s unless ar_ap_items_enabled. Buckets by due date with the SAME computeBucket boundaries (0/30/60/90 days past due) as the aging report so the two surfaces cannot drift. Amounts are outstanding cents. Items carry invoiceId, invoiceNumber, customerName, dueDate, daysOverdue, totalCents, outstandingCents, amountPaidCents, bucket, source. The aggregate and each item carry currency authority; an empty zero-value aggregate carries currency/minorUnitExponent as null/null.

## Query parameters

- `asOfDate` string, date

## Response `200`

{ asOfDate, grandTotalCents, buckets[5]: { id, label, amountCents, count }, items, currency, minorUnitExponent, unlinkedAccountantEntries? }

- 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
- `404`: AR/AP items not enabled for this company
- `422`: Invalid asOfDate or unavailable homogeneous two-decimal currency authority

---

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