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

# Customer balances

> Company-wide balance per customer, per currency.

Read-only report: nothing on this page can be created, updated or deleted through the API.

* `AsOfDate` (optional, date + time, ISO 8601 — e.g. `2026-09-25T14:30:00`) counts only movements **strictly before** this date and time; if omitted, the current date and time is used. For example, sending `2026-09-25T00:00:00` excludes the 25th itself (from 00:00 onward) and everything after, including only movements up to the 24th; sending `2026-09-25T14:30:00` includes movements up to 14:30 on September 25th (that moment itself excluded) — adjust the time to get the balance at any point within a day.
* There is **no `StartDate`**: this differs from the [customer transactions](/en/v1/finance/customers/transactions) report, which has a date range. Here there is only a single cutoff, and all history up to that point is summed.
* The response is grouped per customer: each customer has `CustomerCode`/`CustomerName` and a `Balances` list (per-currency `Debit`/`Credit`/`Balance`). A customer with movements in more than one currency has more than one entry in `Balances`.
* Only customers with **at least one movement** before `AsOfDate` appear; customers with no movements at all are not returned.
* `ExcludeZeroBalance` (optional, defaults to `false`): when `true`, currency entries whose balance is exactly `0` are left out of `Balances`; a customer whose **every** currency nets to `0` is left out of the list entirely (it does not come back with an empty `Balances`). This filter applies **before** pagination, so `TotalCount` and page contents reflect it too.
* `MinAbsoluteBalance` (optional, number): when set, currency entries whose balance's absolute value is **less than or equal to** this threshold are left out of `Balances` (e.g. sending `100` excludes everything from `-100` to `100` inclusive — only balances with an absolute value strictly greater than `100` remain). Useful for filtering out small residual balances (e.g. rounding differences); can be combined with `ExcludeZeroBalance`. This filter also applies **before** pagination.
* Pagination (`page`/`pageSize`, up to 50) is over the **number of customers**; a customer's currencies always stay on the same page. There is no search parameter.
* `Balance` = `Debit - Credit`; a positive value means the customer owes the company.

## Error codes

This endpoint has no endpoint-specific error codes. The [general errors](/en/v1/guides/result-codes) that apply to every endpoint (authentication, permissions, request headers, daily limit) still apply.


## OpenAPI

````yaml api-reference/openapi.json GET /api/v1/finance/customers/balances
openapi: 3.1.1
info:
  title: Noyax API
  description: Server-to-server API for integrations to access Noyax data.
  version: '1.0'
servers:
  - url: https://dev.noyax.com/services/noyax_api
security:
  - Bearer: []
tags:
  - name: Sections
  - name: Warehouses
  - name: Quotes
  - name: Product Critical Stock
  - name: Product groups
  - name: Product Parameter Definitions
  - name: Product Parameters
  - name: Product Prices
  - name: Products
  - name: Orders
  - name: Bank Accounts
  - name: Bank Internal Transfers
  - name: Bank Openings
  - name: Banks
  - name: Bank Transfers
  - name: Credit Card Collections
  - name: Customer Balances
  - name: Customer Transactions
  - name: Repayment Plans
  - name: Despatches
  - name: Cities
  - name: Countries
  - name: Currencies
  - name: Districts
  - name: Line Groups
  - name: Shipment Definitions
  - name: Units
  - name: VAT rates
  - name: Customer Addresses
  - name: Customer Bank Accounts
  - name: Customer Definitions
  - name: Customer Group Members
  - name: Customer Links
  - name: Customer Parameters
  - name: Customer Representatives
  - name: Customers
  - name: Customer Telephones
