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

# Update transaction date range

> Updates the visible transaction date range for an external account. Use this endpoint to limit which transactions are shown from this account based on their date.

When the date range is tightened (start date moved forward or end date moved backward), any categorized transactions that now fall outside the new bounds are automatically uncategorized. This ensures that hidden transactions don't contribute to financial reports.

Set either field to `null` to remove that bound. For example, setting `show_transactions_on_or_after` to `null` will show all transactions after the business's activation_at date.



## OpenAPI

````yaml put /v1/businesses/{businessId}/external-accounts/{externalAccountId}/transaction-date-range
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/external-accounts/{externalAccountId}/transaction-date-range:
    put:
      tags: []
      summary: Update transaction date range
      description: >-
        Updates the visible transaction date range for an external account. Use
        this endpoint to limit which transactions are shown from this account
        based on their date.


        When the date range is tightened (start date moved forward or end date
        moved backward), any categorized transactions that now fall outside the
        new bounds are automatically uncategorized. This ensures that hidden
        transactions don't contribute to financial reports.


        Set either field to `null` to remove that bound. For example, setting
        `show_transactions_on_or_after` to `null` will show all transactions
        after the business's activation_at date.
      operationId: business.external-accounts.transaction-date-range.put
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business that owns the external account.
          required: true
          schema:
            type: string
            format: uuid
        - name: externalAccountId
          in: path
          description: The UUID of the external account to update the date range for.
          required: true
          schema:
            type: string
            format: uuid
        - name: Content-Type
          in: header
          description: Content-Type must be set to application/json.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTransactionDateRangeParams'
      responses:
        '200':
          description: >-
            Transaction date range updated successfully. Returns the updated
            external account.
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiExternalAccount'
        '404':
          description: Business or external account not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    UpdateTransactionDateRangeParams:
      type: object
      description: >-
        Parameters for updating the visible transaction date range on an
        external account.
      properties:
        show_transactions_on_or_after:
          type: string
          format: date-time
          nullable: true
          description: >-
            If set, only transactions on or after this timestamp will be
            visible. Set to `null` to remove the lower bound and show all
            transactions regardless of how old they are.
        show_transactions_on_or_before:
          type: string
          format: date-time
          nullable: true
          description: >-
            If set, only transactions on or before this timestamp will be
            visible. Set to `null` to remove the upper bound and show all
            transactions regardless of date.
    ApiExternalAccount:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the external account.
        external_account_external_id:
          type: string
          description: >-
            Unique ID of the external account in an external system for linking
            and idempotency.
          example: 0Br385JmgbTryJn8nEBnUb4A5ydv06U9Vbqqq
        external_account_source:
          $ref: '#/components/schemas/TransactionSource'
          description: Source of the external account.
        external_account_name:
          type: string
          description: Name of the external account.
          example: My external bank account
        latest_balance_timestamp:
          $ref: '#/components/schemas/ApiBalanceTimestamp'
          description: The latest balance timestamp.
        current_ledger_balance:
          type: integer
          format: int64
          description: Current ledger balance of the external account in cents.
        uncategorized_transaction_sum:
          type: integer
          format: int64
          description: >-
            Sum of uncategorized transactions for this external account in
            cents.
        mask:
          type: string
          nullable: true
          description: Last 4 digits of the external account number.
          example: '4321'
        institution:
          $ref: '#/components/schemas/ApiExternalAccountInstitution'
          description: The institution that the external account is associated with.
        notifications:
          type: array
          items:
            $ref: '#/components/schemas/ApiExternalAccountNotification'
          description: List of notifications for this external account.
        connection_needs_repair_as_of:
          type: string
          format: date-time
          nullable: true
          description: Timestamp indicating when the connection started needing repair.
        reconnect_with_new_credentials:
          type: boolean
          description: Whether the connection requires reconnection with new credentials.
        requires_user_confirmation_as_of:
          type: string
          format: date-time
          nullable: true
          description: Timestamp indicating when user confirmation was required.
        connection_id:
          type: string
          format: uuid
          nullable: true
          description: Unique identifier for the connection.
        connection_external_id:
          type: string
          nullable: true
          description: External identifier for the connection.
        user_created:
          type: boolean
          description: Whether this external account was created by a user.
        is_syncing:
          type: boolean
          description: Whether the external account is currently syncing.
        ledger_account_id:
          type: string
          format: uuid
          nullable: true
          description: >-
            The ID of the [ledger
            account](https://docs.layerfi.com/api-reference/ledger/chart#ledger-account-object)
            associated with the external account.
        archived_at:
          type: string
          format: date-time
          nullable: true
          description: Timestamp when the external account was archived.
        show_transactions_on_or_after:
          type: string
          format: date-time
          nullable: true
          description: >-
            If set, only transactions on or after this timestamp are visible.
            Transactions before this date are hidden from user-facing views and
            API queries. When this value is set or moved forward, any
            categorized transactions that fall outside the new bounds are
            automatically uncategorized.
        show_transactions_on_or_before:
          type: string
          format: date-time
          nullable: true
          description: >-
            If set, only transactions on or before this timestamp are visible.
            Transactions after this date are hidden from user-facing views and
            API queries. When this value is set or moved backward, any
            categorized transactions that fall outside the new bounds are
            automatically uncategorized.
    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
    ApiBalanceTimestamp:
      type: object
      properties:
        external_account_external_id:
          type: string
          description: >-
            Unique ID of the external account in an external system for linking
            and idempotency.
          example: 0Br385JmgbTryJn8nEBnUb4A5ydv06U9Vbqqq
        external_account_source:
          $ref: '#/components/schemas/TransactionSource'
          description: Source of the external account.
        balance:
          type: integer
          format: int64
          description: The current balance of the bank account, in cents.
        at:
          type: string
          format: date-time
          description: The time the balance was recorded.
        created_at:
          type: string
          format: date-time
          description: When the balance timestamp was created.
    ApiExternalAccountInstitution:
      type: object
      properties:
        name:
          type: string
          description: The name of the institution for the external account.
          example: Bank of Generica
        logo:
          type: string
          nullable: true
          description: The logo of the institution for the external account in base 64.
          example: iVBORw0KGgoAAAANSUhEUgAAAJgAAACYCAMAAAAvHNATAAAAYFBMVEUAAAAAC1ETC
    ApiExternalAccountNotification:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ApiExternalAccountNotificationType'
          description: Type of notification.
        scope:
          $ref: '#/components/schemas/ApiExternalAccountNotificationScope'
          description: Scope of the notification.
      required:
        - type
      description: Notification for external account requiring user attention.
    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
    ApiExternalAccountNotificationType:
      type: string
      enum:
        - OPENING_BALANCE_MISSING
        - CONFIRM_RELEVANT
        - CONFIRM_UNIQUE
      description: Type of notification for external account.
    ApiExternalAccountNotificationScope:
      type: string
      enum:
        - USER
      description: Scope of the external account notification.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````