> ## Documentation Index
> Fetch the complete documentation index at: https://docs-beta.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: '#/components/schemas/ApiCategorizeBankTransactionActivity'
          Load_PnL_Activity: '#/components/schemas/ApiLoadPnlActivity'
      oneOf:
        - $ref: '#/components/schemas/ApiCategorizeBankTransactionActivity'
          title: Categorize Transaction
        - $ref: '#/components/schemas/ApiLoadPnlActivity'
          title: Load PnL
    ApiError:
      type: object
      properties: {}
      example: ''
      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
    ClassifierAgent:
      type: string
      enum:
        - SMS
        - API
        - LAYER_AUTO
        - LAYER_MANUAL
    BankTransactionCategorization:
      oneOf:
        - $ref: '#/components/schemas/Category'
          title: Category
        - $ref: '#/components/schemas/ApiSplitInput'
          title: Split
    Category:
      type: object
      properties:
        category:
          $ref: '#/components/schemas/BankTransactionClassification'
    ApiSplitInput:
      type: object
      properties:
        entries:
          type: array
          items:
            $ref: '#/components/schemas/SplitEntry'
    BankTransactionClassification:
      oneOf:
        - $ref: '#/components/schemas/AccountIdentifier'
          title: Account Identifier
        - $ref: '#/components/schemas/ExclusionClassification'
          title: Exclusion
    SplitEntry:
      type: object
      properties:
        amount:
          type: integer
          format: int64
        category:
          $ref: '#/components/schemas/BankTransactionClassification'
    AccountIdentifier:
      oneOf:
        - $ref: '#/components/schemas/AccountId'
          description: ID of the account
          title: Account ID
        - $ref: '#/components/schemas/AccountStableName'
          description: Stable name associated with the account
          title: Account Stable Name
    ExclusionClassification:
      $ref: '#/components/schemas/Exclusion'
      description: The type of exclusion classification.
    AccountId:
      type: object
      properties:
        type:
          type: string
          description: Resource type. Value will be `AccountId`.
          example: AccountId
        id:
          type: string
          format: uuid
          description: ID of the account
    AccountStableName:
      type: object
      properties:
        type:
          type: string
          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:
        exclusion_type:
          $ref: '#/components/schemas/ExclusionType'
      required:
        - exclusion_type
    ExclusionType:
      type: string
      description: Type of exclusion for a bank transaction.
      enum:
        - PERSONAL_EXPENSES
        - PERSONAL_INFLOWS
        - OTHER_EXCLUSION
      x-displayStrings:
        PERSONAL_EXPENSES: Personal transactions
        PERSONAL_INFLOWS: Personal income sources
        OTHER_EXCLUSION: Other exclusion
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````