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

# Get payable totals

> Retrieve aggregated statistics for payables, including total amount and count, both overall and by status.

For more flexible configuration and retrieval of other data types, use `GET /analytics/payables`.



## OpenAPI

````yaml /.tooling/schemas/rest/tags/product-finops.json get /finops/v1/payables/analytics
openapi: 3.1.0
info:
  title: Tesouro Partner API
  version: '2026-09-24'
  description: The Tesouro REST API, for Tesouro partners to integrate with our solution.
  termsOfService: https://tesouro.com/terms
  contact:
    name: Tesouro team
    url: https://tesouro.com/about/
    email: developers@tesouro.com
servers:
  - url: https://api.sandbox.tesouro.com
    description: Sandbox
security: []
tags:
  - name: Accounting connections
  - name: Accounting data pull
  - name: Accounting synchronized records
  - name: Accounting tax rates
  - name: Analytics
  - name: Approval policies
  - name: Approval requests
  - name: Bank details
  - name: Comments
  - name: Cost centers
  - name: Counterpart addresses
  - name: Counterpart bank accounts
  - name: Counterpart contacts
  - name: Counterpart VAT IDs
  - name: Counterparts
  - name: Credit notes
  - name: Custom tax rates
  - name: Delivery notes
  - name: Departments
  - name: Disclosures
  - name: Documents
  - name: Events
  - name: Files
  - name: Ledger accounts
  - name: Locations
  - name: Mail templates
  - name: Mailbox domains
  - name: Mailboxes
  - name: Measure units
  - name: OCR
  - name: OIDC applications
  - name: Organizations
  - name: Overdue reminders
  - name: Payable duplicates
  - name: Payable line items
  - name: Payables
  - name: Payment intents
  - name: Payment links
  - name: Payment methods
  - name: Payment records
  - name: Payment reminders
  - name: Payment terms
  - name: PDF templates
  - name: Products
  - name: Projects
  - name: Purchase orders
  - name: Receipts
  - name: Receivables
  - name: Recurrences
  - name: Roles
  - name: Tags
  - name: Text templates
  - name: Transactions
  - name: Users
  - name: Webhook deliveries
  - name: Webhook subscriptions
