---
title: "Generate aged payables · Reports · COUNT Partner API"
description: "Generates an AP aging report as of a date. POST /partners/reports/aged-payables"
canonical: "https://developers.getcount.com/reference/reports/generate-aged-payables"
source: "https://developers.getcount.com/reference/reports/generate-aged-payables"
---
[Reports](https://developers.getcount.com/reference/reports) / Generate aged payables

# Generate aged payables

POST `/partners/reports/aged-payables`

Generates an AP aging report as of a date.

Payables mirror of aged receivables: open bills and vendor memos aged off the Accounts Payable control account. Query filters match aged receivables.

HMAC signature + Bearer access token

[Try this request](https://developers.getcount.com/tools/try-it?method=POST&path=%2Fpartners%2Freports%2Faged-payables)

[Chart of Accounts API](https://developers.getcount.com/reference/chart-of-accounts) [Tags API](https://developers.getcount.com/reference/tags) [Workspace Stats API](https://developers.getcount.com/reference/workspace-stats)

#### Query parameters

`asOfDate` date optional

As-of date for aging (YYYY-MM-DD). Alias for endDate — supply one.

`endDate` date optional

Alias for asOfDate.

`currency` string optional

Report currency. Defaults to workspace currency.

`agingBasis` enum optional

Age documents off due date (default) or posted/document date.

One of: `dueDate`, `postedDate`, `documentDate`

`tagUuids` string optional

Comma-separated tag UUIDs to filter by.

#### Responses

`200` Aged payables report generated.

`400` Missing or invalid query parameters.

`401` Missing or invalid HMAC signature, expired timestamp, or invalid Bearer token. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-401)

`403` The credential does not have access to this workspace or resource. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-403)

`429` Rate limit exceeded (100 requests per minute per clientId). Retry after the Retry-After header. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-429)

[Previous POST Generate aged receivables](https://developers.getcount.com/reference/reports/generate-aged-receivables) [Next POST Generate sales by product/service](https://developers.getcount.com/reference/reports/generate-sales-by-product-service)

POST `https://api.getcount.com/partners/reports/aged-payables`

Request

```javascript
import crypto from 'node:crypto';

const BASE_URL = 'https://api.getcount.com';
const CLIENT_ID = process.env.COUNT_CLIENT_ID;
const CLIENT_SECRET = process.env.COUNT_CLIENT_SECRET;
const ACCESS_TOKEN = process.env.COUNT_ACCESS_TOKEN;

const method = 'POST';
const signingPath = '/reports/aged-payables';
const timestamp = Math.floor(Date.now() / 1000).toString();
const bodyString = '';

const bodyHash = '';
const baseString = `${method}:${signingPath}:${timestamp}:${bodyHash}`;
const signature = crypto.createHmac('sha256', CLIENT_SECRET).update(baseString).digest('hex');

const response = await fetch(`${BASE_URL}/partners/reports/aged-payables`, {
  method,
  headers: {
    'x-client-id': CLIENT_ID,
    'x-timestamp': timestamp,
    'x-signature': signature,
    Authorization: `Bearer ${ACCESS_TOKEN}`,
  },
});

console.log(await response.json());
```

Response · 200

```json
{
  "status": "success",
  "message": "Success on generating aged payables report",
  "data": {
    "currency": "USD",
    "asOfDate": "2026-03-31",
    "rows": [
      {
        "documentUuid": "f6a7b8c9-d0e1-2345-fabc-456789012345",
        "documentNumber": "BILL-2042",
        "counterpartyUuid": "dfa3219e-6af8-4c53-997a-037534f63a35",
        "counterpartyName": "Acme Corporation",
        "dueDate": "2026-03-31",
        "ageDays": 12,
        "bucket": "notYetOverdue",
        "amountDue": 2500
      }
    ],
    "vendors": [
      {
        "counterpartyUuid": "aa11bb22-cc33-dd44-ee55-ff6677889901",
        "counterpartyName": "Office Supplies Co",
        "totals": {
          "between31And60": 900
        }
      }
    ],
    "totals": {
      "between31And60": 900
    },
    "reconciliation": {
      "controlAccountBalance": 900,
      "reportTotal": 900
    }
  }
}
```
