---
title: "Get accounts payable aging"
method: GET
path: "/v1/platform/businesses/{business_id}/insights/ap-aging/"
tags: ["Insights", "Accounts Payable"]
---

# Get accounts payable aging

`GET /v1/platform/businesses/{business_id}/insights/ap-aging/`

## Request

- Base URL: `https://docs.thredfi.com` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.thredfi.com/v1/platform/businesses/{business_id}/insights/ap-aging/`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer
  - HTTP basic
  - HTTP bearer
  - HTTP bearer

Retrieve AP aging analysis grouped by vendor.

        **Aging buckets:**
        - Current: Not yet due (0 days overdue)
        - 1-30 days: 1-30 days overdue
        - 31-60 days: 31-60 days overdue
        - 61-90 days: 61-90 days overdue
        - 90+ days: 90 or more days overdue

        **Returns:**
        - Total outstanding across all vendors
        - Total aging buckets (sum across all vendors)
        - Per-vendor breakdown (sorted by total outstanding descending)

        All values are in cents. Currency is the business's base currency.

## Path parameters

- `business_id` string, uuid, required

## Query parameters

- `as_of_date` string, date
- `group_by` 'total' | 'vendor'

## Response `200`

- APAging[]
  - `business_id` string, uuid, required: Business UUID
  - `as_of_date` string, date, required: Date to calculate aging as of
  - `group_by` 'vendor' | 'total', required: Grouping: 'vendor' or 'total' * `vendor` - vendor * `total` - total
  - `currency` string, required: Business base currency (e.g., EUR, GBP, USD)
  - `total_outstanding_cents` integer, required: Total outstanding across all vendors in cents
  - `total_aging_buckets` APAgingBuckets, required: Aging buckets for outstanding amounts. Buckets: - current: Due today or in the future (0 days overdue or negative) - 1_30_days: 1-30 days overdue - 31_60_days: 31-60 days overdue - 61_90_days: 61-90 days overdue - over_90_days: 90+ days overdue All amounts in cents.
    - `current` integer, required: Amount not yet due (0 days overdue) in cents
    - `days_1_30` integer, required: Amount 1-30 days overdue in cents
    - `days_31_60` integer, required: Amount 31-60 days overdue in cents
    - `days_61_90` integer, required: Amount 61-90 days overdue in cents
    - `over_90_days` integer, required: Amount 90+ days overdue in cents
  - `vendors` VendorAging[], required: Per-vendor aging breakdown (sorted by total outstanding descending)
    - `vendor_id` string, uuid, required: Vendor UUID
    - `vendor_name` string, required: Vendor name (company_name or individual_name)
    - `total_outstanding_cents` integer, required: Total outstanding amount for this vendor in cents
    - `aging_buckets` APAgingBuckets, required: Aging buckets for outstanding amounts. Buckets: - current: Due today or in the future (0 days overdue or negative) - 1_30_days: 1-30 days overdue - 31_60_days: 31-60 days overdue - 61_90_days: 61-90 days overdue - over_90_days: 90+ days overdue All amounts in cents.
      - `current` integer, required: Amount not yet due (0 days overdue) in cents
      - `days_1_30` integer, required: Amount 1-30 days overdue in cents
      - `days_31_60` integer, required: Amount 31-60 days overdue in cents
      - `days_61_90` integer, required: Amount 61-90 days overdue in cents
      - `over_90_days` integer, required: Amount 90+ days overdue in cents

## Other responses

- `400`: Validation errors in request data
- `401`: Authentication required - missing or invalid API key
- `403`: Permission denied - insufficient privileges
- `404`: Resource not found
- `409`: Conflict - resource already exists or invalid state transition
- `422`: Unprocessable entity - business logic validation failed
- `500`: Internal server error

---

[API](https://skmtc.dev/thredfi/apis/thredfi-accounting-platform-api.md) - [All operations](https://skmtc.dev/thredfi/apis/thredfi-accounting-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/thredfi/apis/thredfi-accounting-platform-api/revisions/0c1918254db3?raw)
