# GET /api/invoicing/reports/aging

Reports: Retrieves the accounts-receivable aging report.

Buckets each outstanding balance by days past due as of the requested date (current UTC when
omitted), grouped by biller or recipient, with per-currency grand totals. Balances are never
summed across currencies: a party holding balances in two currencies yields two group rows.
The report covers at most 50,000 outstanding invoices; a wider receivable set is rejected so a
partial total is never mistaken for a complete one. Narrow by biller, recipient, or currency.

**Operation ID:** `GET_api_invoicing_reports_aging`

## Authorization

Requires: Invoicing.Reports, merchant scope.

Required permissions:
- `Invoicing.Reports`

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| AsOfDate | query | no | string(date-time) | The date the report ages outstanding balances against. When null the  application service uses the current UTC date. Buckets are computed as the  number of days each invoice's due date precedes this date. |
| BillerId | query | no | string(uuid) | Restrict to a single biller. |
| BillerType | query | no | WinkPGInvoicingInvoicePartyType | Restrict to a single biller type. |
| RecipientId | query | no | string(uuid) | Restrict to a single recipient. |
| Currency | query | no | string | Restrict to a single ISO 4217 currency code. |
| GroupBy | query | no | WinkPGInvoicingInvoiceAgingGroupBy | Dimension to group outstanding balances by. Defaults to recipient. |
| IncludeLineDetail | query | no | boolean | When true, each group also carries the individual outstanding invoices that  make it up (number, due date, days past due, bucket, balance). When false,  only the bucketed totals are returned. |
| suppressNulls | query | no | boolean | If true, omit properties with null values. |

## Responses

### 200

The aging report.

**Content type:** `text/plain`

Schema: `WinkPGInvoicingInvoiceAgingReportDto`

**Content type:** `application/json`

Schema: `WinkPGInvoicingInvoiceAgingReportDto`

**Content type:** `text/json`

Schema: `WinkPGInvoicingInvoiceAgingReportDto`

### 400

The receivable set exceeds the report row ceiling
(`Invoicing:Report:RowLimitExceeded`). Narrow by biller, recipient, or currency and retry.

### 404

The caller's biller scope does not cover the requested biller
(`Invoicing:Biller:ForeignBillerNotAllowed`). Reported as not-found rather than
forbidden so the response cannot be used to probe which billers exist.

### 403

Forbidden

**Content type:** `text/plain`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `text/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

### 401

Unauthorized

**Content type:** `text/plain`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `text/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

### 501

Not Implemented

**Content type:** `text/plain`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `text/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

### 500

Internal Server Error

**Content type:** `text/plain`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

**Content type:** `text/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

### default

The request failed. The body carries the standard error envelope: a machine-readable `error.code`, a human-readable `error.message`, and `error.validationErrors` when the failure was a validation rejection. See the error-code reference in this document's description for the values `error.code` can take.

**Content type:** `application/json`

Schema: `WinkPGHttpRemoteServiceErrorResponse`

## See also

- [All documentation](https://docs.winkpg.io/llms.txt): the machine-readable index of every public page on this site.
