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

# Fetch a list of bookkeeping categories

> Retrieves a list of bookkeeping categories with optional filters for company ID, list of IDs, archived status, list of account IDs and list of category group IDs. Results are paginated.



## OpenAPI

````yaml post /v1/bookkeeping-categories:search
openapi: 3.0.1
info:
  title: Chart of Accounts API
  description: Bookkeeping Core OpenAPI definitions
  termsOfService: https://pleo.io/terms/
  contact:
    email: team.actina@pleo.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 24.13.0
servers:
  - url: https://external.pleo.io
    description: Production server
  - url: https://external.staging.pleo.io
    description: Staging server
security:
  - bearerAuth: []
  - basicAuth: []
tags:
  - name: BookkeepingCore
    description: This resource is associated with the BookkeepingCore API
  - name: Accounts
    description: >
      This API enables you to create an account in Pleo, search for an account
      by its ID, update details of an account recorded in Pleo, delete an
      account from Pleo, or apply specific filters to retrieve a list of
      accounts managed in Pleo.


      💡**Note**


      Please note that only response codes specific to the API behaviour are
      documented. Otherwise, we follow HTTP response codes.
  - name: Bookkeeping Category Aggregations
    description: >-
      This API enables you to read aggregated bookkeeping category groups.


      💡**Note**


      Please note that only response codes specific to the API behaviour are
      documented. Otherwise, we follow HTTP response codes.
  - name: Aggregated Contra Accounts
    description: >-
      This API enables you to read aggregated contra accounts.


      💡**Note**


      Please note that only response codes specific to the API behaviour are
      documented. Otherwise, we follow HTTP response codes.
  - name: Bookkeeping Categories
    description: >
      This API enables you to perform operations on a bookkeeping category.


      💡**Note**


      Please note that only response codes specific to the API behaviour are
      documented. Otherwise, we follow HTTP response codes.
  - name: Bookkeeping Category Groups
    description: >-
      This API enables you to perform operations on a bookkeeping category
      group.


      💡**Note**


      Please note that only response codes specific to the API behaviour are
      documented. Otherwise, we follow HTTP response codes.
  - name: Contra Accounts
    description: >
      This API enables you to manage contra accounts.


      💡**Note**


      Please note that only response codes specific to the API behaviour are
      documented. Otherwise, we follow HTTP response codes..
  - name: Bookkeeping Preferences Resource
paths:
  /v1/bookkeeping-categories:search:
    post:
      tags:
        - Bookkeeping Categories
      summary: Fetch a list of bookkeeping categories
      description: >-
        Retrieves a list of bookkeeping categories with optional filters for
        company ID, list of IDs, archived status, list of account IDs and list
        of category group IDs. Results are paginated.
      operationId: searchBookkeepingCategoriesV4
      parameters:
        - name: before
          in: query
          description: >-
            Lower bound of the page of data to return (cannot be used together
            with [after] or [offset]).
          required: false
          style: form
          explode: true
          schema:
            pattern: ^[A-Z2-7=~]+$
            type: string
        - name: after
          in: query
          description: >-
            Upper bound of the page of data to return (cannot be used together
            with [before] or [offset]).
          required: false
          style: form
          explode: true
          schema:
            pattern: ^[A-Z2-7=~]+$
            type: string
        - name: offset
          in: query
          description: >-
            Offset of the page of data to return (cannot be used together with
            [before] or [after]).
          required: false
          style: form
          explode: true
          schema:
            minimum: 0
            type: integer
            format: int64
        - name: limit
          in: query
          description: The maximum amount of items to return.
          required: false
          style: form
          explode: true
          schema:
            minimum: 0
            type: integer
            format: int32
        - name: sorting_keys
          in: query
          description: The keys to sort the results by.
          required: false
          style: form
          explode: true
          schema:
            type: array
            items:
              type: string
        - name: sorting_order
          in: query
          description: >-
            The order to sort the results by. Must be the same length as
            [sortingKeys]; one order per key.
          required: false
          style: form
          explode: true
          schema:
            type: array
            items:
              $ref: '#/components/schemas/PageOrder'
      requestBody:
        content:
          application/json;charset=UTF-8:
            schema:
              $ref: '#/components/schemas/BookkeepingCategorySearchRequestV4'
        required: true
      responses:
        '200':
          description: Bookkeeping categories fetched successfully.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CursorPaginatedResponseBookkeepingCategoryRestModelV4
              example:
                data:
                  - accountId: 123e4567-e89b-12d3-a456-426614174008
                    archived: false
                    categoryGroupId: 123e4567-e89b-12d3-a456-426614174007
                    companyId: 123e4567-e89b-12d3-a456-426614174006
                    id: 123e4567-e89b-12d3-a456-426614174005
                    name: Office Supplies
                    taxCodeId: 123e4567-e89b-12d3-a456-426614174009
                pagination:
                  currentRequestPagination:
                    parameters: {}
                  endCursor: string
                  hasNextPage: true
                  hasPreviousPage: true
                  startCursor: string
                  total: 1
