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

# Approve Invoices API

> Approve one or more received invoices in Breezing to book them against Accounts Payable and settle their matched payment transactions.



## OpenAPI

````yaml POST /invoices/approve
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:
  /invoices/approve:
    post:
      tags:
        - Invoices
      summary: Approve received invoices
      description: >-
        Approve one or more invoices: the books event. Per invoice the server
        validates the fields the books need (a bookable documentType,
        invoiceDate, currency, a positive totalAmount, a GL account), stamps the
        FX rate and company-currency amounts (same-currency = 1, a manual rate
        set via PATCH wins, else the day rate; a rate that cannot be resolved
        refuses the invoice instead of booking zero), resolves the vendor entity
        contact (creating one for an unknown vendor), flips the status to
        approved, and settles any already matched transactions.


        Settlement: each matched transaction is coded to the Accounts Payable
        account (direct settlement, the default) or to the AP clearing account
        when the company has one (the QuickBooks loop), with vat = no-vat and
        history saved before the write. Outside clearing mode every match also
        gets its allocation, computed once: a transaction within 1% of what is
        due closes the invoice and the difference posts to the FX gain or loss
        account; a smaller one leaves the invoice partly paid; one worth more
        than the invoices linked to it is not applied and comes back as a
        warning. A company with no Accounts Payable account re-codes nothing and
        the invoice posts no journal. An invoice that is already published at
        Xero gets its payments recorded in the same call.


        One invoice failing never blocks the rest: read the per-row results. Ids
        that are not "review"/"failed" (or not in this company) count as
        skipped. Approved invoices are immutable on journal fields; use POST
        /invoices/{id}/unapprove to revert.


        Provider publishing does NOT run automatically here (the dashboard
        auto-publish setting is client-driven); call POST
        /invoices/{id}/publish.
      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/ApproveInvoicesBody'
      responses:
        '200':
          description: Approval attempted per invoice
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      approved:
                        type: integer
                      skipped:
                        type: integer
                      results:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: number
                            approved:
                              type: boolean
                            reasons:
                              type: array
                              items:
                                type: string
                              description: >-
                                Why this invoice was refused (empty when
                                approved).
                            warnings:
                              type: array
                              items:
                                type: string
                              description: >-
                                Non-fatal notes (a locked transaction that kept
                                its coding, an unset AP Clearing account, ...).
                          required:
                            - id
                            - approved
                            - reasons
                            - warnings
                    required:
                      - approved
                      - skipped
                      - results
                required:
                  - success
                  - data
        '400':
          description: Bad request
          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:
    ApproveInvoicesBody:
      type: object
      properties:
        ids:
          type: array
          items:
            type: integer
            minimum: 0
            exclusiveMinimum: true
          minItems: 1
          maxItems: 500
          description: >-
            Invoice IDs to approve (1-500). Only "review" and "failed" invoices
            are candidates; others are skipped with a reason.
      required:
        - ids

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.