> ## 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 expense history for a transaction



## OpenAPI

````yaml /.tooling/schemas/rest/tags/product-finops.json get /finops/v1/transactions/{transaction_id}/expense_history
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/transactions/{transaction_id}/expense_history:
    get:
      tags:
        - Transactions
      summary: Get expense history for a transaction
      operationId: get_transactions_id_expense_history
      parameters:
        - required: true
          schema:
            type: string
            format: date
          example: '2025-06-23'
          name: x-finops-version
          in: header
        - required: true
          schema:
            type: string
            format: uuid
          name: transaction_id
          in: path
        - description: Filter by event type (e.g. status_changed)
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/ExpenseHistoryEventTypeEnum'
          name: event_type
          in: query
        - description: Sort order by timestamp
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            default: desc
          name: order
          in: query
        - description: Maximum number of records to return
          required: false
          schema:
            type: integer
            maximum: 500
            minimum: 1
            default: 100
          name: limit
          in: query
        - description: Number of records to skip
          required: false
          schema:
            type: integer
            minimum: 0
            default: 0
          name: offset
          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/ExpenseHistoryResponseList'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchemaResponse'
        '404':
          description: Not found
          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:
    ExpenseHistoryEventTypeEnum:
      type: string
      enum:
        - status_changed
        - approval_action
    ExpenseHistoryResponseList:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ExpenseHistoryEntryResponse'
          type: array
        next_pagination_token:
          type: string
          description: >-
            A token that can be sent in the `pagination_token` query parameter
            to get the next page of results, or `null` if there is no next page
            (i.e. you've reached the last page).
        prev_pagination_token:
          type: string
          description: >-
            A token that can be sent in the `pagination_token` query parameter
            to get the previous page of results, or `null` if there is no
            previous page (i.e. you've reached the first page).
      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
    ExpenseHistoryEntryResponse:
      properties:
        id:
          type: string
          format: uuid
        entity_user_id:
          type: string
          format: uuid
          description: The user who performed the action, if known.
        event_data:
          anyOf:
            - $ref: '#/components/schemas/StatusChangedEventData'
            - $ref: '#/components/schemas/ApprovalActionEventData'
          description: >-
            Structured event payload. Shape depends on event_type:
            StatusChangedEventData for status_changed, ApprovalActionEventData
            for approval_action.
        event_type:
          allOf:
            - $ref: '#/components/schemas/ExpenseHistoryEventTypeEnum'
          description: The type of event recorded.
        timestamp:
          type: string
          format: date-time
          description: When the event occurred.
        transaction_id:
          type: string
          format: uuid
      type: object
      required:
        - id
        - event_type
        - timestamp
        - transaction_id
    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
    StatusChangedEventData:
      properties:
        approval_policy_id:
          type: string
        approval_policy_name:
          type: string
        approval_policy_process_id:
          type: string
        approval_request_id:
          type: string
        approval_source:
          type: string
          description: >-
            How the decision was made: 'policy' when driven by an approval
            policy, otherwise 'force'.
        new_status:
          allOf:
            - $ref: '#/components/schemas/ExpenseStatusEnum'
          description: The expense status after the transition.
        old_status:
          allOf:
            - $ref: '#/components/schemas/ExpenseStatusEnum'
          description: The expense status before the transition. Null for migrated rows.
        reject_reason:
          type: string
          description: Reason for rejection, if applicable.
      type: object
      required:
        - new_status
    ApprovalActionEventData:
      properties:
        acted_at:
          type: string
          description: ISO timestamp of when the action was performed.
        action:
          type: string
          description: 'The approval action: ''approved'' or ''rejected''.'
        approval_policy_id:
          type: string
        approval_policy_name:
          type: string
        approval_policy_process_id:
          type: string
        approval_request_id:
          type: string
        approval_source:
          type: string
          description: '''policy'' for policy-based actions.'
        reject_reason:
          type: string
          description: Reason for rejection, if applicable.
      type: object
      required:
        - action
    ExpenseStatusEnum:
      type: string
      enum:
        - new
        - approve_in_progress
        - approved
        - rejected
        - canceled
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````