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

# Get Categories

> Get Categories



## OpenAPI

````yaml /api-reference/openapi.json get /v1/categories
openapi: 3.0.3
info:
  title: Bookeeping.ai API
  version: 1.0.0
  description: API for accessing and managing bookkeeping.ai data.
servers:
  - url: https://api.bookeeping.ai/public-api
    description: USA Virginia Region
  - url: https://ca-api.bookeeping.ai/public-api
    description: Canada Toronto Region
  - url: https://eu-api.bookeeping.ai/public-api
    description: EU Belgium Region
security:
  - BearerAuth: []
paths:
  /v1/categories:
    get:
      tags:
        - Categories
      summary: Get Categories
      description: Get Categories
      operationId: getCategories
      parameters:
        - name: page
          in: query
          required: false
          description: The page number 1 - n
          schema:
            type: string
        - name: limit
          in: query
          required: false
          description: The number of items per page. Max is 250. Default is 10.
          schema:
            type: string
        - name: sortKey
          in: query
          required: false
          description: The key to sort the items by. Default is _id.
          schema:
            type: string
            enum:
              - _id
              - name
              - createdAt
              - updatedAt
              - transactionDate
        - name: sortOrder
          in: query
          required: false
          description: >-
            The order to sort the items by. Default is 1. -1 for descending. 1
            for ascending.
          schema:
            type: string
            enum:
              - '1'
              - '-1'
        - name: query
          in: query
          required: false
          description: The query to search the categories by name
          schema:
            type: string
        - name: accounts
          in: query
          required: false
          schema:
            allOf:
              - anyOf:
                  - not: {}
                  - type: string
                    description: >-
                      The accounts to filter the categories by. Comma separated
                      list of level two categories. Comma separated list of
                      level two categories eg:
                      INCOME,OTHER_INCOME,SALES,EXPENSE,DEPRECIATION,COST_OF_GOODS_SOLD,OTHER_EXPENSE,OVERHEAD,CURRENT_ASSET,FIXED_ASSET,INVENTORY,NON_CURRENT_ASSET,PREPAYMENT,LIABILITY,CURRENT_LIABILITY,NON_CURRENT_LIABILITY,TAX_PAYABLE,TAX,EQUITY
                description: >-
                  The accounts to filter the categories by. Comma separated list
                  of level two categories. Comma separated list of level two
                  categories eg:
                  INCOME,OTHER_INCOME,SALES,EXPENSE,DEPRECIATION,COST_OF_GOODS_SOLD,OTHER_EXPENSE,OVERHEAD,CURRENT_ASSET,FIXED_ASSET,INVENTORY,NON_CURRENT_ASSET,PREPAYMENT,LIABILITY,CURRENT_LIABILITY,NON_CURRENT_LIABILITY,TAX_PAYABLE,TAX,EQUITY
              - anyOf:
                  - not: {}
                  - type: array
                    items:
                      type: string
                      enum:
                        - INCOME
                        - OTHER_INCOME
                        - SALES
                        - EXPENSE
                        - DEPRECIATION
                        - COST_OF_GOODS_SOLD
                        - OTHER_EXPENSE
                        - OVERHEAD
                        - CURRENT_ASSET
                        - FIXED_ASSET
                        - INVENTORY
                        - NON_CURRENT_ASSET
                        - PREPAYMENT
                        - LIABILITY
                        - CURRENT_LIABILITY
                        - NON_CURRENT_LIABILITY
                        - TAX_PAYABLE
                        - TAX
                        - EQUITY
                        - OTHER
      responses:
        '200':
          description: Get Categories executed successfully
          headers:
            x-rate-limiter-daily-limit:
              description: Maximum number of requests allowed per day
              schema:
                type: integer
                example: 1500
            x-rate-limiter-minutely-limit:
              description: Maximum number of requests allowed per minute
              schema:
                type: integer
                example: 25
            x-rate-limiter-daily-usage:
              description: Number of requests made today
              schema:
                type: integer
                example: 106
            x-rate-limiter-minutely-usage:
              description: Number of requests made in the current minute
              schema:
                type: integer
                example: 1
            x-rate-limiter-operation-type:
              description: Operation type. Either read or write.
              schema:
                type: string
                enum:
                  - read
                  - write
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Success message
                  metaData:
                    type: object
                    properties:
                      warnings:
                        type: array
                        items:
                          type: string
                        description: Any validation warnings
                  data:
                    type: object
                    properties:
                      categories:
                        type: array
                        items:
                          type: object
                          properties:
                            _id:
                              type: string
                              description: The id of the category
                            name:
                              type: string
                              description: The name of the category
                            projectId:
                              type: string
                              description: The project id of the category
                            emoji:
                              type: string
                              nullable: true
                              description: The emoji of the category
                            parentCategory:
                              type: string
                              enum:
                                - INCOME
                                - OTHER_INCOME
                                - SALES
                                - EXPENSE
                                - DEPRECIATION
                                - COST_OF_GOODS_SOLD
                                - OTHER_EXPENSE
                                - OVERHEAD
                                - CURRENT_ASSET
                                - FIXED_ASSET
                                - INVENTORY
                                - NON_CURRENT_ASSET
                                - PREPAYMENT
                                - LIABILITY
                                - CURRENT_LIABILITY
                                - NON_CURRENT_LIABILITY
                                - TAX_PAYABLE
                                - TAX
                                - EQUITY
                                - OTHER
                              nullable: true
                              description: The parent category of the category
                            isArchived:
                              type: boolean
                              nullable: true
                              description: Whether the category is archived
                            number:
                              type: string
                              nullable: true
                              description: The number of the category
                            group:
                              type: string
                              nullable: true
                              description: The group of the category
                            createdBy:
                              type: string
                              enum:
                                - USER
                                - SYSTEM
                              nullable: true
                              description: The created by of the category
                            createdAt:
                              type: string
                              format: date-time
                              description: The created at of the category
                            updatedAt:
                              type: string
                              format: date-time
                              description: The updated at of the category
                          required:
                            - _id
                            - name
                            - projectId
                            - createdAt
                            - updatedAt
                          additionalProperties: false
                        description: The categories
                      count:
                        type: number
                        description: The count of the categories
                    required:
                      - categories
                      - count
                    additionalProperties: false
        '400':
          description: Bad Request - Invalid input parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - BadRequestError
                  message:
                    type: string
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - UnauthorizedError
                  message:
                    type: string
        '409':
          description: Conflict - Resource already exists
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - ConflictError
                  message:
                    type: string
        '429':
          description: >-
            Too Many Requests - Rate limit exceeded. Either daily or minutely
            limit exceeded. If you have any questions, please contact
            support@bookeeping.ai.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - TooManyRequestsError
                  message:
                    type: string
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        API key for authentication. Get your key from the Dashboard > Settings >
        API Access.

````