# GET /api/invoicing/reports/aging/export/excel

Reports: Exports the accounts-receivable aging report as an Excel workbook.

Returns a downloadable .xlsx file carrying the aging summary, plus a per-invoice detail sheet
when the detail flag is set. Filters, currency handling, and the 50,000-invoice ceiling match
the report endpoint. Requires the report export permission in addition to the report
permission.

**Operation ID:** `GET_api_invoicing_reports_aging_export_excel`

## Authorization

Requires: Invoicing.Reports, Invoicing.Reports.Export, merchant scope.

Required permissions:
- `Invoicing.Reports`
- `Invoicing.Reports.Export`

## 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 exported workbook.

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

Schema type: `string(binary)`

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

Schema type: `string(binary)`

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

Schema type: `string(binary)`

### 400

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

### 403

The caller lacks the report export permission.

### 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.

### 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.
