> ## 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 receivables analytics

> Retrieve aggregated statistics for receivables with different breakdowns.



## OpenAPI

````yaml /.tooling/schemas/rest/tags/product-finops.json get /finops/v1/analytics/receivables
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/analytics/receivables:
    get:
      tags:
        - Analytics
      summary: Get receivables analytics
      description: >-
        Retrieve aggregated statistics for receivables with different
        breakdowns.
      operationId: get_analytics_receivables
      parameters:
        - required: true
          schema:
            type: string
            format: date
          example: '2026-09-24'
          name: x-finops-version
          in: header
        - name: dimension
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/ReceivableDimensionEnum'
              - type: 'null'
        - name: metric
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/ReceivableMetricEnum'
        - name: aggregation_function
          in: query
          required: true
          schema:
            $ref: '#/components/schemas/AggregationFunctionEnum'
        - name: date_dimension_breakdown
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/DateDimensionBreakdownEnum'
              - type: 'null'
        - name: order
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/OrderEnum'
            default: asc
          description: >-
            Sort order (ascending by default). Typically used together with the
            `sort` parameter.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 250
            minimum: 1
            default: 100
          description: >-
            The number of items (0 .. 250) to return in a single page of the
            response. Default is 100. The response may contain fewer items if it
            is the last or only page. 


            When using pagination with a non-default `limit`, you must provide
            the `limit` value alongside `pagination_token` in all subsequent
            pagination requests. Unlike other query parameters, `limit` is not
            inferred from `pagination_token`.
        - name: pagination_token
          in: query
          required: false
          schema:
            type: string
          description: >-
            A pagination token obtained from a previous call to this endpoint.
            Use it to get the next or previous page of results for your initial
            query. If `pagination_token` is specified, all other query
            parameters except `limit` are ignored and inferred from the initial
            query.


            If not specified, the first page of results will be returned.
        - name: id__in
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                  format: uuid
                type: array
              - type: 'null'
          description: >-
            Return only receivables 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:

            `id__in=<id1>&id__in=<id2>`
        - name: counterpart_id__in
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                  format: uuid
                type: array
              - type: 'null'
          description: >-
            Return only receivables created for the counterparts with the
            specified IDs.


            To specify multiple IDs, repeat this parameter for each value:

            `counterpart_id__in=<id1>&counterpart_id__in=<id2>`


            Valid but nonexistent IDs do not raise errors but produce no
            results.
        - name: status__in
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  enum:
                    - draft
                    - issued
                    - failed
                    - accepted
                    - expired
                    - declined
                    - recurring
                    - partially_paid
                    - paid
                    - overdue
                    - uncollectible
                    - canceled
              - type: 'null'
          description: >-
            Return only receivables that have the specified statuses. See the
            applicable [invoice
            statuses](https://docs.monite.com/accounts-receivable/invoices/index),
            [quote
            statuses](https://docs.monite.com/accounts-receivable/quotes/index),
            and [credit note
            statuses](https://docs.monite.com/accounts-receivable/credit-notes#credit-note-lifecycle).


            To specify multiple statuses, repeat this parameter for each value:

            `status__in=draft&status__in=issued`
        - name: entity_user_id__in
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                  format: uuid
                type: array
              - type: 'null'
          description: >-
            Return only receivables created by the entity users with the
            specified IDs.To specify multiple user IDs, repeat this parameter
            for each ID:

            `entity_user_id__in=<user1>&entity_user_id__in=<user2>`


            If the request is authenticated using an entity user token, this
            user must have the `receivable.read.allowed` (rather than
            `allowed_for_own`) permission to be able to query receivables
            created by other users.


            IDs of deleted users will still produce results here if those users
            had associated receivables. Valid but nonexistent user IDs do not
            raise errors but produce no results.
        - name: sort
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/2'
              - type: 'null'
          description: >-
            The field to sort the results by. Typically used together with the
            `order` parameter.
        - name: tag_ids__in
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                  format: uuid
                type: array
              - type: 'null'
          description: >-
            Return only receivables whose
            [tags](https://docs.monite.com/common/tags) include at least one of
            the tags with the specified IDs.


            For example, given receivables with the following tags:

            1. tagA

            2. tagB

            3. tagA, tagB

            4. tagC

            5. tagB, tagC



            `tag_ids__in=<tagA>&tag_ids__in=<tagB>` will return receivables 1,
            2, 3, and 5.


            Valid but nonexistent tag 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 receivables whose
            [tags](https://docs.monite.com/common/tags) include all of the tags
            with the specified IDs and optionally other tags that are not
            specified.


            For example, given receivables with the following tags:

            1. tagA

            2. tagB

            3. tagA, tagB

            4. tagC

            5. tagA, tagB, tagC



            `tag_ids=<tagA>&tag_ids=<tagB>` will return receivables 3 and 5.
        - name: product_ids__in
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                  format: uuid
                type: array
              - type: 'null'
          description: >-
            Return only receivables whose line items include at least one of the
            product IDs with the specified IDs. 


            To specify multiple product IDs, repeat this parameter for each ID:

            `product_ids__in=<product1>&product_ids__in=<product2>`


            For example, given receivables with the following product IDs:

            1. productA

            2. productB

            3. productA, productB

            4. productC

            5. productB, productC



            `product_ids__in=<productA>&product_ids__in=<productB>` will return
            receivables 1, 2, 3, and 5.Valid but nonexistent product IDs do not
            raise errors but produce no results.
        - name: product_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                  format: uuid
                type: array
              - type: 'null'
          description: >+
            Return only receivables whose line items include all of the product
            IDs with the specified IDs and optionally other products that are
            not specified. 


            To specify multiple product IDs, repeat this parameter for each ID:

            `product_ids=<product1>&product_ids=<product2>`


            For example, given receivables with the following product IDs:

            1. productA

            2. productB

            3. productA, productB

            4. productC

            5. productA, productB, productC



            `product_ids=<productA>&product_ids=<productB>` will return
            receivables 3 and 5.

        - name: project_id__in
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                  format: uuid
                type: array
              - type: 'null'
          description: >-
            Return only receivables 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: type
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/ReceivableType'
              - type: 'null'
        - name: document_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
        - name: document_id__contains
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
        - name: document_id__icontains
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
        - name: issue_date__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
        - name: issue_date__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
        - name: issue_date__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
        - name: issue_date__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
        - name: created_at__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
        - name: created_at__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
        - name: created_at__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
        - name: created_at__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
        - name: counterpart_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
        - name: counterpart_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
        - name: counterpart_name__contains
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
        - name: counterpart_name__icontains
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
        - name: total_amount
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
        - name: total_amount__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
        - name: total_amount__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
        - name: total_amount__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
        - name: total_amount__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
        - name: discounted_subtotal
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
        - name: discounted_subtotal__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
        - name: discounted_subtotal__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
        - name: discounted_subtotal__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
        - name: discounted_subtotal__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
              - type: 'null'
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                enum:
                  - draft
                  - issued
                  - failed
                  - accepted
                  - expired
                  - declined
                  - recurring
                  - partially_paid
                  - paid
                  - overdue
                  - uncollectible
                  - canceled
              - type: 'null'
        - name: entity_user_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
        - name: based_on
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
        - name: due_date__gt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
        - name: due_date__lt
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
        - name: due_date__gte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
        - name: due_date__lte
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
        - name: has_due_date
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
        - name: project_id
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
        - name: search_text
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
        - 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/ReceivablesAnalyticsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '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'
      security:
        - HTTPBearer: []
components:
  schemas:
    '2':
      type: string
      enum:
        - counterpart_name
        - counterpart_id
        - amount
        - total_amount
        - discounted_subtotal
        - status
        - due_date
        - issue_date
        - document_id
        - created_at
        - project_id
    ReceivableDimensionEnum:
      type: string
      enum:
        - created_at
        - status
        - counterpart_id
        - currency
        - issue_date
        - due_date
        - project_id
        - product_id
    ReceivableMetricEnum:
      type: string
      enum:
        - id
        - amount_due
        - product_amount
        - product_quantity
        - total_amount
    AggregationFunctionEnum:
      type: string
      enum:
        - count
        - average
        - summary
        - min
        - max
    DateDimensionBreakdownEnum:
      type: string
      enum:
        - daily
        - weekly
        - monthly
        - quarterly
        - yearly
    OrderEnum:
      type: string
      enum:
        - asc
        - desc
    ReceivableType:
      type: string
      enum:
        - quote
        - invoice
        - credit_note
    ReceivablesAnalyticsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ReceivablesAnalyticsDataPoint'
          type: array
      type: object
      required:
        - data
    ErrorSchemaResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorSchema'
      type: object
      required:
        - error
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    ReceivablesAnalyticsDataPoint:
      properties:
        dimension_value:
          anyOf:
            - type: string
            - type: 'null'
        metric_value:
          type: integer
      additionalProperties: false
      type: object
      required:
        - metric_value
    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

````