> ## 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 Receivables API

> Retrieve aged receivables from a Breezing account report, with unpaid issued invoices grouped by customer and bucketed by days past due.



## OpenAPI

````yaml GET /reports/{id}/aged-receivables
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-receivables:
    get:
      tags:
        - Reports
      summary: Aged receivables of an account report
      description: >-
        Issued invoices still owed as of the account report's end day, in the
        company currency, grouped per customer and bucketed by days past due
        like the aged payables. Only issued invoices in the books count (saved
        as sent, issue date on or before the end day). Outstanding = the
        invoice's booked company currency total minus what its payments dated on
        or before the end day applied. The total sits next to the Accounts
        Receivable closing balance of the same report; notInBooks counts the
        sent invoices left out because they carry no booking stamp. 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 receivables
          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'
                      arAccount:
                        type: object
                        nullable: true
                        properties:
                          code:
                            type: string
                          name:
                            type: string
                          closingBalance:
                            type: string
                            description: >-
                              The Accounts Receivable closing balance in the
                              report, debit 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 Receivable
                          account or the report is not finished.
                      notInBooks:
                        type: number
                        description: >-
                          Sent invoices issued on or before the day that are not
                          in the books (no booking stamp, sent before issued
                          invoices were booked) and are left out. Save one as
                          sent again to book it.
                    required:
                      - report
                      - asOf
                      - currency
                      - sections
                      - arAccount
                      - notInBooks
                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.