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

# Refresh Xero Tracking Categories API

> Pull the latest Xero tracking categories into Breezing so crypto journal entries can be tagged by department, region, or other reporting dimension.



## OpenAPI

````yaml POST /xero/categories/refresh
openapi: 3.1.0
info:
  title: Breezing Public API
  version: 1.0.0
  description: >-
    Crypto accounting API for programmatic access and AI agents. Authenticate
    with an API key using the Authorization header: `Bearer brz_...`
servers:
  - url: https://api.breezing.io/v1
security:
  - BearerAuth: []
paths:
  /xero/categories/refresh:
    post:
      tags:
        - Xero
      summary: Refresh Xero tracking categories
      description: >-
        Live-fetch tracking categories and their options from Xero AND write the
        result back onto `companies.xeroTrackingCategories`. Each row is one
        option (e.g. category="Region", name="EMEA", id=<trackingOptionID>). Use
        `id` when setting `xeroTrackingCategory` on a transaction. Returns 400
        if Xero is not linked.
      parameters:
        - schema:
            type: string
            description: >-
              Organization ID. Use GET /v1/companies to discover available
              org/company pairs.
            example: '1'
          required: true
          description: >-
            Organization ID. Use GET /v1/companies to discover available
            org/company pairs.
          name: orgId
          in: query
        - schema:
            type: string
            description: >-
              Company ID. Use GET /v1/companies to discover available companies
              and their access levels.
            example: '1'
          required: true
          description: >-
            Company ID. Use GET /v1/companies to discover available companies
            and their access levels.
          name: companyId
          in: query
      responses:
        '200':
          description: Xero tracking categories refreshed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/XeroTrackingCategoryOption'
                required:
                  - success
                  - data
        '400':
          description: Xero not linked
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '401':
          description: Invalid or missing API key
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '403':
          description: >-
            API key has no access to this company, has read-only access where
            write was required, or the company subscription is inactive
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - success
                  - error
      security:
        - BearerAuth: []
components:
  schemas:
    XeroTrackingCategoryOption:
      type: object
      properties:
        category:
          type: string
          nullable: true
          description: Category name
        catId:
          type: string
          nullable: true
          description: Tracking category ID
        name:
          type: string
          nullable: true
          description: Option name
        id:
          type: string
          nullable: true
          description: Tracking option ID
      required:
        - category
        - catId
        - name
        - id

````