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

# Fetch bank transaction

> Returns the bank transaction associated with the provided bank transaction id.



## OpenAPI

````yaml get /v1/businesses/{businessId}/bank-transactions/{bankTransactionId}
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/bank-transactions/{bankTransactionId}:
    get:
      tags: []
      summary: Fetch bank transaction
      description: >-
        Returns the bank transaction associated with the provided bank
        transaction id.
      operationId: business.bank-transactions.get
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business to fetch the bank transaction for.
          required: true
          schema:
            type: string
        - name: bankTransactionId
          in: path
          description: The UUID of the bank transaction to fetch.
          required: true
          schema:
            type: string
        - name: Content-Type
          in: header
          description: Content-Type must be set to application/json.
          schema:
            type: string
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiBankTransaction'
        '404':
          description: >-
            Business or bank transaction id is not found. This indicates the
            bank transaction id is invalid or the bank transaction has been
            deleted, or the business is not found or has been archived.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    ApiBankTransaction:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier of the bank transaction.
        business_id:
          type: string
          format: uuid
          description: >-
            Unique identifier of the business the bank transaction is associated
            with.
        source:
          $ref: '#/components/schemas/TransactionSource'
          description: Source of the transaction.
        source_transaction_id:
          type: string
          description: >-
            External transaction ID from the source platform (e.g, Plaid
            transaction ID).
          example: g4DlKyjXqGH3Kp5XlaWMtwLRrE4Z9AiE8B4Ko
        source_account_id:
          type: string
          description: >-
            External account ID from the source platform (e.g, Plaid account
            ID).
          example: Aaoy8G7VXZHVeqNoL1GvcmkPdqpLRWi9NArdG
        imported_at:
          type: string
          format: date-time
          description: Timestamp when the transaction was imported.
        date:
          type: string
          format: date-time
          description: Date of the transaction.
        direction:
          $ref: '#/components/schemas/BankTransactionDirection'
          description: Direction of the transaction.
        amount:
          type: integer
          format: int64
          description: Transaction amount in cents.
        counterparty_name:
          type: string
          nullable: true
          description: Name of the transaction counterparty.
          example: WeWork
        description:
          type: string
          nullable: true
          description: Description of the transaction.
          example: WeWork monthly rent payment
        account_name:
          type: string
          nullable: true
          description: Name of the bank account.
          example: Plaid Checking
        categorizationStatus:
          $ref: '#/components/schemas/CategorizationStatus'
          description: The status of the transaction’s categorization in Layer’s systems.
        category:
          $ref: '#/components/schemas/ApiCategorization'
          description: >-
            The category assigned to the transaction. Only populated for
            transactions that have a finalized category.
        categorization_method:
          $ref: '#/components/schemas/ClassifierAgent'
          description: The method used to classify the transaction.
        projected_income_category:
          $ref: '#/components/schemas/ProjectedIncomeCategory'
        suggested_matches:
          type: array
          items:
            $ref: '#/components/schemas/ApiSuggestedMatch'
        match:
          $ref: '#/components/schemas/ApiMatch'
        transaction_tags:
          type: array
          items:
            $ref: '#/components/schemas/ApiTag'
        memo:
          type: string
          nullable: true
          description: >-
            Memo for any text you would like to associate with the bank
            transaction (for example, to display to end users).
        metadata:
          $ref: '#/components/schemas/PlatformDefinedJson'
          nullable: true
          description: Arbitrary custom metadata in JSON format with a size limit of 1KB.
        reference_number:
          type: string
          nullable: true
          description: >-
            Any (typically user-visible) identifier you would like to associate
            with the bank transaction. Can be used to filter when listing bank
            transactions.
    ApiError:
      type: object
      description: An error object returned in API error responses.
      properties:
        type:
          $ref: '#/components/schemas/ApiErrorType'
          description: >-
            A fixed category for the error, helpful for categorizing and
            processing errors.
        description:
          type: string
          description: A human-readable error description.
        error_enum:
          $ref: '#/components/schemas/ApiEnumErrorType'
          description: >-
            A stable, machine-readable identifier for programmatically handling
            specific error conditions. Only present for 4xx client errors—not
            included for 5xx server errors. Use this instead of parsing the
            description field, as enum values remain stable across API versions.
          nullable: true
        meta:
          type: object
          description: Optional additional information about the error.
          nullable: true
      required:
        - type
        - description
    TransactionSource:
      type: string
      enum:
        - UNIT
        - PLAID
        - API
        - STRIPE
        - CUSTOM
    BankTransactionDirection:
      type: string
      enum:
        - CREDIT
        - DEBIT
    CategorizationStatus:
      type: string
      enum:
        - PENDING
        - READY_FOR_INPUT
        - CATEGORIZED
        - SPLIT
        - LAYER_REVIEW
        - JOURNALING
        - MATCHED
    ApiCategorization:
      description: Base schema for categorization of API entities.
      oneOf:
        - $ref: '#/components/schemas/AccountCategorization'
          title: Account
        - $ref: '#/components/schemas/ExclusionCategorization'
          title: Exclusion
        - $ref: '#/components/schemas/SplitCategorization'
          title: Split
      discriminator:
        propertyName: type
        mapping:
          Account:
            $ref: '#/components/schemas/AccountCategorization'
          Exclusion:
            $ref: '#/components/schemas/ExclusionCategorization'
          Split_Categorization:
            $ref: '#/components/schemas/SplitCategorization'
    ClassifierAgent:
      type: string
      enum:
        - SMS
        - API
        - LAYER_AUTO
        - LAYER_MANUAL
    ProjectedIncomeCategory:
      type: string
      enum:
        - REVENUE
        - EXPENSE
        - EXCLUDE
    ApiSuggestedMatch:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Layer's identifier for the suggested match.
        matchType:
          $ref: '#/components/schemas/MatchType'
          description: Type of the matched object.
        details:
          $ref: '#/components/schemas/ApiMatchDetails'
          description: Details of the suggested match.
    ApiMatch:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Layer's UUID for the match.
        match_type:
          $ref: '#/components/schemas/MatchType'
          description: Type of the object to match.
        bank_transaction:
          $ref: '#/components/schemas/ApiBankTransactionInterface'
        details:
          $ref: '#/components/schemas/ApiMatchDetails'
    ApiTag:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID for the tag.
        key:
          type: string
          description: Key for the tag.
          example: ExampleTagKey
        dimension_display_name:
          type: string
          nullable: true
          description: Display name for the tag dimension.
        value:
          type: string
          description: Value for the tag.
          example: ExampleTagValue
        value_display_name:
          type: string
          nullable: true
          description: Display name for the tag value definition.
        dimension_id:
          type: string
          format: uuid
          description: ID of the tag dimension this tag belongs to.
        definition_id:
          type: string
          format: uuid
          description: ID of the tag value definition.
        archived_at:
          type: string
          format: date-time
          nullable: true
          description: When the tag was archived.
      required:
        - id
        - key
        - value
        - dimension_id
        - definition_id
    PlatformDefinedJson:
      type: object
      description: Arbitrary JSON data defined by the caller, with a 1KB size constraint.
      additionalProperties: true
      example:
        custom_field: value
        any valid json: below 1kb
        nested:
          meaning of life: 42
          array: []
    ApiErrorType:
      type: string
      enum:
        - ResourceArchived
        - AuthFailure
        - Plaid
        - Stripe
        - InvalidState
        - ResourceNotFound
        - InvalidParameters
        - JsonSerialization
        - Unknown
        - BadRequest
        - PaginationCursor
        - Conflict
        - LedgerOperationFailed
    ApiEnumErrorType:
      type: string
      description: >-
        Stable enum values for programmatic error handling. Only present in 4xx
        error responses.
      enum:
        - AccessCodeInvalid
        - BalanceSheetDoesNotBalance
        - BalanceSheetMissingAccount
        - BankStatementParserError
        - BillStateError
        - BulkCategorizeFailure
        - BulkMatchFailure
        - BusinessTaskAlreadyCompleted
        - BusinessTaskDeleted
        - CalendlyOAuthError
        - CallBookingError
        - CantUpdateTransactionInCustomerPayout
        - CantUpdateTransactionInVendorPayout
        - CheckPayrollConfigNotFound
        - CheckPayrollServiceNotFound
        - ClerkUserAlreadyExists
        - ConflictingQueryParams
        - CustomAccountAlreadyExists
        - CustomTransactionCsvParsingError
        - CustomTransactionUploadFailure
        - CustomerPayoutInputFormatError
        - DoesNotMatchExistingEntity
        - EmptyBatchRequest
        - ExpenseParserError
        - ExternalAccountBalanceReconciliationError
        - ExternalIdConflict
        - InvalidCategory
        - InvalidEffectiveDate
        - InvalidLedgerOperation
        - InvalidMonthlyAverageRange
        - InvalidMultiPartRequest
        - InvalidPaginationCursor
        - InvalidPayload
        - InvoiceDeleted
        - InvoiceNotFound
        - InvoiceReferenceMismatch
        - InvoiceStateError
        - ManualRateLimit
        - MultipleTagKeyFiltersUnsupported
        - NoCognitoUserFound
        - NoOpeningBalanceFound
        - NotYetReconciled
        - OnePasswordApiError
        - OnePasswordItemNotFound
        - OnePasswordVaultNotFound
        - OpenAICategorizationError
        - PaymentLinkInvalid
        - PayrollStateError
        - PeriodIsClosed
        - PeriodNotClosed
        - PhoneNumberAlreadyRegistered
        - PlaidApiError
        - PlaidConnectionBroken
        - PlaidCreateLinkTokenError
        - PlaidCredentialsNotConfigured
        - PlaidExchangePublicTokenError
        - PlaidGetInstitutionByIdError
        - PlaidGetItemError
        - PlaidInvalidEnvironment
        - PlaidItemAlreadyExists
        - PlaidItemNotFound
        - PlaidProcessorApiError
        - PlaidUnlinkItemError
        - QueryParamFormat
        - QueryParamMissing
        - QuickbooksBrokenConnection
        - QuickbooksConnectionAlreadyExists
        - QuickbooksConnectionAlreadySyncing
        - QuickbooksConnectionMissing
        - QuickbooksConnectionNotActivated
        - QuickbooksInvalidRequest
        - QuickbooksInvalidState
        - QuickbooksNoMatchingAccount
        - QuickbooksNonPostingAccountType
        - QuickbooksNotConfigured
        - QuickbooksOAuthCallbackInvalid
        - QuickbooksOAuthError
        - QuickbooksTokenExpired
        - ResourceArchived
        - ScheduleCNotConfigured
        - SmsNotEnabled
        - SpecifiedBadRequest
        - SpecifiedIdNotFound
        - SplitTransactionError
        - StepEvaluationBadRequest
        - StripeConnectAccountIdNotFound
        - StripeCredentialsNotConfigured
        - StripeGetBalanceForConnectAccountFailure
        - StripeRedirectOrRefreshUrlNotConfigured
        - TagFilterNotFound
        - UnexpectedQueryParam
        - UnitAccountsInUse
        - WrongAnswerType
    AccountCategorization:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: The ID of the Account.
        stable_name:
          type: string
          nullable: true
          description: The stable name for the account.
          example: RENT
        category:
          type: string
          description: The account ID or stable name, whichever is present.
          example: RENT
        display_name:
          type: string
          description: The display name for the account.
          example: Rent
      required:
        - id
        - category
        - display_name
    ExclusionCategorization:
      type: object
      properties:
        id:
          type: string
          description: The ID of the exclusion type.
          enum:
            - PERSONAL_EXPENSES
            - PERSONAL_INFLOWS
            - DUPLICATE_TRANSACTION
            - OTHER_EXCLUSION
        category:
          type: string
          description: The category of the exclusion type.
          enum:
            - PERSONAL_EXPENSES
            - PERSONAL_INFLOWS
            - DUPLICATE_TRANSACTION
            - OTHER_EXCLUSION
        display_name:
          type: string
          description: The display name of the exclusion type.
          enum:
            - Personal spending
            - Personal income sources
            - Duplicate transaction
            - Other exclusion
      required:
        - id
        - category
        - display_name
    SplitCategorization:
      type: object
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/SplitCategorizationEntry'
      required:
        - entries
    MatchType:
      type: string
      enum:
        - TRANSFER
        - INVOICE_PAYMENT
        - PAYOUT
    ApiMatchDetails:
      type: object
      required:
        - id
        - amount
        - date
      properties:
        id:
          type: string
          format: uuid
          description: Layer's ID for the match.
        amount:
          type: integer
          format: int64
          description: Monetary amount of the matched transaction, in cents.
        date:
          type: string
          format: date-time
          description: Date that the matched transaction occurred.
        description:
          type: string
          nullable: true
          description: Description of the match.
          example: Transfer from SavingsAccount to CheckingAccount
    ApiBankTransactionInterface:
      type: object
      required:
        - id
        - amount
        - date
      properties:
        id:
          type: string
          format: uuid
          description: Layer's UUID for the bank transaction.
        business_id:
          type: string
          format: uuid
          description: UUID of the business the transaction is for.
        source:
          $ref: '#/components/schemas/TransactionSource'
          description: Source of the bank transaction.
        source_transaction_id:
          type: string
          description: >-
            External transaction ID from the source platform (e.g, Plaid
            transaction ID).
          example: g4DlKyjXqGH3Kp5XlaWMtwLRrE4Z9AiE8B4Ko
        source_account_id:
          type: string
          description: >-
            External account ID from the source platform (e.g, Plaid account
            ID).
          example: Aaoy8G7VXZHVeqNoL1GvcmkPdqpLRWi9NArdG
        imported_at:
          type: string
          format: date-time
          description: Timestamp when the transaction was imported.
        date:
          type: string
          format: date-time
          description: Timestamp when the transaction was created.
        direction:
          $ref: '#/components/schemas/BankTransactionDirection'
          description: Direction of the transaction.
        amount:
          type: integer
          format: int64
          description: Amount of the transaction, in cents.
        counterparty_name:
          type: string
          nullable: true
          description: Name of the transaction counterparty.
          example: WeWork
        description:
          type: string
          nullable: true
          description: Description of the transaction.
          example: WeWork monthly rent payment
        account_name:
          type: string
          nullable: true
          description: Name of the bank account.
          example: Plaid Checking
        categorizationStatus:
          $ref: '#/components/schemas/CategorizationStatus'
          description: The status of the transaction’s categorization in Layer’s systems.
        memo:
          type: string
          nullable: true
          description: >-
            Memo for any text you would like to associate with the bank
            transaction (for example, to display to end users).
        metadata:
          $ref: '#/components/schemas/PlatformDefinedJson'
          nullable: true
          description: Arbitrary custom metadata in JSON format with a size limit of 1KB.
        reference_number:
          type: string
          nullable: true
          description: >-
            Any (typically user-visible) identifier you would like to associate
            with the bank transaction. Can be used to filter when listing bank
            transactions.
    SplitCategorizationEntry:
      type: object
      properties:
        amount:
          type: integer
          format: int64
          description: Amount of the parent transaction for this split entry.
        category:
          description: >-
            Category for this split entry. May be an account categorization or
            an exclusion categorization.
          oneOf:
            - $ref: '#/components/schemas/AccountCategorization'
              title: Account
            - $ref: '#/components/schemas/ExclusionCategorization'
              title: Exclusion
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````