> ## Documentation Index
> Fetch the complete documentation index at: https://docs2.finverse.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List transactions by account id

> Retrieve all Transactions under an Account (using a specific `account_id`).

**Authorization**: `login_identity_token`

## Response fields

Same as `GET /transactions`. The returned `accounts` and `transactions` objects and `total_transactions` field include only records associated with the specified `account_id`.



## OpenAPI

````yaml /api-reference/openapi.json get /transactions/{accountId}
openapi: 3.0.0
info:
  description: Documentation of the early finverse services
  title: Finverse Public
  termsOfService: https://example.com
  contact:
    name: Maintainers
    email: info@finverse.com
  license:
    name: unknown license
  version: 0.0.1
servers:
  - url: https://api.prod.finverse.net
security:
  - Oauth2:
      - test
tags:
  - name: public
    description: Publicly accessible endpoints
    x-group: Public
  - name: customer
    description: Customer app and institution endpoints
    x-group: Customer
  - name: link
    description: Finverse Link flows
    x-group: Link
  - name: login_identity
    description: Login identity lifecycle and metadata
    x-group: Login identity
  - name: accounts
    description: Accounts, balances, and account numbers
    x-group: Accounts
  - name: statements
    description: Statements and composite statements
    x-group: Statements
  - name: transactions
    description: Transaction history
    x-group: Transactions
  - name: identity_income
    description: Identity and income insights
    x-group: Identity & income
  - name: payment_links
    description: Payment link creation and checkout
    x-group: Payment links
  - name: mandates
    description: Direct debit mandates
    x-group: Mandates
  - name: payments
    description: Payment initiation and status
    x-group: Payment operations
  - name: payouts
    description: Payouts and scheduled payouts
    x-group: Payouts
  - name: payment_users
    description: Payment user profiles
    x-group: Payment users
  - name: payment_accounts
    description: Payment accounts for users
    x-group: Payment accounts
  - name: payment_methods
    description: Stored payment methods
    x-group: Payment methods
  - name: bills
    description: Bill presentment
    x-group: Bills
  - name: disputes
    description: Payment disputes
    x-group: Disputes
  - name: ledger
    description: Ledger and statements
    x-group: Ledger
