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

# Pull category candidates from a ledger connection

> Preview-only P&L category candidates (income + expense) from the linked bookkeeping system. Balance-sheet accounts (A/R, A/P, bank, equity) are omitted — those belong to a later AR/AP surface. Does not write workspace categories — persistence is a Range app concern. Active accounts only.



## OpenAPI

````yaml /api-reference/platform-api.json get /v2/account-connections/bookkeeping/{connectionId}/categories
openapi: 3.0.0
info:
  title: Range Platform API
  description: >-
    The Range Platform API for workspace management, counterparties, and
    operational tooling.
  version: 1.7.16
  contact: {}
servers:
  - url: https://api.range.org
    description: Range API Server
security:
  - Authorization: []
  - Authorization: []
tags:
  - name: Address Information
    description: Get information about a crypto address.
  - name: Transfer Enrichments
    description: Attach workspace-scoped notes and categories to transfers.
  - name: Counterparties
    description: Manage external entities, their addresses, bank accounts, and documents.
paths:
  /v2/account-connections/bookkeeping/{connectionId}/categories:
    get:
      tags:
        - Account Connections
      summary: Pull category candidates from a ledger connection
      description: >-
        Preview-only P&L category candidates (income + expense) from the linked
        bookkeeping system. Balance-sheet accounts (A/R, A/P, bank, equity) are
        omitted — those belong to a later AR/AP surface. Does not write
        workspace categories — persistence is a Range app concern. Active
        accounts only.
      operationId: listCategories
      parameters:
        - name: connectionId
          required: true
          in: path
          schema:
            type: string
        - name: cursor
          required: false
          in: query
          description: Opaque cursor returned in meta.next_cursor of a previous response.
          schema:
            type: string
        - name: size
          required: false
          in: query
          schema:
            minimum: 1
            maximum: 100
            default: 50
            example: 50
            type: number
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListBookkeepingCategoriesResponseDto'
components:
  schemas:
    ListBookkeepingCategoriesResponseDto:
      type: object
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/BookkeepingCategoryCandidateDto'
        meta:
          $ref: '#/components/schemas/CursorMetaDto'
      required:
        - items
        - meta
    BookkeepingCategoryCandidateDto:
      type: object
      properties:
        external_id:
          type: string
          description: Upstream id (QuickBooks Account Id, Xero AccountID, …)
          example: '12'
        name:
          type: string
          example: Legal & Professional Fees:Accounting
        parent_external_id:
          type: string
          nullable: true
          description: Parent category upstream id when hierarchical
          example: '7'
        classification:
          type: string
          description: >-
            P&L side only — adapters map provider COA into income/expense;
            balance-sheet accounts (A/R, A/P, bank, equity) are omitted.
          enum:
            - income
            - expense
          example: expense
      required:
        - external_id
        - name
        - classification
    CursorMetaDto:
      type: object
      properties:
        next_cursor:
          type: string
          nullable: true
          description: >-
            Opaque string cursor pointing to the next page of results. null if
            there is no next page.
          example: eyJpZCI6IjkxeFFlV3Z...
        previous_cursor:
          type: string
          nullable: true
          description: >-
            Opaque string cursor pointing to the previous page of results. null
            if there is no previous page.
          example: eyJpZCI6IjkxeFFlV3Z...
        first_page_cursor:
          type: string
          description: >-
            Opaque string cursor pointing to the very first page in the entire
            dataset with respect to the current filter.
          example: eyJpZCI6IjkxeFFlV3Z...
        last_page_cursor:
          type: string
          nullable: true
          description: >-
            Opaque string cursor pointing to the very last page in the entire
            dataset with respect to the current filter.
          example: eyJpZCI6IjkxeFFlV3Z...
        total_count:
          type: number
          nullable: true
          description: Total number of results.
          example: 100
        page_number:
          type: number
          description: Current page number.
          example: 1
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Authorization method required to allow user to access the api endpoints.

````