> ## Documentation Index
> Fetch the complete documentation index at: https://learn.breezing.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Aged Payables API

> Retrieve aged payables from a Breezing account report, with unpaid received invoices grouped by vendor and bucketed by days past due.



## OpenAPI

````yaml GET /reports/{id}/aged-payables
openapi: 3.1.0
info:
  title: Breezing Public API
  version: 1.0.0
  description: >-
    Crypto accounting API for programmatic access and AI agents. Authenticate
    with an API key using the Authorization header: `Bearer brz_...`
servers:
  - url: https://api.breezing.io/v1
security:
  - BearerAuth: []
paths:
  /reports/{id}/aged-payables:
    get:
      tags:
        - Reports
      summary: Aged payables of an account report
      description: >-
        Received invoices still owed as of the account report's end day, in the
        company currency, grouped per vendor and bucketed by days past due
        (current, 1 to 30, 31 to 60, 61 to 90, over 90; overdue from the day
        after the due date). Only approved invoices that are in the books count,
        with their effective day (GL impact date, else invoice date) on or
        before the end day. Outstanding = the invoice's company currency total
        minus what its payments dated on or before the end day applied; an
        invoice settled through a clearing account is paid once its latest
        linked payment is on or before the end day, or once a provider payment
        is recorded. Credit notes are negative. The total sits next to the
        Accounts Payable closing balance of the same report. Read live at every
        call, nothing stored.
      parameters:
        - schema:
            type: string
            description: Report ID
            example: '3'
          required: true
          description: Report ID
          name: id
          in: path
        - schema:
            type: string
            description: >-
              Organization ID. Use GET /v1/companies to discover available
              org/company pairs.
            example: '1'
          required: true
          description: >-
            Organization ID. Use GET /v1/companies to discover available
            org/company pairs.
          name: orgId
          in: query
        - schema:
            type: string
            description: >-
              Company ID. Use GET /v1/companies to discover available companies
              and their access levels.
            example: '1'
          required: true
          description: >-
            Company ID. Use GET /v1/companies to discover available companies
            and their access levels.
          name: companyId
          in: query
      responses:
        '200':
          description: Aged payables
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      report:
                        type: object
                        properties:
                          id:
                            type: number
                          name:
                            type: string
                            nullable: true
                          status:
                            type: string
                            nullable: true
                          dateFrom:
                            type: string
                          dateTo:
                            type: string
                        required:
                          - id
                          - name
                          - status
                          - dateFrom
                          - dateTo
                      asOf:
                        type: string
                        description: The report end day, yyyy-MM-dd (UTC).
                      currency:
                        type: string
                        description: The company currency.
                      sections:
                        type: array
                        items:
                          $ref: '#/components/schemas/AgingSection'
                      apAccount:
                        type: object
                        nullable: true
                        properties:
                          code:
                            type: string
                          name:
                            type: string
                          closingBalance:
                            type: string
                            description: >-
                              The Accounts Payable closing balance in the
                              report, credit positive.
                          difference:
                            type: string
                            description: >-
                              Aging total minus closingBalance. Shown, never
                              plugged: manual journals on the account, invoices
                              booked or paid after the report ran, or settings
                              changed since are the usual causes.
                        required:
                          - code
                          - name
                          - closingBalance
                          - difference
                        description: >-
                          null when the company has no Accounts Payable account
                          or the report is not finished.
                    required:
                      - report
                      - asOf
                      - currency
                      - sections
                      - apAccount
                required:
                  - success
                  - data
        '400':
          description: Not an account report
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '403':
          description: >-
            API key has no access to this company, has read-only access where
            write was required, or the company subscription is inactive
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '404':
          description: Report not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
      security:
        - BearerAuth: []
components:
  schemas:
    AgingSection:
      type: object
      properties:
        currency:
          type: string
        amounts:
          $ref: '#/components/schemas/AgingAmounts'
        groups:
          type: array
          items:
            type: object
            properties:
              counterparty:
                type: string
              amounts:
                $ref: '#/components/schemas/AgingAmounts'
              rows:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: number
                      description: The invoice id.
                    counterparty:
                      type: string
                    reference:
                      type: string
                      description: The invoice number.
                    issueDay:
                      type: string
                      description: yyyy-MM-dd (UTC).
                    dueDay:
                      type: string
                      description: >-
                        yyyy-MM-dd (UTC); the invoice or issue day when the
                        invoice has no due date.
                    currency:
                      type: string
                    amount:
                      type: string
                      description: Outstanding amount, signed (a credit note is negative).
                    daysPastDue:
                      type: integer
                      description: >-
                        Whole UTC days past the due day as of the report end
                        day; 0 or less is not yet due.
                    bucket:
                      type: string
                      enum:
                        - current
                        - days1to30
                        - days31to60
                        - days61to90
                        - over90
                  required:
                    - id
                    - counterparty
                    - reference
                    - issueDay
                    - dueDay
                    - currency
                    - amount
                    - daysPastDue
                    - bucket
            required:
              - counterparty
              - amounts
              - rows
      required:
        - currency
        - amounts
        - groups
    AgingAmounts:
      type: object
      properties:
        current:
          type: string
          description: Not yet due.
        days1to30:
          type: string
        days31to60:
          type: string
        days61to90:
          type: string
        over90:
          type: string
        total:
          type: string
        overdue:
          type: string
          description: Every bucket but current.
      required:
        - current
        - days1to30
        - days31to60
        - days61to90
        - over90
        - total
        - overdue

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.