paths:
  /transactions/{accountId}:
    get:
      tags:
        - transactions
      summary: List transactions by account id
      description: >-
        Retrieve all Transactions under an Account (using a specific
        `account_id`).


        **Authorization**: `login_identity_token`


        ## Response fields


        Same as `GET /transactions`. The returned `accounts` and `transactions`
        objects and `total_transactions` field include only records associated
        with the specified `account_id`.
      operationId: listTransactionsByAccountId
      parameters:
        - description: The account id (ULID, example - 01EP4A1MZDHKETZFRPF0K62S6S)
          name: accountId
          in: path
          required: true
          schema:
            type: string
        - description: default is 0
          name: offset
          in: query
          schema:
            type: integer
            default: 0
        - description: default is 500, max is 1000
          name: limit
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 500
        - description: >-
            when true, response will be enriched transactions; otherwise it will
            be raw transactions
          name: enrichments
          in: query
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListTransactionsResponse'
              examples:
                success:
                  summary: Success
                  value:
                    accounts:
                      - account_currency: HKD
                        account_id: 01HYCM02EGRVHEFNNYP77ENF92
                        account_name: HKD Checking
                        account_number_masked: 123XXXX89
                        account_type:
                          subtype: CURRENT
                          type: DEPOSIT
                        balance:
                          currency: HKD
                          raw: '70013.12'
                          value: 70013.12
                        created_at: '2024-05-21T03:44:22.000Z'
                        group_id: 01HYCM02FECX9GV4WCSH1C7QC1
                        is_closed: false
                        is_excluded: false
                        is_parent: false
                        statement_balance:
                          currency: HKD
                          raw: '70013.12'
                          value: 70013.12
                        updated_at: '2024-05-21T03:44:22.000Z'
                    institution:
                      countries:
                        - HKG
                        - IDN
                        - MYS
                        - PHL
                        - SGP
                        - THA
                        - VNM
                      institution_id: testbank
                      institution_name: Testbank
                      portal_name: Testbank Online Banking
                    login_identity:
                      last_session_id: 01HYCKZDZ1HPG5B5C96ARX46NA
                      login_identity_id: 01HYCKZDWF7XEZZH3SN9GDMXF7
                      status: DATA_RETRIEVAL_COMPLETE
                    total_transactions: 108
                    transactions:
                      - account_id: 01HYCM02EGRVHEFNNYP77ENF92
                        amount:
                          currency: HKD
                          raw: '523.00'
                          value: 523
                        categories: null
                        category_predictions: null
                        created_at: '2024-05-21T03:44:02.882Z'
                        description: |-
                          Transfer
                          FPS/PILL Jane/FRN20240312PAYC0111547753897
                        is_pending: false
                        posted_date: '2024-11-11'
                        running_balance:
                          currency: HKD
                          raw: 70,013.12
                          value: 70013.12
                        transaction_details:
                          counterparty_account_number: 01HYCM0QEJKNQEYTHKK6Z4R16Y
                          counterparty_name: PILL Jane
                          fps_reference: FRN20240312PAYC0111547753897
                          subtype: FPS
                          type: Transfer
                        transaction_id: 01HYCM0QH9RAJRGQNQ90CV8DF0
                        transaction_reference: '67891234'
                        transaction_time: '2024-11-11T15:28:31.000Z'
                        updated_at: '2024-05-21T03:44:02.882Z'
                      - account_id: 01HYCM02EGRVHEFNNYP77ENF92
                        amount:
                          currency: HKD
                          raw: '-40.00'
                          value: -40
                        categories: null
                        category_predictions: null
                        created_at: '2024-05-21T03:44:02.882Z'
                        description: BAT STARBUCKS@CITY SI NG 25MAY 4628-1234-5678-1234
                        is_pending: false
                        posted_date: '2023-06-30'
                        running_balance:
                          currency: HKD
                          raw: 69,490.12
                          value: 69490.12
                        transaction_details: null
                        transaction_id: 01HYCM0QHCFRSAZZ0A5KM3G4NM
                        updated_at: '2024-05-21T03:44:02.882Z'
                      - account_id: 01HYCM02EGRVHEFNNYP77ENF92
                        amount:
                          currency: HKD
                          raw: '-200.00'
                          value: -200
                        categories: null
                        category_predictions: null
                        created_at: '2024-05-21T03:44:02.882Z'
                        description: 'BEST MART 101: Jul_16'
                        is_pending: false
                        posted_date: '2022-07-16'
                        running_balance:
                          currency: HKD
                          raw: 69,530.12
                          value: 69530.12
                        transaction_details: null
                        transaction_id: 01HYCM0QHEPEC98MN9NBDCA47C
                        updated_at: '2024-05-21T03:44:02.882Z'
        '400':
          description: Invalid Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestModelV2'
              examples:
                account_not_found:
                  summary: Error (Account not found)
                  value:
                    error:
                      code: 40004
                      error_code: ACCOUNT_NOT_FOUND
                      message: >-
                        account_id cannot be found. Resource does not exist, has
                        been deleted, or is no longer accessible.
                      request_id: '{unique_id}'
                      type: API_ERROR
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestModelV2'
      security:
        - Oauth2:
            - transaction