paths:
  /finops/v1/payables/analytics:
    get:
      tags:
        - Payables
      summary: Get payable totals
      description: >-
        Retrieve aggregated statistics for payables, including total amount and
        count, both overall and by status.


        For more flexible configuration and retrieval of other data types, use
        `GET /analytics/payables`.
      operationId: get_payables_analytics
      parameters:
        - required: true
          schema:
            type: string
            format: date
          example: '2026-09-24'
          name: x-finops-version
          in: header
        - name: created_at__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
          description: >-
            Return only payables created in Monite after the specified date and
            time. The value must be in the ISO 8601 format
            YYYY-MM-DDThh:mm[:ss[.ffffff]][Z|±hh:mm].
        - name: created_at__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
          description: >-
            Return only payables created in Monite before the specified date and
            time.
        - name: created_at__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
          description: >-
            Return only payables created in Monite on or after the specified
            date and time.
        - name: created_at__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
          description: >-
            Return only payables created in Monite before or on the specified
            date and time.
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/PayableStateEnum'
              - type: 'null'
          description: >-
            Return only payables that have the specified
            [status](https://docs.monite.com/accounts-payable/payables/index).


            To query multiple statuses at once, use the `status__in` parameter
            instead.
        - name: status__in
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  $ref: '#/components/schemas/PayableStateEnum'
              - type: 'null'
          description: >-
            Return only payables that have the specified
            [statuses](https://docs.monite.com/accounts-payable/payables/index).


            To specify multiple statuses, repeat this parameter for each value:
            `status__in=draft&status__in=new`
        - name: id__in
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                  format: uuid
                type: array
              - type: 'null'
          description: >-
            Return only payables with specified IDs. Valid but nonexistent IDs
            do not raise errors but produce no results.


            To specify multiple IDs, repeat this parameter for each value:
            `id__in=<id1>&id__in=<id2>`
        - name: total_amount
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
          description: >-
            Return only payables with the exact specified total amount. The
            amount must be specified in the minor units of currency. For
            example, $12.5 is represented as 1250.
        - name: total_amount__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
          description: >-
            Return only payables whose total amount (in minor units) exceeds the
            specified value.
        - name: total_amount__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
          description: >-
            Return only payables whose total amount (in minor units) is less
            than the specified value.
        - name: total_amount__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
          description: >-
            Return only payables whose total amount (in minor units) is greater
            than or equal to the specified value.
        - name: total_amount__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
          description: >-
            Return only payables whose total amount (in minor units) is less
            than or equal to the specified value.
        - name: amount
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
          description: Return only payables with the specified amount.
        - name: amount__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
          description: >-
            Return only payables whose amount (in minor units) exceeds the
            specified value.
        - name: amount__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
          description: >-
            Return only payables whose amount (in minor units) is less than the
            specified value.
        - name: amount__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
          description: >-
            Return only payables whose amount (in minor units) is greater than
            or equal to the specified value.
        - name: amount__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
          description: >-
            Return only payables whose amount (in minor units) is less than or
            equal to the specified value.
        - name: currency
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/CurrencyEnum'
              - type: 'null'
          description: Return only payables that use the specified currency.
        - name: counterpart_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
          description: >-
            Return only payables received from counterparts with the specified
            name (exact match, case-sensitive).


            For counterparts of `type = individual`, the full name is formatted
            as `first_name last_name`.
        - name: counterpart_name__contains
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
          description: >-
            Return only payables received from counterparts whose name contains
            the specified string (case-sensitive).
        - name: counterpart_name__icontains
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
          description: >-
            Return only payables received from counterparts whose name contains
            the specified string (case-insensitive).
        - name: search_text
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
          description: >-
            Apply the `icontains` condition to search for the specified text in
            the `document_id` and `counterpart_name` fields in the payables.
        - name: due_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
          description: Return payables that are due on the specified date (YYYY-MM-DD)
        - name: due_date__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
          description: >-
            Return payables that are due after the specified date (exclusive,
            YYYY-MM-DD).
        - name: due_date__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
          description: >-
            Return payables that are due before the specified date (exclusive,
            YYYY-MM-DD).
        - name: due_date__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
          description: >-
            Return payables that are due on or after the specified date
            (YYYY-MM-DD).
        - name: due_date__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
          description: >-
            Return payables that are due before or on the specified date
            (YYYY-MM-DD).
        - name: issued_at
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
          description: Return payables that are issued at the specified date (YYYY-MM-DD)
        - name: issued_at__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
          description: >-
            Return payables that are issued after the specified date (exclusive,
            YYYY-MM-DD).
        - name: issued_at__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
          description: >-
            Return payables that are issued before the specified date
            (exclusive, YYYY-MM-DD).
        - name: issued_at__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
          description: >-
            Return payables that are issued on or after the specified date
            (YYYY-MM-DD).
        - name: issued_at__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
          description: >-
            Return payables that are issued before or on the specified date
            (YYYY-MM-DD).
        - name: document_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
          description: >-
            Return a payable with the exact specified document number
            (case-sensitive).


            The `document_id` is the user-facing document number such as
            INV-00042, not to be confused with Monite resource IDs (`id`).
        - name: document_id__contains
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
          description: >-
            Return only payables whose document number (`document_id`) contains
            the specified string (case-sensitive).
        - name: document_id__icontains
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
          description: >-
            Return only payables whose document number (`document_id`) contains
            the specified string (case-insensitive).
        - name: was_created_by_user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
          description: >-
            Return only payables created in Monite by the entity user with the
            specified ID.
        - name: counterpart_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
          description: >-
            Return only payables received from the counterpart with the
            specified ID.


            Counterparts that have been deleted but have associated payables
            will still return results here because the payables contain a frozen
            copy of the counterpart data.


            If the specified counterpart ID does not exist and never existed, no
            results are returned.
        - name: counterpart_id__in
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                  format: uuid
                type: array
              - type: 'null'
          description: >-
            Return only payables received from the counterparts with the
            specified IDs. Valid but nonexistent IDs do not raise errors but
            produce no results.


            To specify multiple IDs, repeat this parameter for each value:
            `counterpart_id__in=<id1>&counterpart_id__in=<id2>`
        - name: source_of_payable_data
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/SourceOfPayableDataEnum'
              - type: 'null'
          description: Return only payables coming from the specified source.
        - name: ocr_status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/OcrStatusEnum'
              - type: 'null'
          description: Return only payables with specific OCR statuses.
        - name: line_item_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
          description: >-
            Search for a payable by the identifier of the line item associated
            with it.
        - name: purchase_order_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
          description: >-
            Search for a payable by the identifier of the purchase order
            associated with it.
        - name: project_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
          description: >-
            Return only payables assigned to the project with the specified ID.


            Valid but nonexistent project IDs do not raise errors but return no
            results.
        - name: project_id__in
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                  format: uuid
                type: array
              - type: 'null'
          description: >-
            Return only payables whose `project_id` include at least one of the
            project_id with the specified IDs. Valid but nonexistent project IDs
            do not raise errors but produce no results.
        - name: tag_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                  format: uuid
                type: array
              - type: 'null'
          description: >-
            Return only payables whose `tags` include at least one of the tags
            with the specified IDs. Valid but nonexistent tag IDs do not raise
            errors but produce no results.
        - name: tag_ids__not_in
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                  format: uuid
                type: array
              - type: 'null'
          description: >-
            Return only payables whose `tags` do not include any of the tags
            with the specified IDs. Valid but nonexistent tag IDs do not raise
            errors but produce the results.
        - name: has_tags
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
          description: >-
            Filter objects based on whether they have tags. If true, only
            objects with tags are returned. If false, only objects without tags
            are returned.
        - name: origin
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/PayableOriginEnum'
              - type: 'null'
          description: Return only payables from a given origin ['upload', 'email']
        - name: has_file
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
          description: Return only payables with or without attachments (files)
        - name: scheduled_payment_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
          description: >-
            Return payables with a live scheduled payment (see
            `scheduled_payment_date` on the response) on the specified date
            (YYYY-MM-DD).
        - name: scheduled_payment_date__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
          description: >-
            Return only payables whose scheduled payment date is after the
            specified date (exclusive, YYYY-MM-DD).
        - name: scheduled_payment_date__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
          description: >-
            Return only payables whose scheduled payment date is before the
            specified date (exclusive, YYYY-MM-DD).
        - name: scheduled_payment_date__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
          description: >-
            Return only payables whose scheduled payment date is on or after the
            specified date (YYYY-MM-DD).
        - name: scheduled_payment_date__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
          description: >-
            Return only payables whose scheduled payment date is before or on
            the specified date (YYYY-MM-DD).
        - name: has_scheduled_payment
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
          description: >-
            Filter payables based on whether they have a live scheduled payment.
            If true, only payables with a non-null `scheduled_payment_date` are
            returned. If false, only payables with no live scheduled payment are
            returned.
        - name: x-organization-id
          in: header
          required: true
          schema:
            type: string
            format: uuid
            examples:
              - 9d2b4c8f-2087-4738-ba91-7359683c49a4
          description: The ID of the entity that owns the requested resource.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PayableAggregatedDataResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
      deprecated: true
      security:
        - HTTPBearer: []
components:
  schemas:
    PayableStateEnum:
      type: string
      enum:
        - draft
        - new
        - approve_in_progress
        - waiting_to_be_paid
        - partially_paid
        - paid
        - canceled
        - rejected
    CurrencyEnum:
      type: string
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BTN
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLP
        - CNY
        - COP
        - CRC
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HTG
        - HUF
        - IDR
        - ILS
        - INR
        - IQD
        - ISK
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SEK
        - SGD
        - SHP
        - SLE
        - SOS
        - SRD
        - SSP
        - SVC
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VND
        - VUV
        - WST
        - XAF
        - XCD
        - XOF
        - XPF
        - YER
        - ZAR
        - ZMW
    SourceOfPayableDataEnum:
      type: string
      enum:
        - ocr
        - user_specified
    OcrStatusEnum:
      type: string
      enum:
        - processing
        - error
        - success
        - canceled
    PayableOriginEnum:
      type: string
      enum:
        - upload
        - email
    PayableAggregatedDataResponse:
      properties:
        count:
          type: integer
          description: The total count of payables across all statuses.
        data:
          items:
            $ref: '#/components/schemas/PayableAggregatedItem'
          type: array
          description: >-
            A list of aggregated items, each representing a status with its
            associated sum of the amount field and count.
        sum_total_amount:
          type: integer
          description: >-
            The total sum of the amount field for all payables across all
            statuses.
      additionalProperties: false
      type: object
      required:
        - count
        - data
        - sum_total_amount
    ErrorSchemaResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorSchema'
      type: object
      required:
        - error
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    PayableAggregatedItem:
      properties:
        count:
          type: integer
          description: The total count of payables with this specific status.
        status:
          $ref: '#/components/schemas/PayableStateEnum'
          description: The status of the payable (e.g., paid, draft, etc.).
        sum_total_amount:
          type: integer
          description: >-
            The total sum of the amount field for all payables with this
            specific status.
      additionalProperties: false
      type: object
      required:
        - count
        - status
        - sum_total_amount
    ErrorSchema:
      properties:
        message:
          type: string
      type: object
      required:
        - message
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
        msg:
          type: string
        type:
          type: string
      type: object
      required:
        - loc
        - msg
        - type
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````