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

# List Transaction Categories

> Returns a list of transaction categories available for the company.

Transaction categories define the types of financial transactions that can be
created, such as indemnity payments, defense costs, expert fees, etc.

Each category includes:
- **Direction**: Whether it's Payable (company pays out) or Receivable (company receives)
- **Scopes**: Where the category can be used (policy or event level) and which payee types
- **Line items**: Sub-categories for itemized transactions
- **Reserves support**: Whether the category supports reserve amounts

Returns company-specific custom categories if configured, otherwise returns
the built-in default categories.

**Required permission:** `company:read`




## OpenAPI

````yaml /openapi/generated-external-api.yaml get /api/external/companies/{companyId}/transaction-categories
openapi: 3.0.3
info:
  title: AI Insurance External API
  description: External API for AI Insurance platform
  version: 1.0.0
  contact:
    email: support@aiinsurance.io
servers:
  - url: https://app.aiinsurance.io
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /api/external/companies/{companyId}/transaction-categories:
    get:
      tags:
        - Transaction Categories
      summary: List Transaction Categories
      description: >
        Returns a list of transaction categories available for the company.


        Transaction categories define the types of financial transactions that
        can be

        created, such as indemnity payments, defense costs, expert fees, etc.


        Each category includes:

        - **Direction**: Whether it's Payable (company pays out) or Receivable
        (company receives)

        - **Scopes**: Where the category can be used (policy or event level) and
        which payee types

        - **Line items**: Sub-categories for itemized transactions

        - **Reserves support**: Whether the category supports reserve amounts


        Returns company-specific custom categories if configured, otherwise
        returns

        the built-in default categories.


        **Required permission:** `company:read`
      operationId: listTransactionCategories
      parameters:
        - $ref: '#/components/parameters/companyId'
      responses:
        '200':
          description: List of transaction categories
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/TransactionCategory'
                  totalCount:
                    type: integer
                    description: Total number of transaction categories
              examples:
                success:
                  summary: Transaction categories list
                  value:
                    items:
                      - id: 550e8400-e29b-41d4-a716-446655440001
                        categoryId: indemnity_invoice
                        name: Indemnity
                        lineItemCategories: []
                        isItemized: false
                        direction: Payable
                        scopes:
                          - entityType: event
                            supportedPayeeTypes:
                              - payee
                        supportsReserves: true
                      - id: 550e8400-e29b-41d4-a716-446655440002
                        categoryId: alae_invoice
                        name: ALAE
                        lineItemCategories:
                          - categoryId: attorney_fees_expenses
                            name: Attorney Fees Expenses
                            parentTransactionCategoryId: alae_invoice
                          - categoryId: expert_fees_expenses
                            name: Expert Fees Expenses
                            parentTransactionCategoryId: alae_invoice
                          - categoryId: other_alae_expenses
                            name: Other Alae Expenses
                            parentTransactionCategoryId: alae_invoice
                        isItemized: true
                        direction: Payable
                        scopes:
                          - entityType: event
                            supportedPayeeTypes:
                              - payee
                        supportsReserves: true
                      - id: 550e8400-e29b-41d4-a716-446655440003
                        categoryId: policy_invoice
                        name: Policy Invoice
                        lineItemCategories:
                          - categoryId: premiums
                            name: Premiums
                            parentTransactionCategoryId: policy_invoice
                          - categoryId: premium_taxes
                            name: Premium Taxes
                            parentTransactionCategoryId: policy_invoice
                        isItemized: true
                        direction: Receivable
                        scopes:
                          - entityType: policy
                            supportedPayeeTypes:
                              - insured
                              - brokerage
                              - payee
                        supportsReserves: false
                      - id: 550e8400-e29b-41d4-a716-446655440004
                        categoryId: deductible_invoice
                        name: Deductible Invoice
                        lineItemCategories: []
                        isItemized: false
                        direction: Receivable
                        scopes:
                          - entityType: event
                            supportedPayeeTypes:
                              - insured
                        supportsReserves: false
                    totalCount: 4
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  parameters:
    companyId:
      name: companyId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Company identifier
  schemas:
    TransactionCategory:
      type: object
      description: A transaction category for financial transactions
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the transaction category
        categoryId:
          type: string
          description: Category identifier code
        name:
          type: string
          description: Display name for the transaction category
        lineItemCategories:
          type: array
          items:
            $ref: '#/components/schemas/LineItemCategory'
          description: Available line item subcategories
        isItemized:
          type: boolean
          description: Whether transactions in this category require itemization
        direction:
          $ref: '#/components/schemas/TransactionDirection'
        scopes:
          type: array
          items:
            $ref: '#/components/schemas/TransactionScope'
          description: >-
            Where this category can be used (policy, event) and with which payee
            types
        supportsReserves:
          type: boolean
          description: Whether this category supports reserve amounts
    LineItemCategory:
      type: object
      description: A line item subcategory within a transaction category
      properties:
        categoryId:
          type: string
          description: Line item category identifier
        name:
          type: string
          description: Display name for the line item category
        parentTransactionCategoryId:
          type: string
          description: The parent transaction category ID
    TransactionDirection:
      type: string
      description: Direction of the transaction (who pays whom)
      enum:
        - Payable
        - Receivable
    TransactionScope:
      type: object
      description: Defines where a transaction category can be used
      properties:
        entityType:
          $ref: '#/components/schemas/TransactionScopeEntityType'
        supportedPayeeTypes:
          type: array
          items:
            type: string
            enum:
              - insured
              - payee
              - brokerage
          description: Payee types that can be used with this category in this scope
    ErrorResponse:
      type: object
      description: Standard error response for all external API endpoints
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code
              example: VALIDATION_ERROR
            message:
              type: string
              description: Human-readable error message
              example: 'submissionId: Required field is missing'
            details:
              type: array
              description: Additional details for validation errors (field-level errors)
              items:
                type: object
                properties:
                  field:
                    type: string
                    description: The field that caused the error
                    example: submissionId
                  message:
                    type: string
                    description: Description of the field error
                    example: Required field is missing
    TransactionScopeEntityType:
      type: string
      description: Entity type that a transaction category can apply to
      enum:
        - policy
        - event
  responses:
    Unauthorized:
      description: Unauthorized - Invalid or missing API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            missingApiKey:
              summary: Missing API key
              value:
                error:
                  code: UNAUTHORIZED
                  message: Authorization header is required
            bearerTokenNotAllowed:
              summary: Bearer token used instead of API key
              value:
                error:
                  code: UNAUTHORIZED
                  message: External API endpoints require API key authentication
    Forbidden:
      description: Forbidden - Insufficient permissions
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            insufficientPermissions:
              summary: Insufficient permissions
              value:
                error:
                  code: FORBIDDEN
                  message: Insufficient permissions to perform this action
    InternalServerError:
      description: Internal Server Error - Unexpected error occurred
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          examples:
            internalError:
              summary: Unexpected server error
              value:
                error:
                  code: INTERNAL_ERROR
                  message: An unexpected error occurred. Please try again later.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        API key authentication. Include your API key in the Authorization
        header.

````