> ## 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 transaction categories

> This endpoint returns the nested tree of transaction categories. These categories are derived from the business's chart of accounts and this list should be used for displaying options in a transaction categorization UI. Layer's `<BankTransactions>` embedded component already uses this endpoint, so if you're using embedded components, you probably won't need to use this API endpoint directly..



## OpenAPI

````yaml get /v1/businesses/{businessId}/categories
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/categories:
    get:
      tags: []
      summary: Fetch transaction categories
      description: >-
        This endpoint returns the nested tree of transaction categories. These
        categories are derived from the business's chart of accounts and this
        list should be used for displaying options in a transaction
        categorization UI. Layer's `<BankTransactions>` embedded component
        already uses this endpoint, so if you're using embedded components, you
        probably won't need to use this API endpoint directly..
      operationId: business.categories.get
      parameters:
        - name: businessId
          in: path
          description: >-
            The UUID of the business to fetch the tree of available categories
            for
          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/CategoryList'
      deprecated: false
components:
  schemas:
    CategoryList:
      type: object
      description: List of the categories available for a business
      properties:
        type:
          type: string
          description: Resource type. Value will be 'Category_List'.
          example: Category_List
        categories:
          description: >-
            Array of nested categorizations for a business. A categorization is
            a polymorphic type that can be an account, optional account, or
            exclusion.
          type: array
          items:
            $ref: '#/components/schemas/NestedApiCategorization'
    NestedApiCategorization:
      type: object
      oneOf:
        - $ref: '#/components/schemas/NestedAccountCategorization'
          title: AccountNested
        - $ref: '#/components/schemas/NestedOptionalCatetoryCategorization'
          title: OptionalAccountNested
        - $ref: '#/components/schemas/NestedExclusionCategorization'
          title: ExclusionNested
    NestedAccountCategorization:
      type: object
      description: A category that exists
      properties:
        type:
          type: string
          description: Resource type. Value will be 'AccountNested'.
          example: AccountNested
        id:
          type: string
          format: uuid
          description: The ID of the account
        stable_name:
          type: string
          nullable: true
          description: The stable name of the account
          example: EXPENSES
        display_name:
          type: string
          description: The display name of the account
          example: Expenses
        subCategories:
          $ref: '#/components/schemas/NestedApiSubCategories'
          description: The subcategories of the account
    NestedOptionalCatetoryCategorization:
      type: object
      description: A category that is not created by default
      properties:
        type:
          type: string
          description: Resource type. Value will be 'OptionalAccountNested'.
          example: '''OptionalAccountNested'''
        stable_name:
          type: string
          description: The stable name of the optional account
        display_name:
          type: string
          description: The display name of the optional account
        subCategories:
          $ref: '#/components/schemas/NestedApiSubCategories'
          description: The subcategories of the account
    NestedExclusionCategorization:
      type: object
      properties:
        type:
          type: string
          description: Resource type. Value will be 'ExclusionNested'.
          example: ExclusionNested
        id:
          type: string
          description: The ID of the exclusion type
        display_name:
          type: string
          description: The display name of the exclusion type
    NestedApiSubCategories:
      type: array
      items:
        $ref: '#/components/schemas/NestedApiCategorization'
      nullable: true
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````