type: object
required:
  - filters
properties:
  pagination:
    $ref: '../shared/RequestPagination.yaml'
    title: RequestPagination
  filters:
    type: object
    properties:
      ids:
        type: array
        description: Moss IDs of the transactions to search for.
        items:
          type: string
          format: uuid
        example:
          - "123e4567-e89b-12d3-a456-426614174000"
          - "223e4567-e89b-12d3-a456-426614174000"
      accountIds:
        type: array
        description: Optional. Filter transactions by one or more bank account IDs. Do not provide together with deprecated bankAccountId.
        items:
          type: string
          format: uuid
        example:
          - "123e4567-e89b-12d3-a456-426614174000"
          - "223e4567-e89b-12d3-a456-426614174000"
      bookingDateFrom:
        type: string
        format: date
        description: Filter transactions with booking date from this date (inclusive)
        example: "2024-01-01"
      bookingDateTo:
        type: string
        format: date
        description: Filter transactions with booking date to this date (inclusive)
        example: "2024-01-31"
      matched:
        type: boolean
        description: Filter transactions that have been matched/not matched to an open item.
      freeText:
        type: string
        description: Case-insensitive partial match across bank transaction id, group id, counterparty and bank account number.

  sort:
    type: object
    properties:
      sortBy:
        type: string
        description: Field to sort by
        enum:
          - BOOKING_DATE
          - AMOUNT
          - COUNTERPARTY
          - SETTLEMENT_DATE
        default: BOOKING_DATE
        example: BOOKING_DATE
      sortOrder:
        type: string
        description: Sort direction
        enum:
          - ASC
          - DESC
        default: DESC
        example: DESC