paths:
  /api/v1/finance/customers/balances:
    get:
      tags:
        - Customer Balances
      summary: List customer balances
      description: >-
        Returns every customer with at least one ledger movement before
        AsOfDate, with their balance per currency (sum of Debit minus sum of
        Credit). Read-only report; nothing here can be created, updated or
        deleted through the API.
      parameters:
        - name: page
          in: query
          description: Page number, starting at 1. Defaults to 1.
          schema:
            type: integer
            format: int32
            default: 1
        - name: pageSize
          in: query
          description: Items per page, up to 50. Defaults to 50.
          schema:
            type: integer
            format: int32
            default: 50
        - name: asOfDate
          in: query
          description: >-
            Only movements strictly before this date and time are included (e.g.
            sending the 25th excludes the 25th itself as well as later dates).
            ISO 8601, for example 2026-09-25T14:30:00. Defaults to the current
            date and time when omitted.
          schema:
            type: string
            format: date-time
        - name: excludeZeroBalance
          in: query
          description: >-
            When true, currencies whose balance is exactly 0 are left out of
            Balances; a customer whose every currency nets to 0 is left out
            entirely. Defaults to false.
          schema:
            type: boolean
            default: false
        - name: minAbsoluteBalance
          in: query
          description: >-
            When set, currencies whose balance's absolute value is less than or
            equal to this are left out of Balances (e.g. 100 excludes everything
            from -100 to 100 inclusive); a customer whose every currency is
            filtered out this way is left out entirely. Can be combined with
            excludeZeroBalance. Omit for no threshold.
          schema:
            type: number
            format: double
        - name: X-UserID
          in: header
          description: >-
            ID of the Noyax user the request is made on behalf of. Written to
            the audit fields of created, updated and deleted records.
          required: true
          schema:
            minimum: 1
            type: integer
            format: int32
        - name: X-CompanyID
          in: header
          description: >-
            ID of the company. The user must be assigned to this company. All
            reads and writes are limited to this company.
          required: true
          schema:
            minimum: 1
            type: integer
            format: int32
        - name: X-PeriodID
          in: header
          description: >-
            ID of the accounting period. Optional for customer endpoints; if
            sent, it is written to created records.
          schema:
            minimum: 1
            type: integer
            format: int32
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DataResultOfPagedResultDtoOfCustomerBalanceDto
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '0201'
                Message: X-UserID header is required.
                Errors:
                  - Code: '0201'
                    Message: X-UserID header is required.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '0102'
                Message: Token has expired. Obtain a new token using the refresh token.
                Errors:
                  - Code: '0102'
                    Message: >-
                      Token has expired. Obtain a new token using the refresh
                      token.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '0110'
                Message: You do not have permission for this operation.
                Errors:
                  - Code: '0110'
                    Message: You do not have permission for this operation.
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResult'
              example:
                Success: false
                ResultCode: '0120'
                Message: Daily request limit (10000) exceeded.
                Errors:
                  - Code: '0120'
                    Message: Daily request limit (10000) exceeded.
components:
  schemas:
    DataResultOfPagedResultDtoOfCustomerBalanceDto:
      required:
        - Success
        - ResultCode
        - Data
      type: object
      properties:
        Success:
          type: boolean
          description: Whether the operation succeeded.
          example: true
        ResultCode:
          type: string
          description: >-
            "0000" on success. On failure, the code of the first error; all
            errors are listed in Errors.
          example: '0000'
        Message:
          type:
            - 'null'
            - string
          description: >-
            Error message when Success is false. Messages of all errors are
            joined into a single text.
        Data:
          $ref: '#/components/schemas/PagedResultDtoOfCustomerBalanceDto'
    ErrorResult:
      type: object
      properties:
        Success:
          type: boolean
          description: Whether the operation succeeded.
          example: false
        ResultCode:
          type:
            - 'null'
            - string
          description: >-
            "0000" on success. On failure, the code of the first error; all
            errors are listed in Errors.
        Message:
          type:
            - 'null'
            - string
          description: >-
            Error message when Success is false. Messages of all errors are
            joined into a single text.
        Errors:
          type:
            - 'null'
            - array
          items:
            $ref: '#/components/schemas/ResultError'
          description: All errors with their codes. Only present when Success is false.
    PagedResultDtoOfCustomerBalanceDto:
      type: object
      properties:
        Page:
          type: integer
          description: Current page number.
          format: int32
          example: 1
        PageSize:
          type: integer
          description: Records per page.
          format: int32
          example: 50
        TotalCount:
          type: integer
          description: Total number of records matching the query.
          format: int32
          example: 128
        Items:
          type: array
          items:
            $ref: '#/components/schemas/CustomerBalanceDto'
          description: Records on this page.
      description: Response data. Null when Success is false.
    ResultError:
      required:
        - Code
        - Message
      type: object
      properties:
        Code:
          type: string
          description: Error code. See the result codes page for the full list.
        Message:
          type: string
          description: Error description.
    CustomerBalanceDto:
      type: object
      properties:
        CustomerId:
          type: string
          description: Customer ID.
          format: uuid
        CustomerCode:
          type:
            - 'null'
            - string
          description: Customer code.
        CustomerName:
          type:
            - 'null'
            - string
          description: Customer name.
        Balances:
          type: array
          items:
            $ref: '#/components/schemas/CustomerBalanceAmountDto'
          description: One entry per currency the customer has moved in, up to AsOfDate.
    CustomerBalanceAmountDto:
      type: object
      properties:
        CurrencyId:
          type: string
          description: >-
            ID of this balance's currency, from GET
            /api/v1/definitions/currencies.
          format: uuid
        CurrencyCode:
          type:
            - 'null'
            - string
          description: Currency short code.
          example: TRY
        IsDefault:
          type: boolean
          description: Whether this is the company's default currency.
        Debit:
          type: number
          description: Sum of Debit, in this currency, up to AsOfDate.
          format: double
        Credit:
          type: number
          description: Sum of Credit, in this currency, up to AsOfDate.
          format: double
        Balance:
          type: number
          description: Debit minus Credit, in this currency, up to AsOfDate.
          format: double
  securitySchemes:
    Bearer:
      type: http
      description: Access token obtained from the Noyax auth service with your API key.
      scheme: bearer
      bearerFormat: JWT

````