components:
  schemas:
    ListTransactionsResponse:
      required:
        - total_transactions
      properties:
        accounts:
          type: array
          items:
            $ref: '#/components/schemas/Account'
        institution:
          $ref: '#/components/schemas/InstitutionShort'
        login_identity:
          $ref: '#/components/schemas/LoginIdentityShort'
        total_transactions:
          type: integer
        transactions:
          type: array
          items:
            $ref: '#/components/schemas/Transaction'
    BadRequestModelV2:
      properties:
        error:
          type: object
          required:
            - type
            - code
            - error_code
            - message
            - request_id
          properties:
            code:
              type: integer
              example: 40004
            details:
              type: string
            error_code:
              type: string
              example: CREDENTIALS_INVALID
            message:
              type: string
            request_id:
              description: The request_id provided in the request header
              type: string
            type:
              description: The error type
              type: string
              enum:
                - LINK_ERROR
                - API_ERROR
              example: LINKING_ERROR
    Account:
      required:
        - is_parent
        - is_closed
        - is_excluded
        - account_id
        - account_name
        - group_id
        - metadata
      properties:
        account_currency:
          type: string
          example: HKD
          description: >-
            Currency of the account (e.g. USD). Usually available, but may be
            null for zero-balance accounts (e.g. multi-currency or time-deposit
            account with zero balance).
        account_holder_name:
          type: string
          example: John Doe
          description: >-
            (Deprecated) Account holder name (if provided by the institution).
            Replaced by GET /identity.
        account_id:
          type: string
          example: 01ARZ3NDEKTSV4RRFFQ69G5FAV
          description: >-
            Finverse account ID. This is deterministically computed, such that
            the same account record provided by an institution across 2 or more
            data retrieval sessions will always have the same `account_id`.
        account_name:
          type: string
          example: HKD Savings
          description: End-user recognizable name for the account.
        account_nickname:
          type: string
          example: Emergency Fund
          description: >-
            Nickname for the account (if provided by the instiution). This is
            typically a custom account name set by the end-user.
        account_number_masked:
          type: string
          example: 123XXXXXX89
          description: >-
            Masked account number. Format: preserves original length; shows
            first 0-4 digits + last 2-4 digits in plain text (depending on
            original length); omits spaces/symbols.
        account_sub_type:
          type: string
          example: TIME_DEPOSIT
        account_type:
          $ref: '#/components/schemas/AccountType'
          description: '**Beta**: account type object'
        balance:
          $ref: '#/components/schemas/CurrencyAmount'
          description: Balance object, in the account_currency
        country:
          type: string
          example: HKG
          description: 3-letter country code for the account (e.g. "HKG")
        created_at:
          type: string
          format: date-time
          description: >-
            Timestamp for when the account's record was first written to
            Finverse's database.
        group_id:
          description: >-
            ID used to identify a group of related parent + sub-accounts. This
            is deterministically computed based on the shared account number of
            the related accounts.
          type: string
          example: 03504faef9ad3ac048c6a43efa6db7ba1c5239a856536839d87ac949559e7ceb
        is_closed:
          type: boolean
          example: false
          description: Reserved for future use.
        is_excluded:
          type: boolean
          example: false
          description: Reserved for future use.
        is_parent:
          type: boolean
          example: false
          description: >-
            Flag for parent/master accounts (e.g. "Integrated Account" in Hong
            Kong). To avoid showing duplicate accounts, we recommend
            disregarding parent account data and referring instead to associated
            sub-accounts (using `group_id`).
        ledger_balance:
          $ref: '#/components/schemas/CurrencyAmount'
        metadata:
          type: object
          additionalProperties:
            type: string
          description: >-
            **Beta**: Metadata object, containing additional account information
            (for some institutions only)
        statement_balance:
          $ref: '#/components/schemas/CurrencyAmount'
          description: >-
            Balance object, in the institution's reporting or statement currency
            (if provided by the institution). E.g. balance in HKD for a USD
            Savings account at a Hong Kong bank. If not provided by the
            institution, the `statement_balance` will be same as `balance`.
        updated_at:
          type: string
          format: date-time
          description: Timestamp of the last update to the account's record.
    InstitutionShort:
      properties:
        countries:
          type: array
          items:
            type: string
          example:
            - HKG
        institution_id:
          type: string
          example: 123
        institution_name:
          type: string
          example: Mock Bank
        portal_name:
          type: string
          example: Personal Internet Banking
    LoginIdentityShort:
      properties:
        last_session_id:
          type: string
          format: ulid
        login_identity_id:
          type: string
          format: ulid
        status:
          type: string
          example: LINKING
    Transaction:
      required:
        - is_pending
      properties:
        account_id:
          type: string
          example: 01ARZ3NDEKTSV4RRFFQ69G5FAV
          description: Finverse account ID (see `GET /accounts`)
        amount:
          $ref: '#/components/schemas/CurrencyAmount'
          description: Amount object
        categories:
          description: (Reserved for future use) Categories object
          type: array
          items:
            type: string
          example:
            - TRANSFER
        category:
          description: (Deprecated)
          type: string
          example: OTHER
        category_id:
          description: (Deprecated)
          type: string
          example: OTHER
        category_predictions:
          type: array
          items:
            $ref: '#/components/schemas/categoryPredictions'
          description: (Reserved for future use) Category predictions array
        created_at:
          type: string
          format: date-time
          description: >-
            Timestamp for when the transaction record was first written to
            Finverse's database.
        description:
          type: string
          example: Latte
          description: >-
            Transaction description provided by the institution. Usually
            provided, but occasionally some bank transactions do not include a
            description.
        is_pending:
          type: boolean
          example: false
          description: >-
            Flag to indicate transaction is pending (if provided by the
            institution)
        location:
          type: string
          example: Pacific Place
        merchant_name:
          type: string
          example: FUEL COFFEE
        posted_date:
          description: >-
            Transaction record date provided by the instiution. This is provided
            for all transactions, and is the primary date to use for
            transactions.
          type: string
          example: '2020-10-10'
        running_balance:
          $ref: '#/components/schemas/CurrencyAmount'
          description: >-
            Account's running balance associated with each transaction (if
            running balance is reported by the bank)
        status:
          type: string
          example: COMPLETED
        transaction_details:
          description: >-
            (BETA) Additional details on each transaction if provided by the
            institution
          type: object
        transaction_id:
          type: string
          example: 01ARZ3NDEKTSV4RRFFQ69G5FAV
          description: >-
            Finverse transaction ID. This is deterministically computed, such
            that the same transaction record provided by an institution across 2
            or more data retrieval sessions will always have the same
            `transaction_id`.
        transaction_reference:
          description: Transaction reference (if provided by the institution)
          type: string
        transaction_state:
          type: string
          example: ACTIVE
        transaction_time:
          description: Original transaction time (if provided by the institution), in UTC
          type: string
          format: date-time
          nullable: true
        transaction_type:
          type: string
          example: OTHER
          description: Transaction type (as provided by the institution)
        updated_at:
          type: string
          format: date-time
          description: Timestamp of the last update to the transaction record
    AccountType:
      properties:
        subtype:
          type: string
          enum:
            - CURRENT
            - SAVINGS
            - TIME_DEPOSIT
            - OTHER
            - CREDIT_CARD
            - DEBIT_CARD
            - SECURITIES
            - FUNDS
            - STOCKS
            - BONDS
            - MORTGAGE
            - PERSONAL_LOAN
            - REVOLVING_LOAN
            - UNKNOWN
          example: SAVINGS
          description: >-
            Secondary classification of the account. Possible values: `BONDS`,
            `CURRENT`, `CREDIT_CARD`, `DEBIT_CARD`, `FUNDS`, `MORTGAGE`,
            `PERSONAL_LOAN`, `RETIREMENT`,`REVOLVING_LOAN`, `SAVINGS`,
            `SECURITIES`, `STOCKS`, `TIME_DEPOSIT`, `OTHER`, `UNKNOWN`
        type:
          type: string
          enum:
            - DEPOSIT
            - CARD
            - INVESTMENT
            - LOAN
            - UNKNOWN
          example: DEPOSIT
          description: >-
            Primary classification of the account. Possible values: `CARD`,
            `DEPOSIT`, `INVESTMENT`, `LOAN`, `OTHER`, `UNKNOWN`
    CurrencyAmount:
      required:
        - value
      properties:
        currency:
          type: string
          example: HKD
          description: >-
            Currency of the `value`. Usually available, but may be null if value
            is 0
        raw:
          type: string
          example: '69.00'
          description: >-
            Raw amount (as reported by the institution). Usually available, but
            may be null if value is 0. Intended for QA only
        value:
          $ref: '#/components/schemas/FvDecimal'
          description: >-
            Amount. Sign follows financial statement conventions (positive sign:
            assets / money in; negative sign: liabilities / money out)
    categoryPredictions:
      type: object
      properties:
        categories:
          type: array
          items:
            type: string
          example:
            - TRANSFER
        source:
          type: string
          example: TRANSACTION_RULES
        source_id:
          type: string
    FvDecimal:
      type: number
      x-go-type:
        embedded: true
        import:
          package: gitlab.com/finverse/gitops/applications/common-go/amount
        type: FvDecimal
  securitySchemes:
    Oauth2:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://finverse-dev.us.auth0.com/oauth/token
          scopes:
            account: Account
            balance: Balance
            credit: Credit
            institution: Institution
            investment: Investment
            link: Link
            test: Test
            transaction: Transaction

````