> ## 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.

# Sync to QuickBooks API

> Sync Breezing crypto transactions to QuickBooks Online as journal entries to keep books up to date with on-chain activity.



## OpenAPI

````yaml POST /qbo/sync
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:
  /qbo/sync:
    post:
      tags:
        - QuickBooks
      summary: Sync transactions to QuickBooks
      description: >-
        Push the given Breezing transactions to QuickBooks Online as journal
        entries. Runs synchronously: the response is returned only after
        QuickBooks has accepted (or rejected) the batch. Each transaction must
        be unlocked and fully categorized. Already-synced transactions are
        updated; if a journal was deleted in QuickBooks (Object Not Found) or
        modified outside Breezing (Stale Object), the sync raises an error and
        resets the sync metadata so the next call re-creates the journal.
        Returns 400 if QuickBooks is not linked.


        **Duplicate-run protection:** returns 409 CONFLICT if a `batchQbSync`
        background job is currently running for this company (typically from a
        dashboard-initiated "Sync all"). Two parallel API calls do not block
        each other. Serialize concurrent API syncs on your side to avoid
        clobbering writes on the same transactions. Call GET /tasks first.
      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
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingSyncBody'
      responses:
        '200':
          description: Sync completed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      syncedCount:
                        type: integer
                        description: >-
                          Number of transaction IDs submitted to the accounting
                          platform. Each row's `lastSync` and platform sync ID
                          are updated; check transactions_get to confirm
                          individual rows.
                    required:
                      - syncedCount
                required:
                  - success
                  - data
        '400':
          description: QuickBooks not linked or invalid input
          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
        '409':
          description: A QuickBooks sync is already running for this company
          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:
    AccountingSyncBody:
      type: object
      properties:
        ids:
          type: array
          items:
            type: integer
            minimum: 0
            exclusiveMinimum: true
          minItems: 1
          maxItems: 1000
          description: >-
            Transaction IDs to sync (1-1000). Each must belong to this company
            and be unlocked.
      required:
        - ids

````