> ## 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 business activities

> Generates a list of activities for a specific business. Activities include categorization, SMS, and other business-specific events. This endpoint is paginated, see [Pagination](/api-details/pagination) for details. This v2 endpoint uses the same response format as v1.



## OpenAPI

````yaml get /v2/activity/businesses/{businessId}/activities
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v2/activity/businesses/{businessId}/activities:
    get:
      tags: []
      summary: Fetch business activities
      description: >-
        Generates a list of activities for a specific business. Activities
        include categorization, SMS, and other business-specific events. This
        endpoint is paginated, see [Pagination](/api-details/pagination) for
        details. This v2 endpoint uses the same response format as v1.
      operationId: activity.v2.business.activities.get
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business to fetch activities for.
          required: true
          schema:
            type: string
        - name: start_date
          in: query
          description: >-
            Filter activities by start date. Activities with a start date on or
            after this date will be included. ISO 8601 date format.
          example: '2024-07-01T00:00:00Z'
          schema:
            type: string
        - name: end_date
          in: query
          description: >-
            Filter activities by end date. Activities with a start date on or
            before this date will be included. ISO 8601 date format.
          example: '2024-07-31T23:59:59Z'
          schema:
            type: string
        - name: page
          in: query
          description: The page number to fetch. Defaults to 1.
          example: 1
          schema:
            type: integer
        - name: per_page
          in: query
          description: The number of items per page. Defaults to 25, maximum is 100.
          example: 25
          schema:
            type: integer
        - 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:
                type: array
                items:
                  $ref: '#/components/schemas/ApiTypedActivity'
        '404':
          description: >-
            Business id is not found. This indicates the business id is invalid
            or the business has been archived.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    ApiTypedActivity:
      type: object
      required:
        - createdAt
      properties:
        createdAt:
          type: string
          format: date-time
          description: Timestamp of when this activity was created.
      discriminator:
        propertyName: type
        mapping:
          Categorize_Transaction_Activity:
            $ref: '#/components/schemas/ApiCategorizeBankTransactionActivity'
          Load_PnL_Activity:
            $ref: '#/components/schemas/ApiLoadPnlActivity'
      oneOf:
        - $ref: '#/components/schemas/ApiCategorizeBankTransactionActivity'
          title: Categorize Transaction
        - $ref: '#/components/schemas/ApiLoadPnlActivity'
          title: Load PnL
    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
    ApiCategorizeBankTransactionActivity:
      type: object
      properties:
        type:
          type: string
          description: Resource type. Value will be 'Categorize_Transaction_Activity'.
          example: Categorize_Transaction_Activity
        transactionId:
          type: string
          format: uuid
          description: ID of the transaction to categorize in this activity.
        categorizationMethod:
          $ref: '#/components/schemas/ClassifierAgent'
          description: The categorization method for this activity.
        categorization:
          $ref: '#/components/schemas/BankTransactionCategorization'
          description: The categorization for the transaction.
      required:
        - transactionId
        - categorizationMethod
        - categorization
    ApiLoadPnlActivity:
      type: object
      properties:
        type:
          type: string
          description: Resource type. Value will be 'Load_PnL_Activity'.
          example: Load_PnL_Activity
        pnlStartDate:
          type: string
          format: date-time
          nullable: true
          description: The start date for the PnL to load in this activity.
        pnlEndDate:
          type: string
          format: date-time
          nullable: true
          description: The end date for the PnL to load in this activity.
      required:
        - createdAt
    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
    ClassifierAgent:
      type: string
      enum:
        - SMS
        - API
        - LAYER_AUTO
        - LAYER_MANUAL
    BankTransactionCategorization:
      description: >-
        Categorization payload for a bank transaction. Use `Category` for one
        category, or `Split` for multiple category entries that sum to the
        transaction amount.
      discriminator:
        propertyName: type
        mapping:
          Category:
            $ref: '#/components/schemas/Category'
          Split:
            $ref: '#/components/schemas/ApiSplitInput'
      oneOf:
        - $ref: '#/components/schemas/Category'
          title: Category
        - $ref: '#/components/schemas/ApiSplitInput'
          title: Split
    Category:
      type: object
      description: Single-category categorization payload.
      required:
        - type
        - category
      properties:
        type:
          type: string
          enum:
            - Category
          description: Discriminator for a single-category payload.
        category:
          $ref: '#/components/schemas/BankTransactionClassification'
          description: >-
            A single-category classification to apply to the full transaction
            amount.
    ApiSplitInput:
      type: object
      description: >-
        Split categorization payload. Provide one or more entries whose amounts
        sum exactly to the transaction amount.
      required:
        - type
        - entries
      properties:
        type:
          type: string
          enum:
            - Split
          description: Discriminator for a split categorization payload.
        entries:
          type: array
          items:
            $ref: '#/components/schemas/SplitEntry'
          description: Split entries. Each entry includes a category and amount in cents.
    BankTransactionClassification:
      discriminator:
        propertyName: type
        mapping:
          AccountId:
            $ref: '#/components/schemas/AccountId'
          StableName:
            $ref: '#/components/schemas/AccountStableName'
          Exclusion:
            $ref: '#/components/schemas/Exclusion'
      oneOf:
        - $ref: '#/components/schemas/AccountId'
          title: Account ID
        - $ref: '#/components/schemas/AccountStableName'
          title: Account Stable Name
        - $ref: '#/components/schemas/Exclusion'
          title: Exclusion
    SplitEntry:
      type: object
      properties:
        amount:
          type: integer
          format: int64
          description: Amount in cents for this split entry.
        category:
          $ref: '#/components/schemas/BankTransactionClassification'
          description: Category classification for this split entry amount.
    AccountId:
      type: object
      required:
        - type
        - id
      properties:
        type:
          type: string
          enum:
            - AccountId
          description: Resource type. Value will be `AccountId`.
          example: AccountId
        id:
          type: string
          format: uuid
          description: ID of the account.
    AccountStableName:
      type: object
      required:
        - type
        - stable_name
      properties:
        type:
          type: string
          enum:
            - StableName
          description: Resource type. Value will be `StableName`.
          example: StableName
        stable_name:
          type: string
          example: CURRENT_ASSETS
          description: Stable name of the account.
    Exclusion:
      type: object
      properties:
        type:
          type: string
          enum:
            - Exclusion
          description: Resource type. Value will be `Exclusion`.
        exclusion_type:
          $ref: '#/components/schemas/ExclusionType'
      required:
        - type
        - exclusion_type
    ExclusionType:
      type: string
      description: Type of exclusion for a bank transaction.
      enum:
        - PERSONAL_EXPENSES
        - PERSONAL_INFLOWS
        - DUPLICATE_TRANSACTION
        - OTHER_EXCLUSION
      x-displayStrings:
        PERSONAL_EXPENSES: Personal transactions
        PERSONAL_INFLOWS: Personal income sources
        DUPLICATE_TRANSACTION: Duplicate transaction
        OTHER_EXCLUSION: Other exclusion
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````