> ## 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: '2025-06-23'
  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 VAT IDs
  - name: Counterpart addresses
  - name: Counterpart bank accounts
  - name: Counterpart contacts
  - name: Counterparts
  - name: Credit notes
  - name: Custom tax rates
  - name: Delivery notes
  - name: Documents
  - name: Entities
  - name: Entity users
  - name: Events
  - name: Files
  - name: Identity
  - name: Ledger accounts
  - name: Mail templates
  - name: Mailbox domains
  - name: Mailboxes
  - name: Measure units
  - name: OCR
  - name: Overdue reminders
  - name: PDF templates
  - 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: Products
  - name: Projects
  - name: Purchase orders
  - name: Receipts
  - name: Receivables
  - name: Recurrences
  - name: Tags
  - name: Text templates
  - name: Transactions
  - name: VAT rates
  - 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: '2025-06-23'
          name: x-finops-version
          in: header
        - required: false
          schema:
            $ref: '#/components/schemas/ReceivableDimensionEnum'
          name: dimension
          in: query
        - required: true
          schema:
            $ref: '#/components/schemas/ReceivableMetricEnum'
          name: metric
          in: query
        - required: true
          schema:
            $ref: '#/components/schemas/AggregationFunctionEnum'
          name: aggregation_function
          in: query
        - required: false
          schema:
            $ref: '#/components/schemas/DateDimensionBreakdownEnum'
          name: date_dimension_breakdown
          in: query
        - description: >-
            Sort order (ascending by default). Typically used together with the
            `sort` parameter.
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/OrderEnum'
            default: asc
          name: order
          in: query
        - 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`.
          required: false
          schema:
            type: integer
            maximum: 250
            minimum: 1
            default: 100
          name: limit
          in: query
        - 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.
          required: false
          schema:
            type: string
          name: pagination_token
          in: query
        - 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>`
          required: false
          schema:
            items:
              type: string
              format: uuid
            type: array
          name: id__in
          in: query
        - 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.
          required: false
          schema:
            items:
              type: string
              format: uuid
            type: array
          name: counterpart_id__in
          in: query
        - 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`
          required: false
          schema:
            items:
              type: string
              enum:
                - draft
                - issued
                - failed
                - accepted
                - expired
                - declined
                - recurring
                - partially_paid
                - paid
                - overdue
                - uncollectible
                - canceled
            type: array
          name: status__in
          in: query
        - 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.
          required: false
          schema:
            items:
              type: string
              format: uuid
            type: array
          name: entity_user_id__in
          in: query
        - description: >-
            The field to sort the results by. Typically used together with the
            `order` parameter.
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/ReceivableCursorFields'
          name: sort
          in: query
        - 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.
          required: false
          schema:
            items:
              type: string
              format: uuid
            type: array
          name: tag_ids__in
          in: query
        - 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.
          required: false
          schema:
            items:
              type: string
              format: uuid
            type: array
          name: tag_ids
          in: query
        - 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.
          required: false
          schema:
            items:
              type: string
              format: uuid
            type: array
          name: product_ids__in
          in: query
        - 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.

          required: false
          schema:
            items:
              type: string
              format: uuid
            type: array
          name: product_ids
          in: query
        - 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.
          required: false
          schema:
            items:
              type: string
              format: uuid
            type: array
          name: project_id__in
          in: query
        - required: false
          schema:
            $ref: '#/components/schemas/ReceivableType'
          name: type
          in: query
        - required: false
          schema:
            type: string
          name: document_id
          in: query
        - required: false
          schema:
            type: string
          name: document_id__contains
          in: query
        - required: false
          schema:
            type: string
          name: document_id__icontains
          in: query
        - required: false
          schema:
            type: string
            format: date-time
          name: issue_date__gt
          in: query
        - required: false
          schema:
            type: string
            format: date-time
          name: issue_date__lt
          in: query
        - required: false
          schema:
            type: string
            format: date-time
          name: issue_date__gte
          in: query
        - required: false
          schema:
            type: string
            format: date-time
          name: issue_date__lte
          in: query
        - required: false
          schema:
            type: string
            format: date-time
          name: created_at__gt
          in: query
        - required: false
          schema:
            type: string
            format: date-time
          name: created_at__lt
          in: query
        - required: false
          schema:
            type: string
            format: date-time
          name: created_at__gte
          in: query
        - required: false
          schema:
            type: string
            format: date-time
          name: created_at__lte
          in: query
        - required: false
          schema:
            type: string
            format: uuid
          name: counterpart_id
          in: query
        - required: false
          schema:
            type: string
          name: counterpart_name
          in: query
        - required: false
          schema:
            type: string
          name: counterpart_name__contains
          in: query
        - required: false
          schema:
            type: string
          name: counterpart_name__icontains
          in: query
        - required: false
          schema:
            type: integer
          name: total_amount
          in: query
        - required: false
          schema:
            type: integer
          name: total_amount__gt
          in: query
        - required: false
          schema:
            type: integer
          name: total_amount__lt
          in: query
        - required: false
          schema:
            type: integer
          name: total_amount__gte
          in: query
        - required: false
          schema:
            type: integer
          name: total_amount__lte
          in: query
        - required: false
          schema:
            type: integer
          name: discounted_subtotal
          in: query
        - required: false
          schema:
            type: integer
          name: discounted_subtotal__gt
          in: query
        - required: false
          schema:
            type: integer
          name: discounted_subtotal__lt
          in: query
        - required: false
          schema:
            type: integer
          name: discounted_subtotal__gte
          in: query
        - required: false
          schema:
            type: integer
          name: discounted_subtotal__lte
          in: query
        - required: false
          schema:
            type: string
            enum:
              - draft
              - issued
              - failed
              - accepted
              - expired
              - declined
              - recurring
              - partially_paid
              - paid
              - overdue
              - uncollectible
              - canceled
          name: status
          in: query
        - required: false
          schema:
            type: string
            format: uuid
          name: entity_user_id
          in: query
        - required: false
          schema:
            type: string
            format: uuid
          name: based_on
          in: query
        - required: false
          schema:
            type: string
            format: date
          name: due_date__gt
          in: query
        - required: false
          schema:
            type: string
            format: date
          name: due_date__lt
          in: query
        - required: false
          schema:
            type: string
            format: date
          name: due_date__gte
          in: query
        - required: false
          schema:
            type: string
            format: date
          name: due_date__lte
          in: query
        - required: false
          schema:
            type: boolean
          name: has_due_date
          in: query
        - required: false
          schema:
            type: string
            format: uuid
          name: project_id
          in: query
        - required: false
          schema:
            type: string
          name: search_text
          in: query
        - required: false
          schema:
            type: string
          name: authorization
          in: header
        - description: The ID of the entity that owns the requested resource.
          required: true
          schema:
            type: string
            format: uuid
            examples:
              - 9d2b4c8f-2087-4738-ba91-7359683c49a4
          name: x-organization-id
          in: header
      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:
    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
    ReceivableCursorFields:
      type: string
      enum:
        - counterpart_name
        - counterpart_id
        - amount
        - total_amount
        - discounted_subtotal
        - status
        - due_date
        - issue_date
        - document_id
        - created_at
        - project_id
    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:
          type: string
        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

````