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



## OpenAPI

````yaml /.tooling/schemas/rest/tags/product-finops.json get /finops/v1/analytics/transactions
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/transactions:
    get:
      tags:
        - Analytics
      summary: Get transaction analytics
      operationId: get_analytics_transactions
      parameters:
        - required: true
          schema:
            type: string
            format: date
          example: '2025-06-23'
          name: x-finops-version
          in: header
        - required: false
          schema:
            $ref: '#/components/schemas/TransactionDimensionEnum'
          name: dimension
          in: query
        - required: true
          schema:
            $ref: '#/components/schemas/TransactionMetricEnum'
          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
        - required: false
          schema:
            type: integer
            maximum: 400
            minimum: 1
            default: 100
          name: limit
          in: query
        - required: false
          schema:
            type: boolean
          name: has_validation_errors
          in: query
        - description: Created after this datetime (exclusive)
          required: false
          schema:
            type: string
            format: date-time
          name: created_at__gt
          in: query
        - description: Created before this datetime (exclusive)
          required: false
          schema:
            type: string
            format: date-time
          name: created_at__lt
          in: query
        - description: Updated after this datetime (exclusive)
          required: false
          schema:
            type: string
            format: date-time
          name: updated_at__gt
          in: query
        - description: Updated before this datetime (exclusive)
          required: false
          schema:
            type: string
            format: date-time
          name: updated_at__lt
          in: query
        - description: Transaction started after this datetime (exclusive)
          required: false
          schema:
            type: string
            format: date-time
          name: started_at__gt
          in: query
        - description: Transaction started before this datetime (exclusive)
          required: false
          schema:
            type: string
            format: date-time
          name: started_at__lt
          in: query
        - description: One or multiple of the transaction statuses
          required: false
          schema:
            items:
              $ref: '#/components/schemas/TransactionStatusEnum'
            type: array
          name: payment_processing_status__in
          in: query
        - description: One or multiple of the transaction types
          required: false
          schema:
            items:
              $ref: '#/components/schemas/TransactionTypeEnum'
            type: array
          name: type__in
          in: query
        - description: One or multiple of the entity users
          required: false
          schema:
            items:
              type: string
              format: uuid
            type: array
          name: entity_user_id__in
          in: query
        - description: One or multiple of the transaction external ids
          required: false
          schema:
            type: array
            items:
              type: string
          name: external_id__in
          in: query
        - description: Amount greater than (exclusive)
          required: false
          schema:
            type: integer
          name: amount__gt
          in: query
        - description: Amount less than (exclusive)
          required: false
          schema:
            type: integer
          name: amount__lt
          in: query
        - description: One or multiple of the transaction currencies
          required: false
          schema:
            items:
              $ref: '#/components/schemas/CurrencyEnum'
            type: array
          name: currency__in
          in: query
        - description: Merchant amount greater than (exclusive)
          required: false
          schema:
            type: integer
          name: merchant_amount__gt
          in: query
        - description: Merchant amount less than (exclusive)
          required: false
          schema:
            type: integer
          name: merchant_amount__lt
          in: query
        - description: One or multiple of the transaction merchant currencies
          required: false
          schema:
            items:
              $ref: '#/components/schemas/CurrencyEnum'
            type: array
          name: merchant_currency__in
          in: query
        - description: Partially matched merchant name
          required: false
          schema:
            type: string
          name: merchant_name__icontains
          in: query
        - description: Payment method type of the transaction
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/TransactionPaymentMethodTypeEnum'
          name: payment_method
          in: query
        - description: One or multiple of the payment method types
          required: false
          schema:
            items:
              $ref: '#/components/schemas/TransactionPaymentMethodTypeEnum'
            type: array
          name: payment_method__in
          in: query
        - description: Filter by expense status
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/ExpenseStatusEnum'
          name: expense_status
          in: query
        - description: One or multiple expense statuses
          required: false
          schema:
            items:
              $ref: '#/components/schemas/ExpenseStatusEnum'
            type: array
          name: expense_status__in
          in: query
        - description: >-
            Filter by presence of a linked receipt. true — return only
            transactions that have a receipt attached. false — return only
            transactions without a receipt. Omit to return all transactions.
          required: false
          schema:
            type: boolean
          name: has_receipt
          in: query
        - 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/TransactionAnalyticsResponse'
        '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:
    TransactionDimensionEnum:
      type: string
      enum:
        - expense_status
        - payment_processing_status
        - created_at
    TransactionMetricEnum:
      type: string
      enum:
        - id
        - amount
    AggregationFunctionEnum:
      type: string
      enum:
        - count
        - average
        - summary
        - min
        - max
    DateDimensionBreakdownEnum:
      type: string
      enum:
        - daily
        - weekly
        - monthly
        - quarterly
        - yearly
    TransactionStatusEnum:
      type: string
      enum:
        - created
        - processing
        - succeeded
        - declined
        - refunded
        - failed
    TransactionTypeEnum:
      type: string
      enum:
        - capture
        - refund
        - cash_withdrawal
        - fee
        - adjustment
        - reversal
    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
    TransactionPaymentMethodTypeEnum:
      type: string
      enum:
        - card
        - bank_account
    ExpenseStatusEnum:
      type: string
      enum:
        - new
        - approve_in_progress
        - approved
        - rejected
        - canceled
    TransactionAnalyticsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/AnalyticsDataPoint'
          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
    AnalyticsDataPoint:
      properties:
        dimension_value:
          type: string
        metric_value:
          type: number
      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

````