components:
  schemas:
    PageOrder:
      type: string
      enum:
        - ASC
        - ASC_NULLS_FIRST
        - ASC_NULLS_LAST
        - DESC
        - DESC_NULLS_FIRST
        - DESC_NULLS_LAST
    BookkeepingCategorySearchRequestV4:
      required:
        - companyId
      type: object
      properties:
        accountIds:
          uniqueItems: true
          type: array
          description: Filter by a list of bookkeeping account IDs.
          nullable: true
          items:
            type: string
            description: Filter by a list of bookkeeping account IDs.
            format: uuid
            nullable: true
        archived:
          type: boolean
          description: Filter by archived status.
          nullable: true
        categoryGroupIds:
          uniqueItems: true
          type: array
          description: Filter by a list of bookkeeping category group IDs.
          nullable: true
          items:
            type: string
            description: Filter by a list of bookkeeping category group IDs.
            format: uuid
            nullable: true
        companyId:
          type: string
          description: Filter by company ID.
          format: uuid
        ids:
          uniqueItems: true
          type: array
          description: Filter by a list of bookkeeping category IDs.
          nullable: true
          items:
            type: string
            description: Filter by a list of bookkeeping category IDs.
            format: uuid
            nullable: true
        name:
          type: string
          description: Search by bookkeeping category name.
          nullable: true
    CursorPaginatedResponseBookkeepingCategoryRestModelV4:
      required:
        - data
        - pagination
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/BookkeepingCategoryRestModelV4'
        pagination:
          $ref: '#/components/schemas/CursorPageInfo'
    BookkeepingCategoryRestModelV4:
      required:
        - archived
        - categoryGroupId
        - companyId
        - id
        - name
      type: object
      properties:
        accountId:
          type: string
          description: >-
            Pleo's internal identifier of the bookkeeping account the
            bookkeeping category is associated with.
          format: uuid
          nullable: true
        archived:
          type: boolean
          description: >-
            Boolean flag used to determine if the bookkeeping category is
            archived.
        categoryGroupId:
          type: string
          description: >-
            Pleo's internal identifier of the bookkeeping category group the
            bookkeeping category is associated with.
          format: uuid
        companyId:
          type: string
          description: >-
            Pleo's internal identifier of the company the bookkeeping category
            is associated with.
          format: uuid
        id:
          type: string
          description: Pleo's internal identifier of the bookkeeping category.
          format: uuid
        metadata:
          type: object
          additionalProperties:
            type: object
            description: Place for API users to store flexible data.
            nullable: true
          description: Place for API users to store flexible data.
          nullable: true
        name:
          type: string
          description: Name of the bookkeeping category.
        taxCodeId:
          type: string
          description: >-
            Pleo's internal identifier of the tax code the bookkeeping category
            is associated with.
          format: uuid
          nullable: true
      description: Represents a bookkeeping category in Pleo.
    CursorPageInfo:
      required:
        - currentRequestPagination
        - hasNextPage
        - hasPreviousPage
      type: object
      properties:
        currentRequestPagination:
          $ref: '#/components/schemas/CursorPageCurrentRequestInfo'
        endCursor:
          type: string
        hasNextPage:
          type: boolean
        hasPreviousPage:
          type: boolean
        startCursor:
          type: string
        total:
          type: integer
          format: int64
    CursorPageCurrentRequestInfo:
      required:
        - parameters
      type: object
      properties:
        after:
          type: string
        before:
          type: string
        limit:
          type: integer
          format: int32
        offset:
          type: integer
          format: int64
        parameters:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
        sortingKeys:
          type: array
          items:
            type: string
        sortingOrder:
          type: array
          items:
            $ref: '#/components/schemas/PageOrder'
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        JWT Bearer token authentication. Include the token in the Authorization
        header as: `Bearer <token>`
      scheme: bearer
      bearerFormat: JWT
    basicAuth:
      type: http
      description: >-
        Basic HTTP authentication using API key. Use your API key as the
        username and leave the password empty. The credentials will be Base64
        encoded automatically.
      scheme: basic

````