> ## 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.

# Returns the history of the specified accounts payable document.



## OpenAPI

````yaml /.tooling/schemas/rest/tags/product-finops.json get /finops/v1/payables/{payable_id}/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/payables/{payable_id}/history:
    get:
      tags:
        - Payables
      summary: Returns the history of the specified accounts payable document.
      operationId: get_payables_id_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: payable_id
          in: path
        - 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 .. 100) to return in a single page of the
            response. The response may contain fewer items if it is the last or
            only page.
          required: false
          schema:
            type: integer
            maximum: 100
            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 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: >-
            The field to sort the results by. Typically used together with the
            `order` parameter.
          required: false
          schema:
            allOf:
              - $ref: '#/components/schemas/PayableHistoryCursorFields'
          name: sort
          in: query
        - description: Return only the specified event types
          required: false
          schema:
            items:
              $ref: '#/components/schemas/PayableHistoryEventTypeEnum'
            type: array
          name: event_type__in
          in: query
        - description: >-
            Return only events caused 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>`
          required: false
          schema:
            items:
              type: string
              format: uuid
            type: array
          name: entity_user_id__in
          in: query
        - description: >-
            Return only events that occurred after the specified date and time.
            The value must be in the ISO 8601 format
            `YYYY-MM-DDThh:mm[:ss[.ffffff]][Z|±hh:mm]`.
          required: false
          schema:
            type: string
            format: date-time
          name: timestamp__gt
          in: query
        - description: Return only events that occurred before the specified date and time.
          required: false
          schema:
            type: string
            format: date-time
          name: timestamp__lt
          in: query
        - description: >-
            Return only events that occurred on or after the specified date and
            time.
          required: false
          schema:
            type: string
            format: date-time
          name: timestamp__gte
          in: query
        - description: >-
            Return only events that occurred before or on the specified date and
            time.
          required: false
          schema:
            type: string
            format: date-time
          name: timestamp__lte
          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/PayableHistoryPaginationResponse'
        '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'
        '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:
    OrderEnum:
      type: string
      enum:
        - asc
        - desc
    PayableHistoryCursorFields:
      type: string
      enum:
        - timestamp
    PayableHistoryEventTypeEnum:
      type: string
      enum:
        - status_changed
        - payable_created
        - payable_updated
        - credit_note_linked
        - credit_note_unlinked
        - file_attached
    PayableHistoryPaginationResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/PayableHistoryResponse'
          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).
      additionalProperties: false
      type: object
      required:
        - data
      description: A paginated list of change history records.
    ErrorSchemaResponse:
      properties:
        error:
          $ref: '#/components/schemas/ErrorSchema'
      type: object
      required:
        - error
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
      type: object
    PayableHistoryResponse:
      properties:
        id:
          type: string
          format: uuid
          description: A unique ID of the history record.
          examples:
            - cd58435b-1c79-4b17-9f79-f898c93e5f97
        entity_user_id:
          type: string
          format: uuid
          description: >-
            ID of the entity user who made the change or trigger the event, or
            `null` if it was done by using a partner access token.
          examples:
            - d5a577b0-01c0-4566-ac5c-44f41935e8c4
        event_data:
          anyOf:
            - $ref: '#/components/schemas/PayableStatusChangedEventData'
            - $ref: '#/components/schemas/PayableUpdatedEventData'
            - $ref: '#/components/schemas/PayableCreatedEventData'
            - $ref: '#/components/schemas/PayableCreditNoteLinkedEventData'
            - $ref: '#/components/schemas/PayableCreditNoteUnlinkedEventData'
            - $ref: '#/components/schemas/FileAttachedEventData'
          description: >-
            An object containing additional information about the event or
            change. The object structure varies based on the `event_type`. 
        event_type:
          allOf:
            - $ref: '#/components/schemas/PayableHistoryEventTypeEnum'
          description: The type of the event or change.
        payable_id:
          type: string
          format: uuid
          description: ID of the payable document that was changed or triggered an event.
          examples:
            - f669a8a4-0563-4ab9-b54f-e9d700d282c5
        timestamp:
          type: string
          format: date-time
          description: UTC date and time when the event or change occurred.
      type: object
      required:
        - id
        - event_data
        - event_type
        - payable_id
        - timestamp
    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
    PayableStatusChangedEventData:
      properties:
        new_status:
          $ref: '#/components/schemas/PayableStateEnum'
        old_status:
          $ref: '#/components/schemas/PayableStateEnum'
      additionalProperties: false
      type: object
      required:
        - new_status
        - old_status
    PayableUpdatedEventData:
      properties: {}
      additionalProperties: false
      type: object
    PayableCreatedEventData:
      properties:
        payable_source:
          $ref: '#/components/schemas/PayableOriginEnum'
      additionalProperties: false
      type: object
      required:
        - payable_source
    PayableCreditNoteLinkedEventData:
      properties:
        credit_note_document_id:
          type: string
        credit_note_id:
          type: string
      additionalProperties: false
      type: object
      required:
        - credit_note_id
    PayableCreditNoteUnlinkedEventData:
      properties:
        credit_note_document_id:
          type: string
        credit_note_id:
          type: string
      additionalProperties: false
      type: object
      required:
        - credit_note_id
    FileAttachedEventData:
      properties:
        file_name:
          type: string
        file_size:
          type: integer
        url:
          type: string
      additionalProperties: false
      type: object
      required:
        - file_name
        - file_size
        - url
    PayableStateEnum:
      type: string
      enum:
        - draft
        - new
        - approve_in_progress
        - waiting_to_be_paid
        - partially_paid
        - paid
        - canceled
        - rejected
    PayableOriginEnum:
      type: string
      enum:
        - upload
        - email
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````