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

# Partial update of a resource



## OpenAPI

````yaml /api-reference/openapi.json patch /accounting/{resource}/{id}
openapi: 3.0.0
info:
  title: RouteMCP API
  description: >-
    Unified API for integrations. Connect to multiple providers through a single
    API.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.routemcp.io/api/v1
    description: Production
security:
  - bearerAuth: []
tags: []
paths:
  /accounting/{resource}/{id}:
    patch:
      tags:
        - Accounting Resources
      summary: Partial update of a resource
      operationId: AccountingResourceController_patchResource
      parameters:
        - name: resource
          required: true
          in: path
          schema:
            enum:
              - invoice
              - contact
              - account
              - payment
              - tax_rate
              - journal_entry
              - expense
              - purchase_order
              - sales_order
              - credit_note
              - vendor_credit
              - company_info
              - item
              - tracking_category
              - accounting_period
              - payment_method
              - payment_term
              - address
              - attachment
              - balance_sheet
              - bank_feed_account
              - bank_feed_transaction
              - cash_flow_statement
              - employee
              - expense_report
              - general_ledger_transaction
              - income_statement
              - item_fulfillment
              - phone_number
              - project
              - transaction
            type: string
          description: >-
            Canonical accounting resource type to patch. Must be one of the
            values in the enum below. RouteMCP maps this to the equivalent
            provider-native object (e.g. `invoice` → QuickBooks Online
            Invoice/Bill, Xero Invoice, Zoho Books Invoice). Read-only resources
            — reports, bank feeds, `general_ledger_transaction`, `address`,
            `phone_number`, and `transaction` — cannot be patched.
        - $ref: '#/components/parameters/CrmRecordIdPath'
        - $ref: '#/components/parameters/ProviderQueryRequired'
        - $ref: '#/components/parameters/XEndUserIdHeader'
      requestBody:
        required: true
        description: >-
          Partial update (PATCH) — every field is optional. Only fields present
          in the body are written; everything else is left untouched on the
          record.
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/AccountingInvoicePartial'
                - $ref: '#/components/schemas/AccountingContactPartial'
                - $ref: '#/components/schemas/AccountingAccountPartial'
                - $ref: '#/components/schemas/AccountingPaymentPartial'
                - $ref: '#/components/schemas/AccountingTaxRatePartial'
                - $ref: '#/components/schemas/AccountingJournalEntryPartial'
                - $ref: '#/components/schemas/AccountingExpensePartial'
                - $ref: '#/components/schemas/AccountingPurchaseOrderPartial'
                - $ref: '#/components/schemas/AccountingSalesOrderPartial'
                - $ref: '#/components/schemas/AccountingCreditNotePartial'
                - $ref: '#/components/schemas/AccountingVendorCreditPartial'
                - $ref: '#/components/schemas/AccountingCompanyInfoPartial'
                - $ref: '#/components/schemas/AccountingItemPartial'
                - $ref: '#/components/schemas/AccountingTrackingCategoryPartial'
                - $ref: '#/components/schemas/AccountingPeriodPartial'
                - $ref: '#/components/schemas/AccountingPaymentMethodPartial'
                - $ref: '#/components/schemas/AccountingPaymentTermPartial'
                - $ref: '#/components/schemas/AccountingAttachmentPartial'
                - $ref: '#/components/schemas/AccountingEmployeePartial'
                - $ref: '#/components/schemas/AccountingExpenseReportPartial'
                - $ref: '#/components/schemas/AccountingItemFulfillmentPartial'
                - $ref: '#/components/schemas/AccountingProjectPartial'
              discriminator:
                propertyName: resource
                mapping:
                  invoice:
                    $ref: '#/components/schemas/AccountingInvoicePartial'
                  contact:
                    $ref: '#/components/schemas/AccountingContactPartial'
                  account:
                    $ref: '#/components/schemas/AccountingAccountPartial'
                  payment:
                    $ref: '#/components/schemas/AccountingPaymentPartial'
                  tax_rate:
                    $ref: '#/components/schemas/AccountingTaxRatePartial'
                  journal_entry:
                    $ref: '#/components/schemas/AccountingJournalEntryPartial'
                  expense:
                    $ref: '#/components/schemas/AccountingExpensePartial'
                  purchase_order:
                    $ref: '#/components/schemas/AccountingPurchaseOrderPartial'
                  sales_order:
                    $ref: '#/components/schemas/AccountingSalesOrderPartial'
                  credit_note:
                    $ref: '#/components/schemas/AccountingCreditNotePartial'
                  vendor_credit:
                    $ref: '#/components/schemas/AccountingVendorCreditPartial'
                  company_info:
                    $ref: '#/components/schemas/AccountingCompanyInfoPartial'
                  item:
                    $ref: '#/components/schemas/AccountingItemPartial'
                  tracking_category:
                    $ref: '#/components/schemas/AccountingTrackingCategoryPartial'
                  accounting_period:
                    $ref: '#/components/schemas/AccountingPeriodPartial'
                  payment_method:
                    $ref: '#/components/schemas/AccountingPaymentMethodPartial'
                  payment_term:
                    $ref: '#/components/schemas/AccountingPaymentTermPartial'
                  attachment:
                    $ref: '#/components/schemas/AccountingAttachmentPartial'
                  employee:
                    $ref: '#/components/schemas/AccountingEmployeePartial'
                  expense_report:
                    $ref: '#/components/schemas/AccountingExpenseReportPartial'
                  item_fulfillment:
                    $ref: '#/components/schemas/AccountingItemFulfillmentPartial'
                  project:
                    $ref: '#/components/schemas/AccountingProjectPartial'
            examples:
              invoice:
                summary: Patch an invoice
                value:
                  status: PAID
                  paid_on_date: '2026-05-15'
              contact:
                summary: Patch a contact
                value:
                  email_address: new-billing@acme.example
              payment:
                summary: Patch a payment
                value:
                  total_amount: 1700
              account:
                summary: Patch an account
                value:
                  status: INACTIVE
              tax_rate:
                summary: Patch a tax rate
                value:
                  status: ARCHIVED
              journal_entry:
                summary: Patch a journal entry
                value:
                  memo: Reclassified — adjusted prior posting.
              expense:
                summary: Patch an expense
                value:
                  memo: Updated memo.
              purchase_order:
                summary: Patch a purchase order
                value:
                  status: BILLED
              sales_order:
                summary: Patch a sales order
                value:
                  status: COMPLETED
              credit_note:
                summary: Patch a credit note
                value:
                  status: PAID
              vendor_credit:
                summary: Patch a vendor credit
                value:
                  transaction_date: '2026-04-19'
              company_info:
                summary: Patch company info
                value:
                  tax_number: 98-7654322
              item:
                summary: Patch an item
                value:
                  unit_price: 5200
              tracking_category:
                summary: Patch a tracking category
                value:
                  status: ARCHIVED
              accounting_period:
                summary: Patch an accounting period
                value:
                  status: INACTIVE
              payment_method:
                summary: Patch a payment method
                value:
                  is_active: false
              payment_term:
                summary: Patch a payment term
                value:
                  discount_days: 7
              attachment:
                summary: Patch an attachment (metadata-only)
                value:
                  file_name: team-lunch-receipt-v2.pdf
              employee:
                summary: Patch an employee
                value:
                  status: INACTIVE
              expense_report:
                summary: Patch an expense report
                value:
                  status: APPROVED
              item_fulfillment:
                summary: Patch an item fulfillment
                value:
                  status: SHIPPED
              project:
                summary: Patch a project
                value:
                  is_active: false
      responses:
        '200':
          description: Resource partially updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateAccountingResourceResponse'
              examples:
                invoice:
                  summary: Invoice patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:0958cbc6-6040-430a-848e-aafacbadf4ae
                      remote_id: EILBM0XYAR1
                      created_at: '2026-04-15T10:30:00Z'
                      modified_at: '2026-04-16T15:45:00Z'
                      type: ACCOUNTS_RECEIVABLE
                      contact: 022a2bef-57e5-4def-8285-d68a25d1e36e
                      number: AIM-01-2026
                      issue_date: '2026-04-15'
                      due_date: '2026-05-15'
                      paid_on_date: null
                      memo: Quarterly retainer.
                      company: 0bb37dc5-2bf3-4c75-95ab-58f06a93a2ac
                      employee: null
                      currency: USD
                      exchange_rate: '1.00'
                      payment_term: fb8c55b6-0525-4452-b3b5-d2922d20b212
                      total_discount: 0
                      sub_total: 1500
                      status: OPEN
                      total_tax_amount: 120
                      total_amount: 1620
                      balance: 1620
                      remote_updated_at: '2026-04-16T15:45:00Z'
                      tracking_categories: []
                      accounting_period: 0a3a9f8b-2c2c-4f50-b34a-e7a3e4d56789
                      purchase_orders: []
                      sales_orders: []
                      payments: []
                      applied_payments: []
                      line_items:
                        - id: urn:uuid:5fc63596-d40e-4c73-bee6-26a0e6356f48
                          remote_id: '8765'
                          description: Strategy consulting — April 2026
                          unit_price: 1500
                          quantity: 1
                          total_amount: 1500
                          currency: USD
                          account: 9d9eaaf6-9f95-4e34-bc03-d33b7b4d2611
                          tax_rate: ee2c8927-d59f-4f89-90e3-4eef5ee43a91
                          is_billable: true
                      applied_credit_notes: []
                      applied_vendor_credits: []
                      inclusive_of_tax: false
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                contact:
                  summary: Contact patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:022a2bef-57e5-4def-8285-d68a25d1e36e
                      remote_id: '12345'
                      name: Acme Inc.
                      email_address: new-billing@acme.example
                      status: ACTIVE
                      company: 0bb37dc5-2bf3-4c75-95ab-58f06a93a2ac
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                account:
                  summary: Account patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:9d9eaaf6-9f95-4e34-bc03-d33b7b4d2611
                      remote_id: '1010'
                      name: Sales Revenue
                      status: INACTIVE
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                payment:
                  summary: Payment patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:9b1b3c6e-2eb6-4f6e-bb24-3c2b9bbbac98
                      remote_id: PMT-2026-001
                      total_amount: 1700
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                tax_rate:
                  summary: Tax rate patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:ee2c8927-d59f-4f89-90e3-4eef5ee43a91
                      remote_id: TAX-08-CA
                      status: ARCHIVED
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                journal_entry:
                  summary: Journal entry patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:33333333-3333-3333-3333-333333333333
                      remote_id: JE-2026-09
                      memo: Reclassified — adjusted prior posting.
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                expense:
                  summary: Expense patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:55555555-5555-5555-5555-555555555555
                      remote_id: EXP-2026-100
                      memo: Updated memo.
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                purchase_order:
                  summary: Purchase order patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:77777777-7777-7777-7777-777777777777
                      remote_id: PO-2026-042
                      status: BILLED
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                sales_order:
                  summary: Sales order patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
                      remote_id: SO-2026-088
                      status: COMPLETED
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                credit_note:
                  summary: Credit note patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:cccccccc-dddd-eeee-ffff-111111111111
                      remote_id: CN-2026-007
                      status: PAID
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                vendor_credit:
                  summary: Vendor credit patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:eeeeeeee-ffff-1111-2222-333333333333
                      remote_id: VC-2026-003
                      transaction_date: '2026-04-19'
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                company_info:
                  summary: Company info patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:0bb37dc5-2bf3-4c75-95ab-58f06a93a2ac
                      remote_id: REALM-12345
                      tax_number: 98-7654322
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                item:
                  summary: Item patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:10101010-1010-1010-1010-101010101010
                      remote_id: ITEM-001
                      unit_price: 5200
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                tracking_category:
                  summary: Tracking category patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:b6e3f2c0-3aa0-4d31-9f7c-91d44b2a1b3c
                      remote_id: CLASS-PROD
                      status: ARCHIVED
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                accounting_period:
                  summary: Accounting period patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:0a3a9f8b-2c2c-4f50-b34a-e7a3e4d56789
                      remote_id: FY2026-Q2
                      status: INACTIVE
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                payment_method:
                  summary: Payment method patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:70afef8b-21cb-4f5a-bf6e-9b85a8c1ea45
                      remote_id: ACH-001
                      is_active: false
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                payment_term:
                  summary: Payment term patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:fb8c55b6-0525-4452-b3b5-d2922d20b212
                      remote_id: NET30
                      discount_days: 7
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                attachment:
                  summary: Attachment patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:xero:attachment:2d03a37c-d389-4d7d-999a-80353b19e789
                      remote_id: 2d03a37c-d389-4d7d-999a-80353b19e789
                      file_name: team-lunch-receipt-v2.pdf
                employee:
                  summary: Employee patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:7e1bb333-bbbb-cccc-dddd-2222bbbb2222
                      remote_id: EMP-001
                      status: INACTIVE
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                expense_report:
                  summary: Expense report patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:7e1bb333-bbbb-cccc-dddd-3333bbbb3333
                      remote_id: ER-2026-001
                      status: APPROVED
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                item_fulfillment:
                  summary: Item fulfillment patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:7e1bb333-bbbb-cccc-dddd-5555bbbb5555
                      remote_id: IF-2026-001
                      status: SHIPPED
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
                project:
                  summary: Project patched
                  value:
                    success: true
                    statusCode: 200
                    message: OK
                    data:
                      id: urn:uuid:7e1bb333-bbbb-cccc-dddd-7777bbbb7777
                      remote_id: PROJ-001
                      is_active: false
                      remote_was_deleted: false
                      providerSlug: quickbooks-online
                      providerId: a1b2c3d4-e5f6-7890-abcd-ef1234567890
        '400':
          description: Validation failed or missing params
        '401':
          description: Missing or invalid API key
        '404':
          description: End user, provider, or record not found
        '405':
          description: Provider does not support partial update (PATCH) for this resource
        '422':
          description: Validation Errors.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    example: false
                  statusCode:
                    type: integer
                    example: 400
                    default: 400
                  message:
                    type: string
                    example: Validation Errors.
                    default: Validation Errors.
                  errors:
                    type: object
                    additionalProperties:
                      type: string
                    example:
                      email: email should not be empty
                  timestamp:
                    type: string
                    format: date-time
                    example: '2026-02-06T12:00:00.000Z'
                  path:
                    type: string
                    example: /api/v1/example
                required:
                  - success
                  - statusCode
                  - message
                  - errors
                  - timestamp
                  - path
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    example: false
                  statusCode:
                    type: integer
                    example: 429
                    default: 429
                  message:
                    type: string
                    example: Too Many Requests
                    default: Too Many Requests
                  timestamp:
                    type: string
                    format: date-time
                    example: '2026-02-06T12:00:00.000Z'
                  path:
                    type: string
                    example: /api/v1/example
                required:
                  - success
                  - statusCode
                  - message
                  - timestamp
                  - path
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                    example: false
                  statusCode:
                    type: integer
                    example: 500
                    default: 500
                  message:
                    type: string
                    example: Internal server error.
                    default: Internal server error.
                  timestamp:
                    type: string
                    format: date-time
                    example: '2026-02-06T12:00:00.000Z'
                  path:
                    type: string
                    example: /api/v1/example
                required:
                  - success
                  - statusCode
                  - message
                  - timestamp
                  - path
      security:
        - bearerAuth: []
components:
  parameters:
    CrmRecordIdPath:
      name: id
      required: true
      in: path
      description: >-
        Provider-native record id. This is the id as it appears in the source
        system (e.g. a HubSpot contact id, a Pipedrive deal id, a QuickBooks
        invoice id). Use the `remote_id` field returned by the list endpoint.
      schema:
        example: '12345'
        type: string
    ProviderQueryRequired:
      name: provider
      required: true
      in: query
      description: >-
        Provider slug identifying which connected provider to target (e.g.
        `hubspot`, `pipedrive`, `zoho-crm`, `quickbooks-online`, `xero`,
        `zoho-books`). Required — single-record operations always target a
        specific provider.
      schema:
        example: hubspot
        type: string
    XEndUserIdHeader:
      name: X-End-User-Id
      required: true
      in: header
      description: >-
        Identifier of the end user whose connected provider should be queried.
        This is the same `endUserId` you supplied when creating the connect
        token. Required on every CRM and accounting call.
      schema:
        example: user-001
        type: string
  schemas:
    AccountingInvoicePartial:
      type: object
      title: Invoice
      properties:
        type:
          type: string
          enum:
            - ACCOUNTS_RECEIVABLE
            - ACCOUNTS_PAYABLE
          example: ACCOUNTS_RECEIVABLE
          description: AR invoice or AP bill (no separate Bill resource exists).
        contact:
          type: string
          example: 019d04a5-contact-uuid-here
          description: UUID of the associated contact (customer for AR, vendor for AP).
        number:
          type: string
          example: INV-2026-0001
          description: >-
            Provider-native document number (invoice number, PO number, expense
            number, etc.).
        issue_date:
          type: string
          example: '2026-05-01'
          description: Date the document was issued (ISO 8601 date).
        due_date:
          type: string
          example: '2026-05-31'
          description: Date payment is due (ISO 8601 date).
        paid_on_date:
          type: string
          example: '2026-05-25'
          description: >-
            Date the document was paid in full (ISO 8601 date). `null` until
            paid.
        memo:
          type: string
          example: Net 30 — Q2 services
          description: >-
            Free-text memo / private note. May not be visible to the
            counterparty depending on the provider.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        employee:
          type: string
          example: 019d04a5-employee-uuid
          description: UUID of the associated employee.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        payment_term:
          type: string
          example: 019d04a5-term-uuid
          description: UUID of the associated payment term.
        total_discount:
          type: number
          example: 0
          description: Total discount applied to the document, in `currency`.
        sub_total:
          type: number
          example: 1500
          description: Document subtotal before tax and discount, in `currency`.
        status:
          type: string
          enum:
            - PAID
            - DRAFT
            - SUBMITTED
            - PARTIALLY_PAID
            - OPEN
            - VOID
          example: PAID
          description: >-
            Lifecycle status. One of `DRAFT`, `OPEN`, `SUBMITTED`,
            `PARTIALLY_PAID`, `PAID`, `VOID`. Mapped to the closest
            provider-native value.
        total_tax_amount:
          type: number
          example: 120
          description: Total tax amount on the document, in `currency`.
        total_amount:
          type: number
          example: 1620
          description: Document grand total (subtotal + tax − discount), in `currency`.
        balance:
          type: number
          example: 0
          description: >-
            Outstanding balance on the document, in `currency`. `0` when fully
            paid.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        accounting_period:
          type: string
          example: 019d04a5-period-uuid
          description: UUID of the accounting period this record belongs to.
        purchase_orders:
          type: array
          items:
            type: string
          example:
            - 019d04a5-po-uuid
          description: UUIDs of associated purchase orders.
        sales_orders:
          type: array
          items:
            type: string
          example:
            - 019d04a5-so-uuid
          description: UUIDs of associated sales orders.
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/AccountingInvoiceLineItem'
          description: Line items that make up the document.
        inclusive_of_tax:
          type: boolean
          example: false
          description: >-
            `true` when `total_amount` (and `unit_price` on line items) already
            include tax. `false` when tax is added on top.
        integration_params:
          type: object
          additionalProperties: true
          example:
            TxnTaxDetail:
              TotalTax: 120
          description: Provider-specific passthrough fields.
    AccountingContactPartial:
      type: object
      title: Contact
      properties:
        name:
          type: string
          example: Acme Inc.
          description: >-
            Display name of the contact (company name for businesses, full name
            for individuals).
        is_supplier:
          type: boolean
          example: true
          description: >-
            `true` when this contact is treated as a supplier/vendor (Accounts
            Payable counterparty).
        is_customer:
          type: boolean
          example: true
          description: >-
            `true` when this contact is treated as a customer (Accounts
            Receivable counterparty).
        email_address:
          type: string
          example: billing@acme.com
          description: Primary email address for the contact.
        tax_number:
          type: string
          example: 84-1234567
          description: >-
            Tax identification number (VAT/EIN/GSTIN/etc., depending on
            jurisdiction).
        status:
          type: string
          enum:
            - ACTIVE
            - ARCHIVED
          example: ACTIVE
          description: Lifecycle status. One of `ACTIVE`, `ARCHIVED`.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: UUID of the associated company.
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/AccountingAddress'
          description: Postal addresses associated with this record (billing, shipping, …).
        phone_numbers:
          type: array
          items:
            $ref: '#/components/schemas/AccountingPhoneNumber'
          description: Phone numbers associated with this record.
        integration_params:
          type: object
          additionalProperties: true
          example:
            CurrencyRef:
              value: USD
          description: Provider-specific passthrough fields.
    AccountingAccountPartial:
      type: object
      title: Account
      properties:
        name:
          type: string
          example: Operating Cash
          description: Display name of the GL account.
        description:
          type: string
          example: Primary checking account for daily ops
          description: Free-text description visible on the record.
        classification:
          type: string
          enum:
            - ASSET
            - EQUITY
            - EXPENSE
            - LIABILITY
            - REVENUE
          example: ASSET
          description: >-
            Coarse classification of the account (`ASSET`, `LIABILITY`,
            `EQUITY`, `INCOME`, `EXPENSE`). Equivalent to the top-level `type`
            on most providers.
        type:
          type: string
          example: Bank
          description: >-
            GL account type. One of `ASSET`, `LIABILITY`, `EQUITY`, `INCOME`,
            `EXPENSE`, `OTHER_INCOME`, `OTHER_EXPENSE`, `COST_OF_GOODS_SOLD`.
            Provider-specific subtypes are accepted via `remote_type`.
        account_type:
          type: string
          enum:
            - BANK
            - CREDIT_CARD
            - ACCOUNTS_PAYABLE
            - ACCOUNTS_RECEIVABLE
            - FIXED_ASSET
            - OTHER_ASSET
            - OTHER_CURRENT_ASSET
            - OTHER_EXPENSE
            - OTHER_INCOME
            - COST_OF_GOODS_SOLD
            - OTHER_CURRENT_LIABILITY
            - LONG_TERM_LIABILITY
            - NON_POSTING
          example: BANK
          description: >-
            Provider-native account type (e.g. `Bank`, `AccountsReceivable`,
            `CostOfGoodsSold`). More granular than `classification`.
        status:
          type: string
          enum:
            - ACTIVE
            - PENDING
            - INACTIVE
          example: INACTIVE
          description: Lifecycle status. One of `ACTIVE`, `INACTIVE`, `PENDING`.
        current_balance:
          type: number
          example: 12500.45
          description: Current balance on this account in `currency`.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        account_number:
          type: string
          example: '1010'
          description: Provider-native account number (chart-of-accounts code).
        parent_account:
          type: string
          example: 019d04a5-7c8f-7a44-b15a-2f8b3e8f1d2c
          description: UUID of the parent account (for hierarchical chart-of-accounts).
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        integration_params:
          type: object
          additionalProperties: true
          example:
            AccountType: Bank
            AccountSubType: Checking
          description: Provider-specific passthrough fields.
    AccountingPaymentPartial:
      type: object
      title: Payment
      properties:
        transaction_date:
          type: string
          example: '2026-05-11'
          description: Date the transaction occurred (ISO 8601 date).
        contact:
          type: string
          example: 019d04a5-contact-uuid
          description: UUID of the associated contact (customer for AR, vendor for AP).
        account:
          type: string
          example: 019d04a5-account-uuid
          description: UUID of the GL account this record posts to.
        payment_method:
          type: string
          example: 019d04a5-payment-method-uuid
          description: UUID of the payment method used.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        total_amount:
          type: number
          example: 1700
          description: Document grand total (subtotal + tax − discount), in `currency`.
        type:
          type: string
          enum:
            - ACCOUNTS_PAYABLE
            - ACCOUNTS_RECEIVABLE
          example: ACCOUNTS_RECEIVABLE
          description: >-
            Direction of money flow. `ACCOUNTS_RECEIVABLE` for customer payments
            received, `ACCOUNTS_PAYABLE` for vendor payments sent.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        accounting_period:
          type: string
          example: 019d04a5-period-uuid
          description: UUID of the accounting period this record belongs to.
        applied_to_lines:
          type: array
          items:
            $ref: '#/components/schemas/AccountingPaymentLineItem'
          description: >-
            Allocations describing how this payment is split across
            invoices/bills.
        integration_params:
          type: object
          additionalProperties: true
          example:
            ProcessPayment: false
          description: Provider-specific passthrough fields.
    AccountingTaxRatePartial:
      type: object
      title: Tax Rate
      properties:
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        code:
          type: string
          example: CA-SALES
          description: Provider-native short code/identifier.
        name:
          type: string
          example: California Sales Tax
          description: Human-readable name of the record.
        description:
          type: string
          example: Combined state + county rate for California
          description: Free-text description visible on the record.
        status:
          type: string
          enum:
            - ACTIVE
            - ARCHIVED
          example: ACTIVE
          description: >-
            Lifecycle status of the record. Mapped to the closest
            provider-native value.
        country:
          type: string
          example: US
          description: ISO 3166-1 alpha-2 country code.
        total_tax_rate:
          type: number
          example: 7.25
          description: Total effective rate as a percentage.
        effective_tax_rate:
          type: number
          example: 7.25
          description: Effective combined rate after compounding, when applicable.
        tax_components:
          type: array
          items:
            $ref: '#/components/schemas/AccountingTaxComponent'
          description: >-
            Tax components that make up this combined rate. Used when a single
            tax rate is composed of multiple sub-taxes (e.g. state + city, GST +
            PST).
        integration_params:
          type: object
          additionalProperties: true
          example: {}
          description: Provider-specific passthrough fields.
    AccountingJournalEntryPartial:
      type: object
      title: Journal Entry
      properties:
        transaction_date:
          type: string
          example: '2026-05-11'
          description: Date the journal posting takes effect (ISO 8601 date).
        payments:
          type: array
          items:
            type: string
          example:
            - 019d04a5-payment-uuid
          description: UUIDs of payments applied to this document.
        applied_payments:
          type: array
          items:
            type: string
          example:
            - 019d04a5-applied-payment-uuid
          description: >-
            UUIDs of payment-line allocations that link payments to this
            document.
        memo:
          type: string
          example: Month-end accruals
          description: >-
            Free-text journal memo. Required by some providers (e.g.
            QuickBooks).
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        inclusive_of_tax:
          type: boolean
          example: false
          description: >-
            `true` when `total_amount` (and `unit_price` on line items) already
            include tax. `false` when tax is added on top.
        lines:
          type: array
          items:
            $ref: '#/components/schemas/AccountingJournalLine'
          description: Debit + credit legs. Total of all lines must net to zero.
        journal_number:
          type: string
          example: JE-2026-0001
          description: Provider-native journal entry number.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        posting_status:
          type: string
          enum:
            - UNPOSTED
            - POSTED
          example: POSTED
          description: Posting status of the entry. One of `NOT_POSTED`, `POSTED`.
        accounting_period:
          type: string
          example: 019d04a5-period-uuid
          description: UUID of the accounting period this record belongs to.
        integration_params:
          type: object
          additionalProperties: true
          example:
            Adjustment: false
          description: Provider-specific passthrough fields.
    AccountingExpensePartial:
      type: object
      title: Expense
      properties:
        transaction_date:
          type: string
          example: '2026-05-11'
          description: Date the expense was incurred (ISO 8601 date).
        account:
          type: string
          example: 019d04a5-account-uuid
          description: UUID of the bank / credit-card account that paid for the expense.
        contact:
          type: string
          example: 019d04a5-contact-uuid
          description: UUID of the associated contact (customer for AR, vendor for AP).
        total_amount:
          type: number
          example: 50
          description: Document grand total (subtotal + tax − discount), in `currency`.
        sub_total:
          type: number
          example: 50
          description: Document subtotal before tax and discount, in `currency`.
        total_tax_amount:
          type: number
          example: 0
          description: Total tax amount on the document, in `currency`.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        inclusive_of_tax:
          type: boolean
          example: false
          description: >-
            `true` when `total_amount` (and `unit_price` on line items) already
            include tax. `false` when tax is added on top.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        employee:
          type: string
          example: 019d04a5-employee-uuid
          description: UUID of the associated employee.
        memo:
          type: string
          example: May office supplies
          description: Free-text expense memo.
        lines:
          type: array
          items:
            $ref: '#/components/schemas/AccountingExpenseLine'
          description: >-
            Double-entry lines on this transaction. Must balance: ∑debits ==
            ∑credits.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        accounting_period:
          type: string
          example: 019d04a5-period-uuid
          description: UUID of the accounting period this record belongs to.
        integration_params:
          type: object
          additionalProperties: true
          example:
            PaymentType: Cash
          description: Provider-specific passthrough fields.
    AccountingPurchaseOrderPartial:
      type: object
      title: Purchase Order
      properties:
        status:
          type: string
          enum:
            - DRAFT
            - SUBMITTED
            - AUTHORIZED
            - BILLED
            - DELETED
          example: SUBMITTED
          description: >-
            Lifecycle status. One of `DRAFT`, `SUBMITTED`, `AUTHORIZED`,
            `BILLED`, `DELETED`.
        issue_date:
          type: string
          example: '2026-05-11'
          description: Date the document was issued (ISO 8601 date).
        purchase_order_number:
          type: string
          example: PO-2026-0001
          description: Provider-native purchase order number.
        delivery_date:
          type: string
          example: '2026-06-10'
          description: Expected delivery date (ISO 8601 date).
        delivery_address:
          type: string
          example: 350 5th Ave, New York, NY 10118
          description: UUID of the delivery address used.
        customer:
          type: string
          example: 019d04a5-customer-uuid
          description: >-
            UUID of the customer this PO is on behalf of (used when the PO is
            generated from a sales order).
        vendor:
          type: string
          example: 019d04a5-vendor-uuid
          description: UUID of the vendor / supplier.
        memo:
          type: string
          example: Standing order — Q2
          description: Free-text PO memo.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        total_amount:
          type: number
          example: 1080
          description: Document grand total (subtotal + tax − discount), in `currency`.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        payment_term:
          type: string
          example: 019d04a5-term-uuid
          description: UUID of the associated payment term.
        accounts_payable_account:
          type: string
          example: 019d04a5-ap-account-uuid
          description: >-
            Accounts Payable account UUID where the resulting liability is
            tracked. Required by some providers (e.g. QBO) when the vendor
            doesn't have a default A/P account configured.
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/AccountingPurchaseOrderLineItem'
          description: Line items that make up the document.
        inclusive_of_tax:
          type: boolean
          example: false
          description: >-
            `true` when `total_amount` (and `unit_price` on line items) already
            include tax. `false` when tax is added on top.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        accounting_period:
          type: string
          example: 019d04a5-period-uuid
          description: UUID of the accounting period this record belongs to.
        integration_params:
          type: object
          additionalProperties: true
          example:
            GlobalTaxCalculation: NotApplicable
          description: Provider-specific passthrough fields.
    AccountingSalesOrderPartial:
      type: object
      title: Sales Order
      properties:
        contact:
          type: string
          example: 019d04a5-contact-uuid
          description: UUID of the associated contact (customer for AR, vendor for AP).
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        status:
          type: string
          enum:
            - DRAFT
            - PENDING_APPROVAL
            - OPEN
            - PARTIALLY_COMPLETED
            - COMPLETED
            - CLOSED
          example: OPEN
          description: Lifecycle status. One of `OPEN`, `CLOSED`, `CANCELLED`.
        payment_term:
          type: string
          example: 019d04a5-term-uuid
          description: UUID of the associated payment term.
        memo:
          type: string
          example: Confirm shipping address before fulfilling
          description: >-
            Free-text memo / private note. May not be visible to the
            counterparty depending on the provider.
        shipping_address:
          type: string
          example: 350 5th Ave, New York, NY 10118
          description: UUID of the shipping address used.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        issue_date:
          type: string
          example: '2026-05-11'
          description: Date the document was issued (ISO 8601 date).
        transaction_number:
          type: string
          example: SO-2026-0001
          description: Provider-native sales order / transaction number.
        total:
          type: number
          example: 1200
          description: Sales order grand total in `currency`.
        lines:
          type: array
          items:
            $ref: '#/components/schemas/AccountingSalesOrderLine'
          description: >-
            Double-entry lines on this transaction. Must balance: ∑debits ==
            ∑credits.
        integration_params:
          type: object
          additionalProperties: true
          example:
            GlobalTaxCalculation: NotApplicable
          description: Provider-specific passthrough fields.
    AccountingCreditNotePartial:
      type: object
      title: Credit Note
      properties:
        transaction_date:
          type: string
          example: '2026-05-11'
          description: Date the transaction occurred (ISO 8601 date).
        status:
          type: string
          enum:
            - SUBMITTED
            - AUTHORIZED
            - PAID
          example: AUTHORIZED
          description: Lifecycle status. One of `OPEN`, `APPLIED`, `VOID`.
        number:
          type: string
          example: CN-2026-0001
          description: >-
            Provider-native document number (invoice number, PO number, expense
            number, etc.).
        contact:
          type: string
          example: 019d04a5-contact-uuid
          description: UUID of the customer being credited.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        total_amount:
          type: number
          example: 300
          description: Document grand total (subtotal + tax − discount), in `currency`.
        remaining_credit:
          type: number
          example: 300
          description: Unapplied credit available to future invoices.
        inclusive_of_tax:
          type: boolean
          example: false
          description: >-
            `true` when `total_amount` (and `unit_price` on line items) already
            include tax. `false` when tax is added on top.
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/AccountingCreditNoteLineItem'
          description: Line items that make up the document.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        payments:
          type: array
          items:
            type: string
          example:
            - 019d04a5-payment-uuid
          description: UUIDs of payments applied to this document.
        applied_payments:
          type: array
          items:
            type: string
          example:
            - 019d04a5-applied-payment-uuid
          description: >-
            UUIDs of payment-line allocations that link payments to this
            document.
        accounting_period:
          type: string
          example: 019d04a5-period-uuid
          description: UUID of the accounting period this record belongs to.
        integration_params:
          type: object
          additionalProperties: true
          example:
            TxnTaxDetail:
              TotalTax: 0
          description: Provider-specific passthrough fields.
    AccountingVendorCreditPartial:
      type: object
      title: Vendor Credit
      properties:
        number:
          type: string
          example: VC-2026-0001
          description: >-
            Provider-native document number (invoice number, PO number, expense
            number, etc.).
        transaction_date:
          type: string
          example: '2026-05-11'
          description: Date the transaction occurred (ISO 8601 date).
        vendor:
          type: string
          example: 019d04a5-vendor-uuid
          description: UUID of the vendor issuing the credit.
        total_amount:
          type: number
          example: 100
          description: Document grand total (subtotal + tax − discount), in `currency`.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        inclusive_of_tax:
          type: boolean
          example: false
          description: >-
            `true` when `total_amount` (and `unit_price` on line items) already
            include tax. `false` when tax is added on top.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        accounts_payable_account:
          type: string
          example: 019d04a5-ap-account-uuid
          description: >-
            Accounts Payable account UUID where the credit reduces a liability.
            Required by some providers (e.g. QBO) when the vendor doesn't have a
            default A/P account configured.
        lines:
          type: array
          items:
            $ref: '#/components/schemas/AccountingVendorCreditLine'
          description: >-
            Double-entry lines on this transaction. Must balance: ∑debits ==
            ∑credits.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        accounting_period:
          type: string
          example: 019d04a5-period-uuid
          description: UUID of the accounting period this record belongs to.
        integration_params:
          type: object
          additionalProperties: true
          example:
            GlobalTaxCalculation: NotApplicable
          description: Provider-specific passthrough fields.
    AccountingCompanyInfoPartial:
      type: object
      title: Company Info
      properties:
        name:
          type: string
          example: Acme Software
          description: Human-readable name of the record.
        legal_name:
          type: string
          example: Acme Software, Inc.
          description: Legal entity name as registered.
        tax_number:
          type: string
          example: 84-1234567
          description: >-
            Tax identification number (VAT/EIN/GSTIN/etc., depending on
            jurisdiction).
        fiscal_year_end_month:
          type: number
          example: 12
          description: Month (1-12) where the fiscal year ends.
        fiscal_year_end_day:
          type: number
          example: 31
          description: Day-of-month (1-31) where the fiscal year ends.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        urls:
          type: array
          items:
            type: string
          example:
            - https://acme.com
          description: >-
            List of public URLs associated with the company (website, social
            profiles, etc.).
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/AccountingAddress'
          description: Postal addresses associated with this record (billing, shipping, …).
        phone_numbers:
          type: array
          items:
            $ref: '#/components/schemas/AccountingPhoneNumber'
          description: Phone numbers associated with this record.
        integration_params:
          type: object
          additionalProperties: true
          example:
            CompanyStartDate: '2020-01-01'
          description: Provider-specific passthrough fields.
    AccountingItemPartial:
      type: object
      title: Item
      properties:
        name:
          type: string
          example: Consulting Services
          description: Human-readable name of the record.
        status:
          type: string
          enum:
            - ACTIVE
            - ARCHIVED
          example: ACTIVE
          description: Lifecycle status. One of `ACTIVE`, `ARCHIVED`.
        type:
          type: string
          enum:
            - INVENTORY
            - NON_INVENTORY
            - SERVICE
            - UNKNOWN
          example: SERVICE
          description: Item type. One of `INVENTORY`, `NON_INVENTORY`, `SERVICE`, `BUNDLE`.
        unit_price:
          type: number
          example: 150
          description: Sales unit price.
        purchase_price:
          type: number
          example: 100
          description: Default purchase cost used on bills / purchase orders.
        purchase_account:
          type: string
          example: 019d04a5-7c8f-7a44-b15a-2f8b3e8f1d2c
          description: UUID of the expense account used when the item is purchased.
        sales_account:
          type: string
          example: 019d04a5-7c8f-7a44-b15a-3a9c4f9e2e3d
          description: UUID of the income account credited when the item is sold.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        purchase_tax_rate:
          type: string
          example: 019d04a5-tax-purch-uuid-here
          description: UUID of the default tax rate applied when purchasing this item.
        sales_tax_rate:
          type: string
          example: 019d04a5-tax-sales-uuid-here
          description: UUID of the default tax rate applied when selling this item.
        integration_params:
          type: object
          additionalProperties: true
          example:
            Type: Service
          description: Provider-specific passthrough fields.
    AccountingTrackingCategoryPartial:
      type: object
      title: Tracking Category
      properties:
        name:
          type: string
          example: US-West
          description: >-
            Display name of the tracking category (e.g. `West Coast`,
            `Engineering`, `Project Apollo`).
        status:
          type: string
          enum:
            - ACTIVE
            - ARCHIVED
          example: ACTIVE
          description: Lifecycle status. One of `ACTIVE`, `ARCHIVED`.
        category_type:
          type: string
          enum:
            - CLASS
            - DEPARTMENT
          example: CLASS
          description: >-
            Tracking dimension. QBO splits these into separate entities (Class
            vs Department).
        parent_category:
          type: string
          example: 019d04a5-parent-tracking-uuid
          description: UUID of the parent tracking category if hierarchical.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        integration_params:
          type: object
          additionalProperties: true
          example: {}
          description: Provider-specific passthrough fields.
    AccountingPeriodPartial:
      type: object
      title: Accounting Period
      properties:
        name:
          type: string
          example: FY2026 Q1
          description: >-
            Display name of the accounting period (e.g. `Q1 2026`, `April
            2026`).
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          example: ACTIVE
          description: Period status. One of `OPEN`, `CLOSED`.
        start_date:
          type: string
          example: '2026-01-01'
          description: Start date (ISO 8601 date).
        end_date:
          type: string
          example: '2026-03-31'
          description: End date (ISO 8601 date).
        integration_params:
          type: object
          additionalProperties: true
          example: {}
          description: Provider-specific passthrough fields.
    AccountingPaymentMethodPartial:
      type: object
      title: Payment Method
      properties:
        method_type:
          type: string
          enum:
            - CREDIT_CARD
            - DEBIT_CARD
            - ACH
            - CASH
            - CHECK
          example: CASH
          description: >-
            Provider-native subtype of the payment method (e.g. `Visa`,
            `Mastercard`, `ACH_DEBIT`).
        name:
          type: string
          example: Cash
          description: >-
            Display name of the payment method (e.g. `Visa ****1234`, `ACH —
            Chase Operating`).
        is_active:
          type: boolean
          example: true
          description: '`true` when the record is active in the source provider.'
        integration_params:
          type: object
          additionalProperties: true
          example: {}
          description: Provider-specific passthrough fields.
    AccountingPaymentTermPartial:
      type: object
      title: Payment Term
      properties:
        name:
          type: string
          example: Net 30
          description: Display name of the payment term (e.g. `Net 30`, `Due on receipt`).
        is_active:
          type: boolean
          example: true
          description: '`true` when the record is active in the source provider.'
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        days_until_due:
          type: number
          example: 30
          description: Days from issue date until payment is due (Standard term mode).
        discount_days:
          type: number
          example: 10
          description: Days within which an early-payment discount applies.
        integration_params:
          type: object
          additionalProperties: true
          example: {}
          description: Provider-specific passthrough fields.
    AccountingAttachmentPartial:
      type: object
      title: Attachment (metadata-only update body)
      description: >-
        Metadata-only Update/Patch body for `PUT|PATCH
        /accounting/attachment/{id}`. Providers like Xero don't allow replacing
        a file's binary content — to replace, DELETE the file and POST a new
        one. Multipart bodies on these endpoints return 405.
      properties:
        file_name:
          type: string
          example: team-lunch-receipt-v2.pdf
          description: Rename the attachment.
        folder_id:
          type: string
          example: 019d04a5-folder-uuid
          description: >-
            Move the attachment into a different folder (Xero Files folders, QBO
            file groups, etc. — provider semantics vary).
        integration_params:
          type: object
          additionalProperties: true
          description: >-
            Provider-specific passthrough fields written directly to the
            upstream provider. Use sparingly — keys here are not validated by
            RouteMCP.
    AccountingEmployeePartial:
      type: object
      title: Employee
      properties:
        first_name:
          type: string
          example: Gil
          description: Given name of the employee.
        last_name:
          type: string
          example: Feig
          description: Family name of the employee.
        email_address:
          type: string
          example: gil@routemcp.io
          description: Work email address.
        employee_number:
          type: string
          example: E-1001
          description: Provider-native employee number / payroll id.
        is_contractor:
          type: boolean
          example: false
          description: >-
            `true` when the employee is treated as a contractor (1099 in the
            US).
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          example: ACTIVE
          description: Employment status. One of `ACTIVE`, `INACTIVE`, `TERMINATED`.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        integration_params:
          type: object
          additionalProperties: true
          description: >-
            Provider-specific passthrough fields written directly to the
            upstream provider. Use sparingly — keys here are not validated by
            RouteMCP.
    AccountingExpenseReportPartial:
      type: object
      title: Expense Report
      properties:
        report_date:
          type: string
          example: '2026-04-22'
          description: Date the report was filed (ISO 8601 date).
        report_identifier:
          type: string
          example: ER-2026-001
          description: Provider-native report number / identifier.
        employee:
          type: string
          example: 019d04a5-employee-uuid
          description: UUID of the associated employee.
        status:
          type: string
          enum:
            - DRAFT
            - SUBMITTED
            - APPROVED
            - REJECTED
          example: APPROVED
          description: >-
            Lifecycle status. One of `DRAFT`, `SUBMITTED`, `APPROVED`,
            `REIMBURSED`, `REJECTED`.
        total_amount:
          type: number
          example: 235.5
          description: Document grand total (subtotal + tax − discount), in `currency`.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        description:
          type: string
          example: Q2 kickoff travel & meals
          description: Free-text description visible on the record.
        accounting_period:
          type: string
          example: 019d04a5-period-uuid
          description: UUID of the accounting period this record belongs to.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        tracking_categories:
          type: array
          items:
            type: string
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        lines:
          type: array
          items:
            $ref: '#/components/schemas/AccountingExpenseReportLine'
          description: >-
            Double-entry lines on this transaction. Must balance: ∑debits ==
            ∑credits.
        integration_params:
          type: object
          additionalProperties: true
          description: >-
            Provider-specific passthrough fields written directly to the
            upstream provider. Use sparingly — keys here are not validated by
            RouteMCP.
    AccountingItemFulfillmentPartial:
      type: object
      title: Item Fulfillment
      properties:
        sales_order:
          type: string
          example: 019d04a5-so-uuid
          description: UUID of the sales order being fulfilled.
        fulfillment_date:
          type: string
          example: '2026-04-15'
          description: Date the items were fulfilled (ISO 8601 date).
        customer:
          type: string
          example: 019d04a5-customer-uuid
          description: UUID of the customer this fulfillment is for.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        status:
          type: string
          enum:
            - DRAFT
            - IN_PROGRESS
            - SHIPPED
            - CANCELLED
          example: SHIPPED
          description: >-
            Lifecycle status. One of `PENDING`, `SHIPPED`, `DELIVERED`,
            `CANCELLED`.
        memo:
          type: string
          example: Shipped via UPS Ground
          description: >-
            Free-text memo / private note. May not be visible to the
            counterparty depending on the provider.
        lines:
          type: array
          items:
            $ref: '#/components/schemas/AccountingItemFulfillmentLine'
          description: >-
            Double-entry lines on this transaction. Must balance: ∑debits ==
            ∑credits.
        integration_params:
          type: object
          additionalProperties: true
          description: >-
            Provider-specific passthrough fields written directly to the
            upstream provider. Use sparingly — keys here are not validated by
            RouteMCP.
    AccountingProjectPartial:
      type: object
      title: Project
      properties:
        name:
          type: string
          example: Acme Website Redesign
          description: Display name of the project.
        is_active:
          type: boolean
          example: false
          description: '`true` when the record is active in the source provider.'
        contact:
          type: string
          example: 019d04a5-customer-uuid
          description: UUID of the associated contact (customer for AR, vendor for AP).
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        integration_params:
          type: object
          additionalProperties: true
          description: >-
            Provider-specific passthrough fields written directly to the
            upstream provider. Use sparingly — keys here are not validated by
            RouteMCP.
    UpdateAccountingResourceResponse:
      type: object
      title: UpdateAccountingResourceResponse
      description: >-
        Standard envelope returned by `PUT /accounting/{resource}/{id}` and
        `PATCH /accounting/{resource}/{id}`. Contains the record as it exists
        after the write. The shape of `data` depends on the `{resource}` path
        parameter — see the tabs to switch between resource variants.
      properties:
        success:
          type: boolean
          example: true
          description: Always `true` for successful (2xx) responses.
        statusCode:
          type: integer
          example: 200
          description: HTTP status code mirrored inside the envelope.
        message:
          type: string
          example: OK
        data:
          $ref: '#/components/schemas/UpdatableAccountingResource'
      required:
        - success
        - statusCode
        - message
        - data
    AccountingInvoiceLineItem:
      type: object
      title: Invoice Line Item
      properties:
        description:
          type: string
          example: Q2 retainer — strategy consulting
          description: Free-text description visible on the record.
        unit_price:
          type: number
          example: 150
          description: >-
            Unit price for the line in `currency`. Stringified decimal on some
            providers.
        quantity:
          type: number
          example: 10
          description: Quantity for the line.
        total_amount:
          type: number
          example: 1500
          description: Document grand total (subtotal + tax − discount), in `currency`.
        employee:
          type: string
          example: 019d04a5-employee-uuid
          description: UUID of the associated employee.
        project:
          type: string
          example: 019d04a5-project-uuid
          description: UUID of the associated project.
        contact:
          type: string
          example: 019d04a5-contact-uuid
          description: UUID of the associated contact (customer for AR, vendor for AP).
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        item:
          type: string
          example: 019d04a5-item-uuid
          description: UUID of the associated item (product/service).
        account:
          type: string
          example: 019d04a5-account-uuid
          description: UUID of the GL account this record posts to.
        tax_rate:
          type: string
          example: 019d04a5-tax-rate-uuid
          description: UUID of the tax rate applied to this line.
        tracking_category:
          type: string
          example: 019d04a5-tracking-uuid
          description: >-
            UUID of the tracking category (class / location / department)
            attached to this line.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
            - 019d04a5-dept-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        is_billable:
          type: boolean
          example: true
          description: '`true` when this line is billable to the contact.'
    AccountingAddress:
      type: object
      properties:
        type:
          type: string
          example: BILLING
          enum:
            - BILLING
            - SHIPPING
          description: Address category. One of `BILLING`, `SHIPPING`.
        street_1:
          type: string
          example: 50 Bowling Green Dr
          description: First line of the street address.
        street_2:
          type: string
          example: Golden Gate Park
          description: Second line of the street address (apartment, suite, unit, etc.).
        city:
          type: string
          example: San Francisco
          description: City / locality.
        state:
          type: string
          example: California
          description: >-
            State, province, or region (ISO 3166-2 code where supported). Some
            providers use `country_subdivision` instead.
        country_subdivision:
          type: string
          example: CA
          description: State, province, or region (ISO 3166-2 code where supported).
        country:
          type: string
          example: US
          description: ISO 3166-1 alpha-2 country code.
        zip_code:
          type: string
          example: '94122'
          description: Postal / ZIP code.
    AccountingPhoneNumber:
      type: object
      properties:
        number:
          type: string
          example: '+13785579223'
          description: >-
            Provider-native document number (invoice number, PO number, expense
            number, etc.).
        type:
          type: string
          example: Mobile
          description: Record type. Mapped to the closest provider-native value.
    AccountingPaymentLineItem:
      type: object
      title: Payment Line Item
      properties:
        applied_amount:
          type: string
          example: '100.00'
          description: Amount applied to this allocation, in `currency`.
        applied_date:
          type: string
          example: '2026-05-11'
          description: Date the payment was applied to the target document (ISO 8601 date).
        related_object_id:
          type: string
          example: 019d04a5-invoice-uuid
          description: UUID of the related Invoice / JournalEntry / CreditNote.
        related_object_type:
          type: string
          enum:
            - INVOICE
            - JOURNAL_ENTRY
            - CREDIT_NOTE
          example: INVOICE
          description: >-
            Type of the parent record this attachment is linked to (e.g.
            `invoice`, `expense`, `contact`).
    AccountingTaxComponent:
      type: object
      title: Tax Component
      properties:
        name:
          type: string
          example: State Sales Tax
          description: Display name of the tax component.
        rate:
          type: string
          example: '7.25'
          description: Stringified decimal rate for this component as a percentage.
        is_compound:
          type: boolean
          example: false
          description: Whether this component is calculated on top of others.
        component_type:
          type: string
          enum:
            - SALES
            - PURCHASE
          example: SALES
          description: >-
            Provider-native classification of the component (e.g. `STATE`,
            `CITY`, `COUNTY`).
    AccountingJournalLine:
      type: object
      title: Journal Line
      properties:
        account:
          type: string
          example: 019d04a5-account-uuid
          description: UUID of the account this leg posts to.
        net_amount:
          type: number
          example: 100
          description: >-
            Signed amount — positive for a debit, negative for a credit on the
            canonical side.
        tracking_category:
          type: string
          example: 019d04a5-tracking-uuid
          description: UUID of the tracking category attached to this line.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        employee:
          type: string
          example: 019d04a5-employee-uuid
          description: UUID of the associated employee.
        project:
          type: string
          example: 019d04a5-project-uuid
          description: UUID of the associated project.
        contact:
          type: string
          example: 019d04a5-contact-uuid
          description: UUID of the associated contact (customer for AR, vendor for AP).
        tax_rate:
          type: string
          example: 019d04a5-tax-rate-uuid
          description: UUID of the tax rate applied.
        description:
          type: string
          example: Q2 accrual adjustment
          description: Free-text line description.
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
    AccountingExpenseLine:
      type: object
      title: Expense Line
      properties:
        item:
          type: string
          example: 019d04a5-item-uuid
          description: UUID of the associated item (product/service).
        net_amount:
          type: number
          example: 50
          description: Line amount net of tax, in `currency`.
        tracking_category:
          type: string
          example: 019d04a5-tracking-uuid
          description: UUID of the tracking category attached to this line.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        employee:
          type: string
          example: 019d04a5-employee-uuid
          description: UUID of the associated employee.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        account:
          type: string
          example: 019d04a5-account-uuid
          description: UUID of the expense account this line books to.
        contact:
          type: string
          example: 019d04a5-contact-uuid
          description: UUID of the associated contact (customer for AR, vendor for AP).
        project:
          type: string
          example: 019d04a5-project-uuid
          description: UUID of the associated project.
        description:
          type: string
          example: Office supplies — May
          description: Free-text description visible on the record.
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        tax_rate:
          type: string
          example: 019d04a5-tax-rate-uuid
          description: UUID of the tax rate applied.
        quantity:
          type: string
          example: '1'
          description: Quantity for the line.
        unit_price:
          type: string
          example: '50'
          description: >-
            Unit price for the line in `currency`. Stringified decimal on some
            providers.
    AccountingPurchaseOrderLineItem:
      type: object
      title: Purchase Order Line Item
      properties:
        description:
          type: string
          example: Office chairs — ergonomic
          description: Free-text description visible on the record.
        unit_price:
          type: number
          example: 200
          description: >-
            Unit price for the line in `currency`. Stringified decimal on some
            providers.
        quantity:
          type: number
          example: 5
          description: Quantity for the line.
        item:
          type: string
          example: 019d04a5-item-uuid
          description: UUID of the associated item (product/service).
        account:
          type: string
          example: 019d04a5-account-uuid
          description: UUID of the GL account this record posts to.
        tracking_category:
          type: string
          example: 019d04a5-tracking-uuid
          description: UUID of the tracking category attached to this line.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        tax_amount:
          type: string
          example: '80.00'
          description: Tax amount on this line, in `currency`.
        total_line_amount:
          type: string
          example: '1080.00'
          description: >-
            Total amount for this line (quantity × unit_price ± discount/tax),
            in `currency`.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        tax_rate:
          type: string
          example: 019d04a5-tax-rate-uuid
          description: UUID of the tax rate applied.
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
    AccountingSalesOrderLine:
      type: object
      title: Sales Order Line
      properties:
        description:
          type: string
          example: Annual support — Tier 2
          description: Free-text description visible on the record.
        unit_price:
          type: string
          example: '1200'
          description: >-
            Unit price for the line in `currency`. Stringified decimal on some
            providers.
        quantity:
          type: string
          example: '1'
          description: Quantity for the line.
        item:
          type: string
          example: 019d04a5-item-uuid
          description: UUID of the associated item (product/service).
        tax_rate:
          type: string
          example: 019d04a5-tax-rate-uuid
          description: UUID of the tax rate applied.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
    AccountingCreditNoteLineItem:
      type: object
      title: Credit Note Line Item
      properties:
        item:
          type: string
          example: 019d04a5-item-uuid
          description: UUID of the associated item (product/service).
        name:
          type: string
          example: Consulting Services
          description: Human-readable name of the record.
        description:
          type: string
          example: Refund — overbilled hours
          description: Free-text description visible on the record.
        quantity:
          type: string
          example: '2'
          description: Quantity for the line.
        memo:
          type: string
          example: Issued against invoice INV-2026-0001
          description: >-
            Free-text memo / private note. May not be visible to the
            counterparty depending on the provider.
        unit_price:
          type: string
          example: '150.00'
          description: >-
            Unit price for the line in `currency`. Stringified decimal on some
            providers.
        tax_rate:
          type: string
          example: 019d04a5-tax-rate-uuid
          description: UUID of the tax rate applied.
        total_line_amount:
          type: string
          example: '300.00'
          description: >-
            Total amount for this line (quantity × unit_price ± discount/tax),
            in `currency`.
        tracking_category:
          type: string
          example: 019d04a5-tracking-uuid
          description: UUID of the tracking category attached to this line.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        account:
          type: string
          example: 019d04a5-account-uuid
          description: UUID of the GL account this record posts to.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        contact:
          type: string
          example: 019d04a5-contact-uuid
          description: UUID of the associated contact (customer for AR, vendor for AP).
        project:
          type: string
          example: 019d04a5-project-uuid
          description: UUID of the associated project.
    AccountingVendorCreditLine:
      type: object
      title: Vendor Credit Line
      properties:
        net_amount:
          type: number
          example: 100
          description: Line amount net of tax, in `currency`.
        tracking_category:
          type: string
          example: 019d04a5-tracking-uuid
          description: UUID of the tracking category attached to this line.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        description:
          type: string
          example: Refund — defective goods
          description: Free-text description visible on the record.
        account:
          type: string
          example: 019d04a5-account-uuid
          description: UUID of the account this line books to.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        project:
          type: string
          example: 019d04a5-project-uuid
          description: UUID of the associated project.
        contact:
          type: string
          example: 019d04a5-contact-uuid
          description: UUID of the associated contact (customer for AR, vendor for AP).
        tax_rate:
          type: string
          example: 019d04a5-tax-rate-uuid
          description: UUID of the tax rate applied.
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
    AccountingExpenseReportLine:
      type: object
      properties:
        account:
          type: string
          example: 019d04a5-account-uuid
          description: UUID of the GL account this expense line books to.
        description:
          type: string
          example: Team lunch — Q2 kickoff
          description: Free-text description visible on the record.
        expense_date:
          type: string
          example: '2026-04-22'
          description: ISO date the expense was incurred.
        amount:
          type: number
          example: 235.5
          description: Total line amount (after tax).
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        is_billable:
          type: boolean
          example: false
          description: '`true` when this line is billable to the contact.'
        tracking_categories:
          type: array
          items:
            type: string
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        employee:
          type: string
          example: 019d04a5-employee-uuid
          description: UUID of the associated employee.
        project:
          type: string
          example: 019d04a5-project-uuid
          description: UUID of the associated project.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        contact:
          type: string
          example: 019d04a5-contact-uuid
          description: UUID of the associated contact (customer for AR, vendor for AP).
        quantity:
          type: number
          example: 1
          description: Quantity for the line.
        unit_price:
          type: number
          example: 235.5
          description: >-
            Unit price for the line in `currency`. Stringified decimal on some
            providers.
        non_reimbursable:
          type: boolean
          example: false
          description: >-
            True when the line was paid via company card and shouldn't be
            reimbursed to the employee.
        tax_amount:
          type: number
          example: 15.5
          description: Tax amount on this line, in `currency`.
        inclusive_of_tax:
          type: boolean
          example: false
          description: >-
            `true` when `total_amount` (and `unit_price` on line items) already
            include tax. `false` when tax is added on top.
        tax_rate:
          type: string
          example: 019d04a5-tax-rate-uuid
          description: UUID of the tax rate applied.
    AccountingItemFulfillmentLine:
      type: object
      properties:
        item:
          type: string
          example: 019d04a5-item-uuid
          description: UUID of the item being fulfilled.
        sales_order_line:
          type: string
          example: 019d04a5-so-line-uuid
          description: UUID of the sales-order line this fulfillment line traces back to.
        quantity:
          type: string
          example: '1'
          description: Quantity being delivered (decimal string).
        tracking_categories:
          type: array
          items:
            type: string
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
    UpdatableAccountingResource:
      title: AccountingResource
      description: >-
        An accounting record returned after a full or partial update. The
        concrete shape depends on the `{resource}` path parameter — switch tabs
        to see each variant. Read-only resources (reports, bank feeds,
        general_ledger_transaction, address, phone_number, transaction) cannot
        be updated.
      oneOf:
        - $ref: '#/components/schemas/AccountingInvoiceItem'
        - $ref: '#/components/schemas/AccountingContactItem'
        - $ref: '#/components/schemas/AccountingAccountItem'
        - $ref: '#/components/schemas/AccountingPaymentItem'
        - $ref: '#/components/schemas/AccountingTaxRateItem'
        - $ref: '#/components/schemas/AccountingJournalEntryItem'
        - $ref: '#/components/schemas/AccountingExpenseItem'
        - $ref: '#/components/schemas/AccountingPurchaseOrderItem'
        - $ref: '#/components/schemas/AccountingSalesOrderItem'
        - $ref: '#/components/schemas/AccountingCreditNoteItem'
        - $ref: '#/components/schemas/AccountingVendorCreditItem'
        - $ref: '#/components/schemas/AccountingCompanyInfoItem'
        - $ref: '#/components/schemas/AccountingItemItem'
        - $ref: '#/components/schemas/AccountingTrackingCategoryItem'
        - $ref: '#/components/schemas/AccountingPeriodItem'
        - $ref: '#/components/schemas/AccountingPaymentMethodItem'
        - $ref: '#/components/schemas/AccountingPaymentTermItem'
        - $ref: '#/components/schemas/AccountingAttachmentItem'
        - $ref: '#/components/schemas/AccountingEmployeeItem'
        - $ref: '#/components/schemas/AccountingExpenseReportItem'
        - $ref: '#/components/schemas/AccountingItemFulfillmentItem'
        - $ref: '#/components/schemas/AccountingProjectItem'
    AccountingInvoiceItem:
      title: Invoice
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingInvoice'
    AccountingContactItem:
      title: Contact
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingContact'
    AccountingAccountItem:
      title: Account
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingAccount'
    AccountingPaymentItem:
      title: Payment
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingPayment'
    AccountingTaxRateItem:
      title: TaxRate
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingTaxRate'
    AccountingJournalEntryItem:
      title: JournalEntry
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingJournalEntry'
    AccountingExpenseItem:
      title: Expense
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingExpense'
    AccountingPurchaseOrderItem:
      title: PurchaseOrder
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingPurchaseOrder'
    AccountingSalesOrderItem:
      title: SalesOrder
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingSalesOrder'
    AccountingCreditNoteItem:
      title: CreditNote
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingCreditNote'
    AccountingVendorCreditItem:
      title: VendorCredit
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingVendorCredit'
    AccountingCompanyInfoItem:
      title: CompanyInfo
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingCompanyInfo'
    AccountingItemItem:
      title: Item
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingItem'
    AccountingTrackingCategoryItem:
      title: TrackingCategory
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingTrackingCategory'
    AccountingPeriodItem:
      title: Period
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingPeriod'
    AccountingPaymentMethodItem:
      title: PaymentMethod
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingPaymentMethod'
    AccountingPaymentTermItem:
      title: PaymentTerm
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingPaymentTerm'
    AccountingAttachmentItem:
      title: Attachment
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingAttachment'
    AccountingEmployeeItem:
      title: Employee
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingEmployee'
    AccountingExpenseReportItem:
      title: ExpenseReport
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingExpenseReport'
    AccountingItemFulfillmentItem:
      title: ItemFulfillment
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingItemFulfillment'
    AccountingProjectItem:
      title: Project
      type: object
      allOf:
        - $ref: '#/components/schemas/AccountingCommonResourceFields'
        - $ref: '#/components/schemas/AccountingProject'
    AccountingCommonResourceFields:
      type: object
      description: Fields present on every accounting resource returned by RouteMCP.
      properties:
        id:
          type: string
          example: urn:uuid:0958cbc6-6040-430a-848e-aafacbadf4ae
          description: >-
            Canonical RouteMCP identifier. URN-prefixed UUID for most records.
            For QuickBooks Online, AR/AP-aware resources (Invoice, Bill,
            Payment, BillPayment, Customer, Vendor) use a provider-discriminated
            URN (`urn:qbo:<entity>:<id>`).
        remote_id:
          type: string
          nullable: true
          example: EILBM0XYAR1
          description: Provider-native record id.
        created_at:
          type: string
          format: date-time
          nullable: true
          example: '2026-04-15T10:30:00.000Z'
          description: >-
            ISO-8601 timestamp of when the record was created in the provider
            system. `null` for on-demand reports.
        modified_at:
          type: string
          format: date-time
          nullable: true
          example: '2026-04-16T15:45:00.000Z'
          description: >-
            ISO-8601 timestamp of when the record was last updated in the
            provider system. `null` for on-demand reports.
        remote_was_deleted:
          type: boolean
          example: false
          description: '`true` when the upstream provider has soft-deleted the record.'
        providerSlug:
          type: string
          example: quickbooks-online
          description: >-
            Slug of the source provider (e.g. `quickbooks-online`, `xero`,
            `zoho-books`).
        providerId:
          type: string
          format: uuid
          example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
          description: >-
            Internal RouteMCP connection id linking the record to a specific
            tenant-provider connection.
    AccountingInvoice:
      type: object
      title: Invoice
      properties:
        type:
          type: string
          enum:
            - ACCOUNTS_RECEIVABLE
            - ACCOUNTS_PAYABLE
          example: ACCOUNTS_RECEIVABLE
          description: AR invoice or AP bill (no separate Bill resource exists).
        contact:
          type: string
          example: 019d04a5-contact-uuid-here
          description: UUID of the associated contact (customer for AR, vendor for AP).
        number:
          type: string
          example: INV-2026-0001
          description: >-
            Provider-native document number (invoice number, PO number, expense
            number, etc.).
        issue_date:
          type: string
          example: '2026-05-01'
          description: Date the document was issued (ISO 8601 date).
        due_date:
          type: string
          example: '2026-05-31'
          description: Date payment is due (ISO 8601 date).
        paid_on_date:
          type: string
          example: '2026-05-25'
          description: >-
            Date the document was paid in full (ISO 8601 date). `null` until
            paid.
        memo:
          type: string
          example: Net 30 — Q2 services
          description: >-
            Free-text memo / private note. May not be visible to the
            counterparty depending on the provider.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        employee:
          type: string
          example: 019d04a5-employee-uuid
          description: UUID of the associated employee.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        payment_term:
          type: string
          example: 019d04a5-term-uuid
          description: UUID of the associated payment term.
        total_discount:
          type: number
          example: 0
          description: Total discount applied to the document, in `currency`.
        sub_total:
          type: number
          example: 1500
          description: Document subtotal before tax and discount, in `currency`.
        status:
          type: string
          enum:
            - PAID
            - DRAFT
            - SUBMITTED
            - PARTIALLY_PAID
            - OPEN
            - VOID
          example: OPEN
          description: >-
            Lifecycle status. One of `DRAFT`, `OPEN`, `SUBMITTED`,
            `PARTIALLY_PAID`, `PAID`, `VOID`. Mapped to the closest
            provider-native value.
        total_tax_amount:
          type: number
          example: 120
          description: Total tax amount on the document, in `currency`.
        total_amount:
          type: number
          example: 1620
          description: Document grand total (subtotal + tax − discount), in `currency`.
        balance:
          type: number
          example: 1620
          description: Outstanding balance.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        accounting_period:
          type: string
          example: 019d04a5-period-uuid
          description: UUID of the accounting period this record belongs to.
        purchase_orders:
          type: array
          items:
            type: string
          example:
            - 019d04a5-po-uuid
          description: UUIDs of associated purchase orders.
        sales_orders:
          type: array
          items:
            type: string
          example:
            - 019d04a5-so-uuid
          description: UUIDs of associated sales orders.
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/AccountingInvoiceLineItem'
          description: Line items that make up the document.
        inclusive_of_tax:
          type: boolean
          example: false
          description: >-
            `true` when `total_amount` (and `unit_price` on line items) already
            include tax. `false` when tax is added on top.
        integration_params:
          type: object
          additionalProperties: true
          example:
            TxnTaxDetail:
              TotalTax: 120
          description: Provider-specific passthrough fields.
    AccountingContact:
      type: object
      title: Contact
      properties:
        name:
          type: string
          example: Acme Inc.
          description: >-
            Display name of the contact (company name for businesses, full name
            for individuals).
        is_supplier:
          type: boolean
          example: true
          description: Set true to create a supplier/vendor (AP side).
        is_customer:
          type: boolean
          example: true
          description: Set true to create a customer (AR side).
        email_address:
          type: string
          example: billing@acme.com
          description: Primary email address for the contact.
        tax_number:
          type: string
          example: 84-1234567
          description: Tax ID / EIN / VAT number depending on jurisdiction.
        status:
          type: string
          enum:
            - ACTIVE
            - ARCHIVED
          example: ACTIVE
          description: Lifecycle status. One of `ACTIVE`, `ARCHIVED`.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: UUID of the associated company.
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/AccountingAddress'
          description: Postal addresses associated with this record (billing, shipping, …).
        phone_numbers:
          type: array
          items:
            $ref: '#/components/schemas/AccountingPhoneNumber'
          description: Phone numbers associated with this record.
        integration_params:
          type: object
          additionalProperties: true
          example:
            CurrencyRef:
              value: USD
          description: Provider-specific passthrough fields.
    AccountingAccount:
      type: object
      title: Account
      properties:
        name:
          type: string
          example: Operating Cash
          description: Display name of the GL account.
        description:
          type: string
          example: Primary checking account for daily ops
          description: Free-text description visible on the record.
        classification:
          type: string
          enum:
            - ASSET
            - EQUITY
            - EXPENSE
            - LIABILITY
            - REVENUE
          example: ASSET
          description: >-
            Coarse classification of the account (`ASSET`, `LIABILITY`,
            `EQUITY`, `INCOME`, `EXPENSE`). Equivalent to the top-level `type`
            on most providers.
        type:
          type: string
          example: Bank
          description: >-
            Provider-native account type. Use `account_type` for the canonical
            normalization.
        account_type:
          type: string
          enum:
            - BANK
            - CREDIT_CARD
            - ACCOUNTS_PAYABLE
            - ACCOUNTS_RECEIVABLE
            - FIXED_ASSET
            - OTHER_ASSET
            - OTHER_CURRENT_ASSET
            - OTHER_EXPENSE
            - OTHER_INCOME
            - COST_OF_GOODS_SOLD
            - OTHER_CURRENT_LIABILITY
            - LONG_TERM_LIABILITY
            - NON_POSTING
          example: BANK
          description: >-
            Provider-native account type (e.g. `Bank`, `AccountsReceivable`,
            `CostOfGoodsSold`). More granular than `classification`.
        status:
          type: string
          enum:
            - ACTIVE
            - PENDING
            - INACTIVE
          example: ACTIVE
          description: Lifecycle status. One of `ACTIVE`, `INACTIVE`, `PENDING`.
        current_balance:
          type: number
          example: 12500.45
          description: Current balance on this account in `currency`.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        account_number:
          type: string
          example: '1010'
          description: Provider-native account number (chart-of-accounts code).
        parent_account:
          type: string
          example: 019d04a5-7c8f-7a44-b15a-2f8b3e8f1d2c
          description: UUID of the parent account if this is a sub-account.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: UUID of the associated company.
        integration_params:
          type: object
          additionalProperties: true
          example:
            AccountType: Bank
            AccountSubType: Checking
          description: Provider-specific passthrough fields.
    AccountingPayment:
      type: object
      title: Payment
      properties:
        transaction_date:
          type: string
          example: '2026-05-11'
          description: Date the transaction occurred (ISO 8601 date).
        contact:
          type: string
          example: 019d04a5-contact-uuid
          description: UUID of the contact making (AR) or receiving (AP) the payment.
        account:
          type: string
          example: 019d04a5-account-uuid
          description: UUID of the deposit-to / draw-from account.
        payment_method:
          type: string
          example: 019d04a5-payment-method-uuid
          description: UUID of the payment method used.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        total_amount:
          type: number
          example: 100
          description: Document grand total (subtotal + tax − discount), in `currency`.
        type:
          type: string
          enum:
            - ACCOUNTS_PAYABLE
            - ACCOUNTS_RECEIVABLE
          example: ACCOUNTS_RECEIVABLE
          description: >-
            Direction of money flow. `ACCOUNTS_RECEIVABLE` for customer payments
            received, `ACCOUNTS_PAYABLE` for vendor payments sent.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        accounting_period:
          type: string
          example: 019d04a5-period-uuid
          description: UUID of the accounting period this record belongs to.
        applied_to_lines:
          type: array
          items:
            $ref: '#/components/schemas/AccountingPaymentLineItem'
          description: >-
            Allocations describing how this payment is split across
            invoices/bills.
        integration_params:
          type: object
          additionalProperties: true
          example:
            ProcessPayment: false
          description: Provider-specific passthrough fields.
    AccountingTaxRate:
      type: object
      title: Tax Rate
      properties:
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        code:
          type: string
          example: CA-SALES
          description: Provider-native short code/identifier.
        name:
          type: string
          example: California Sales Tax
          description: Human-readable name of the record.
        description:
          type: string
          example: Combined state + county rate for California
          description: Free-text description visible on the record.
        status:
          type: string
          enum:
            - ACTIVE
            - ARCHIVED
          example: ACTIVE
          description: >-
            Lifecycle status of the record. Mapped to the closest
            provider-native value.
        country:
          type: string
          example: US
          description: ISO 3166-1 alpha-2 country code.
        total_tax_rate:
          type: number
          example: 7.25
          description: Total effective rate as a percentage.
        effective_tax_rate:
          type: number
          example: 7.25
          description: Effective combined rate after compounding, when applicable.
        tax_components:
          type: array
          items:
            $ref: '#/components/schemas/AccountingTaxComponent'
          description: >-
            Tax components that make up this combined rate. Used when a single
            tax rate is composed of multiple sub-taxes (e.g. state + city, GST +
            PST).
        integration_params:
          type: object
          additionalProperties: true
          example: {}
          description: Provider-specific passthrough fields.
    AccountingJournalEntry:
      type: object
      title: Journal Entry
      properties:
        transaction_date:
          type: string
          example: '2026-05-11'
          description: Date the journal posting takes effect (ISO 8601 date).
        payments:
          type: array
          items:
            type: string
          example:
            - 019d04a5-payment-uuid
          description: UUIDs of payments applied to this document.
        applied_payments:
          type: array
          items:
            type: string
          example:
            - 019d04a5-applied-payment-uuid
          description: >-
            UUIDs of payment-line allocations that link payments to this
            document.
        memo:
          type: string
          example: Month-end accruals
          description: >-
            Free-text journal memo. Required by some providers (e.g.
            QuickBooks).
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        inclusive_of_tax:
          type: boolean
          example: false
          description: >-
            `true` when `total_amount` (and `unit_price` on line items) already
            include tax. `false` when tax is added on top.
        lines:
          type: array
          items:
            $ref: '#/components/schemas/AccountingJournalLine'
          description: Debit + credit legs. Total of all lines must net to zero.
        journal_number:
          type: string
          example: JE-2026-0001
          description: Provider-native journal entry number.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        posting_status:
          type: string
          enum:
            - UNPOSTED
            - POSTED
          example: POSTED
          description: Posting status of the entry. One of `NOT_POSTED`, `POSTED`.
        accounting_period:
          type: string
          example: 019d04a5-period-uuid
          description: UUID of the accounting period this record belongs to.
        integration_params:
          type: object
          additionalProperties: true
          example:
            Adjustment: false
          description: Provider-specific passthrough fields.
    AccountingExpense:
      type: object
      title: Expense
      properties:
        transaction_date:
          type: string
          example: '2026-05-11'
          description: Date the expense was incurred (ISO 8601 date).
        account:
          type: string
          example: 019d04a5-account-uuid
          description: UUID of the bank / credit-card account that paid for the expense.
        contact:
          type: string
          example: 019d04a5-contact-uuid
          description: UUID of the associated contact (customer for AR, vendor for AP).
        total_amount:
          type: number
          example: 50
          description: Document grand total (subtotal + tax − discount), in `currency`.
        sub_total:
          type: number
          example: 50
          description: Document subtotal before tax and discount, in `currency`.
        total_tax_amount:
          type: number
          example: 0
          description: Total tax amount on the document, in `currency`.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        inclusive_of_tax:
          type: boolean
          example: false
          description: >-
            `true` when `total_amount` (and `unit_price` on line items) already
            include tax. `false` when tax is added on top.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        employee:
          type: string
          example: 019d04a5-employee-uuid
          description: UUID of the associated employee.
        memo:
          type: string
          example: May office supplies
          description: Free-text expense memo.
        lines:
          type: array
          items:
            $ref: '#/components/schemas/AccountingExpenseLine'
          description: >-
            Double-entry lines on this transaction. Must balance: ∑debits ==
            ∑credits.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        accounting_period:
          type: string
          example: 019d04a5-period-uuid
          description: UUID of the accounting period this record belongs to.
        integration_params:
          type: object
          additionalProperties: true
          example:
            PaymentType: Cash
          description: Provider-specific passthrough fields.
    AccountingPurchaseOrder:
      type: object
      title: Purchase Order
      properties:
        status:
          type: string
          enum:
            - DRAFT
            - SUBMITTED
            - AUTHORIZED
            - BILLED
            - DELETED
          example: SUBMITTED
          description: >-
            Lifecycle status. One of `DRAFT`, `SUBMITTED`, `AUTHORIZED`,
            `BILLED`, `DELETED`.
        issue_date:
          type: string
          example: '2026-05-11'
          description: Date the document was issued (ISO 8601 date).
        purchase_order_number:
          type: string
          example: PO-2026-0001
          description: Provider-native purchase order number.
        delivery_date:
          type: string
          example: '2026-06-10'
          description: Expected delivery date (ISO 8601 date).
        delivery_address:
          type: string
          example: 350 5th Ave, New York, NY 10118
          description: UUID of the delivery address used.
        customer:
          type: string
          example: 019d04a5-customer-uuid
          description: >-
            UUID of the customer this PO is on behalf of (used when the PO is
            generated from a sales order).
        vendor:
          type: string
          example: 019d04a5-vendor-uuid
          description: UUID of the vendor / supplier.
        memo:
          type: string
          example: Standing order — Q2
          description: Free-text PO memo.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        total_amount:
          type: number
          example: 1080
          description: Document grand total (subtotal + tax − discount), in `currency`.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        payment_term:
          type: string
          example: 019d04a5-term-uuid
          description: UUID of the associated payment term.
        accounts_payable_account:
          type: string
          example: 019d04a5-ap-account-uuid
          description: >-
            Accounts Payable account UUID where the resulting liability is
            tracked. Required by some providers (e.g. QBO) when the vendor
            doesn't have a default A/P account configured.
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/AccountingPurchaseOrderLineItem'
          description: Line items that make up the document.
        inclusive_of_tax:
          type: boolean
          example: false
          description: >-
            `true` when `total_amount` (and `unit_price` on line items) already
            include tax. `false` when tax is added on top.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        accounting_period:
          type: string
          example: 019d04a5-period-uuid
          description: UUID of the accounting period this record belongs to.
        integration_params:
          type: object
          additionalProperties: true
          example:
            GlobalTaxCalculation: NotApplicable
          description: Provider-specific passthrough fields.
    AccountingSalesOrder:
      type: object
      title: Sales Order
      properties:
        contact:
          type: string
          example: 019d04a5-contact-uuid
          description: UUID of the associated contact (customer for AR, vendor for AP).
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        status:
          type: string
          enum:
            - DRAFT
            - PENDING_APPROVAL
            - OPEN
            - PARTIALLY_COMPLETED
            - COMPLETED
            - CLOSED
          example: OPEN
          description: Lifecycle status. One of `OPEN`, `CLOSED`, `CANCELLED`.
        payment_term:
          type: string
          example: 019d04a5-term-uuid
          description: UUID of the associated payment term.
        memo:
          type: string
          example: Confirm shipping address before fulfilling
          description: >-
            Free-text memo / private note. May not be visible to the
            counterparty depending on the provider.
        shipping_address:
          type: string
          example: 350 5th Ave, New York, NY 10118
          description: UUID of the shipping address used.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        issue_date:
          type: string
          example: '2026-05-11'
          description: Date the document was issued (ISO 8601 date).
        transaction_number:
          type: string
          example: SO-2026-0001
          description: Provider-native sales order / transaction number.
        total:
          type: number
          example: 1200
          description: Sales order grand total in `currency`.
        lines:
          type: array
          items:
            $ref: '#/components/schemas/AccountingSalesOrderLine'
          description: >-
            Double-entry lines on this transaction. Must balance: ∑debits ==
            ∑credits.
        integration_params:
          type: object
          additionalProperties: true
          example:
            GlobalTaxCalculation: NotApplicable
          description: Provider-specific passthrough fields.
    AccountingCreditNote:
      type: object
      title: Credit Note
      properties:
        transaction_date:
          type: string
          example: '2026-05-11'
          description: Date the transaction occurred (ISO 8601 date).
        status:
          type: string
          enum:
            - SUBMITTED
            - AUTHORIZED
            - PAID
          example: AUTHORIZED
          description: Lifecycle status. One of `OPEN`, `APPLIED`, `VOID`.
        number:
          type: string
          example: CN-2026-0001
          description: >-
            Provider-native document number (invoice number, PO number, expense
            number, etc.).
        contact:
          type: string
          example: 019d04a5-contact-uuid
          description: UUID of the customer being credited.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        total_amount:
          type: number
          example: 300
          description: Document grand total (subtotal + tax − discount), in `currency`.
        remaining_credit:
          type: number
          example: 300
          description: Unapplied credit available to future invoices.
        inclusive_of_tax:
          type: boolean
          example: false
          description: >-
            `true` when `total_amount` (and `unit_price` on line items) already
            include tax. `false` when tax is added on top.
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/AccountingCreditNoteLineItem'
          description: Line items that make up the document.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        payments:
          type: array
          items:
            type: string
          example:
            - 019d04a5-payment-uuid
          description: UUIDs of payments applied to this document.
        applied_payments:
          type: array
          items:
            type: string
          example:
            - 019d04a5-applied-payment-uuid
          description: >-
            UUIDs of payment-line allocations that link payments to this
            document.
        accounting_period:
          type: string
          example: 019d04a5-period-uuid
          description: UUID of the accounting period this record belongs to.
        integration_params:
          type: object
          additionalProperties: true
          example:
            TxnTaxDetail:
              TotalTax: 0
          description: Provider-specific passthrough fields.
    AccountingVendorCredit:
      type: object
      title: Vendor Credit
      properties:
        number:
          type: string
          example: VC-2026-0001
          description: >-
            Provider-native document number (invoice number, PO number, expense
            number, etc.).
        transaction_date:
          type: string
          example: '2026-05-11'
          description: Date the transaction occurred (ISO 8601 date).
        vendor:
          type: string
          example: 019d04a5-vendor-uuid
          description: UUID of the vendor issuing the credit.
        total_amount:
          type: number
          example: 100
          description: Document grand total (subtotal + tax − discount), in `currency`.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        exchange_rate:
          type: string
          example: '1.0'
          description: >-
            Stringified decimal exchange rate from `currency` to the company's
            base currency. `1.0` when they match.
        inclusive_of_tax:
          type: boolean
          example: false
          description: >-
            `true` when `total_amount` (and `unit_price` on line items) already
            include tax. `false` when tax is added on top.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        accounts_payable_account:
          type: string
          example: 019d04a5-ap-account-uuid
          description: >-
            Accounts Payable account UUID where the credit reduces a liability.
            Required by some providers (e.g. QBO) when the vendor doesn't have a
            default A/P account configured.
        lines:
          type: array
          items:
            $ref: '#/components/schemas/AccountingVendorCreditLine'
          description: >-
            Double-entry lines on this transaction. Must balance: ∑debits ==
            ∑credits.
        tracking_categories:
          type: array
          items:
            type: string
          example:
            - 019d04a5-class-uuid
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        accounting_period:
          type: string
          example: 019d04a5-period-uuid
          description: UUID of the accounting period this record belongs to.
        integration_params:
          type: object
          additionalProperties: true
          example:
            GlobalTaxCalculation: NotApplicable
          description: Provider-specific passthrough fields.
    AccountingCompanyInfo:
      type: object
      title: Company Info
      properties:
        name:
          type: string
          example: Acme Software
          description: Human-readable name of the record.
        legal_name:
          type: string
          example: Acme Software, Inc.
          description: Legal entity name as registered.
        tax_number:
          type: string
          example: 84-1234567
          description: >-
            Tax identification number (VAT/EIN/GSTIN/etc., depending on
            jurisdiction).
        fiscal_year_end_month:
          type: number
          example: 12
          description: Month (1-12) where the fiscal year ends.
        fiscal_year_end_day:
          type: number
          example: 31
          description: Day-of-month (1-31) where the fiscal year ends.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        urls:
          type: array
          items:
            type: string
          example:
            - https://acme.com
          description: >-
            List of public URLs associated with the company (website, social
            profiles, etc.).
        addresses:
          type: array
          items:
            $ref: '#/components/schemas/AccountingAddress'
          description: Postal addresses associated with this record (billing, shipping, …).
        phone_numbers:
          type: array
          items:
            $ref: '#/components/schemas/AccountingPhoneNumber'
          description: Phone numbers associated with this record.
        integration_params:
          type: object
          additionalProperties: true
          example:
            CompanyStartDate: '2020-01-01'
          description: Provider-specific passthrough fields.
    AccountingItem:
      type: object
      title: Item
      properties:
        name:
          type: string
          example: Consulting Services
          description: Human-readable name of the record.
        status:
          type: string
          enum:
            - ACTIVE
            - ARCHIVED
          example: ACTIVE
          description: Lifecycle status. One of `ACTIVE`, `ARCHIVED`.
        type:
          type: string
          enum:
            - INVENTORY
            - NON_INVENTORY
            - SERVICE
            - UNKNOWN
          example: SERVICE
          description: Item type. One of `INVENTORY`, `NON_INVENTORY`, `SERVICE`, `BUNDLE`.
        unit_price:
          type: number
          example: 150
          description: Sales unit price.
        purchase_price:
          type: number
          example: 100
          description: Default purchase cost used on bills / purchase orders.
        purchase_account:
          type: string
          example: 019d04a5-7c8f-7a44-b15a-2f8b3e8f1d2c
          description: UUID of the expense account used when the item is purchased.
        sales_account:
          type: string
          example: 019d04a5-7c8f-7a44-b15a-3a9c4f9e2e3d
          description: UUID of the income account credited when the item is sold.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        purchase_tax_rate:
          type: string
          example: 019d04a5-tax-purch-uuid-here
          description: UUID of the default tax rate applied when purchasing this item.
        sales_tax_rate:
          type: string
          example: 019d04a5-tax-sales-uuid-here
          description: UUID of the default tax rate applied when selling this item.
        integration_params:
          type: object
          additionalProperties: true
          example:
            Type: Service
          description: Provider-specific passthrough fields.
    AccountingTrackingCategory:
      type: object
      title: Tracking Category
      properties:
        name:
          type: string
          example: US-West
          description: >-
            Display name of the tracking category (e.g. `West Coast`,
            `Engineering`, `Project Apollo`).
        status:
          type: string
          enum:
            - ACTIVE
            - ARCHIVED
          example: ACTIVE
          description: Lifecycle status. One of `ACTIVE`, `ARCHIVED`.
        category_type:
          type: string
          enum:
            - CLASS
            - DEPARTMENT
          example: CLASS
          description: >-
            Tracking dimension. QBO splits these into separate entities (Class
            vs Department).
        parent_category:
          type: string
          example: 019d04a5-parent-tracking-uuid
          description: UUID of the parent tracking category if hierarchical.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        integration_params:
          type: object
          additionalProperties: true
          example: {}
          description: Provider-specific passthrough fields.
    AccountingPeriod:
      type: object
      title: Accounting Period
      properties:
        name:
          type: string
          example: FY2026 Q1
          description: >-
            Display name of the accounting period (e.g. `Q1 2026`, `April
            2026`).
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          example: ACTIVE
          description: Period status. One of `OPEN`, `CLOSED`.
        start_date:
          type: string
          example: '2026-01-01'
          description: Start date (ISO 8601 date).
        end_date:
          type: string
          example: '2026-03-31'
          description: End date (ISO 8601 date).
        integration_params:
          type: object
          additionalProperties: true
          example: {}
          description: Provider-specific passthrough fields.
    AccountingPaymentMethod:
      type: object
      title: Payment Method
      properties:
        method_type:
          type: string
          enum:
            - CREDIT_CARD
            - DEBIT_CARD
            - ACH
            - CASH
            - CHECK
          example: CASH
          description: >-
            Provider-native subtype of the payment method (e.g. `Visa`,
            `Mastercard`, `ACH_DEBIT`).
        name:
          type: string
          example: Cash
          description: >-
            Display name of the payment method (e.g. `Visa ****1234`, `ACH —
            Chase Operating`).
        is_active:
          type: boolean
          example: true
          description: '`true` when the record is active in the source provider.'
        integration_params:
          type: object
          additionalProperties: true
          example: {}
          description: Provider-specific passthrough fields.
    AccountingPaymentTerm:
      type: object
      title: Payment Term
      properties:
        name:
          type: string
          example: Net 30
          description: Display name of the payment term (e.g. `Net 30`, `Due on receipt`).
        is_active:
          type: boolean
          example: true
          description: '`true` when the record is active in the source provider.'
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        days_until_due:
          type: number
          example: 30
          description: Days from issue date until payment is due (Standard term mode).
        discount_days:
          type: number
          example: 10
          description: Days within which an early-payment discount applies.
        integration_params:
          type: object
          additionalProperties: true
          example: {}
          description: Provider-specific passthrough fields.
    AccountingAttachment:
      type: object
      title: Attachment
      description: >-
        Read-side shape of an attachment record (List / Get responses). Writes
        use a different envelope — see `AccountingAttachmentMultipartWrite` for
        Create and `AccountingAttachmentPartial` for Update/Patch.
      properties:
        file_name:
          type: string
          example: team-lunch-receipt.pdf
        file_url:
          type: string
          example: https://files.routemcp.io/u/abc123/team-lunch-receipt.pdf
          description: >-
            URL where the attachment file can be downloaded. May be a permanent
            provider-hosted URL (e.g. QBO `Attachable.FileAccessUri`) or a
            short-lived signed URL depending on the provider. Response-only —
            ignored on write.
        mime_type:
          type: string
          example: application/pdf
          description: >-
            MIME type of the uploaded file. Populated on read; settable on
            Create via the multipart write body.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: UUID of the associated company / subsidiary.
        integration_params:
          type: object
          additionalProperties: true
          description: Provider-specific passthrough fields.
    AccountingEmployee:
      type: object
      title: Employee
      properties:
        first_name:
          type: string
          example: Gil
          description: Given name of the employee.
        last_name:
          type: string
          example: Feig
          description: Family name of the employee.
        email_address:
          type: string
          example: gil@routemcp.io
          description: Work email address.
        employee_number:
          type: string
          example: E-1001
          description: Internal identification number.
        is_contractor:
          type: boolean
          example: false
          description: True if 1099 contractor, false if W-2 employee.
        status:
          type: string
          enum:
            - ACTIVE
            - INACTIVE
          example: ACTIVE
          description: Employment status. One of `ACTIVE`, `INACTIVE`, `TERMINATED`.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        integration_params:
          type: object
          additionalProperties: true
          description: Provider-specific passthrough fields.
    AccountingExpenseReport:
      type: object
      title: Expense Report
      properties:
        report_date:
          type: string
          example: '2026-04-22'
          description: ISO date the report was created / issued.
        report_identifier:
          type: string
          example: ER-2026-001
          description: Human-readable report identifier.
        employee:
          type: string
          example: 019d04a5-employee-uuid
          description: UUID of the employee who submitted the report.
        status:
          type: string
          enum:
            - DRAFT
            - SUBMITTED
            - APPROVED
            - REJECTED
          example: SUBMITTED
          description: >-
            Lifecycle status. One of `DRAFT`, `SUBMITTED`, `APPROVED`,
            `REIMBURSED`, `REJECTED`.
        total_amount:
          type: number
          example: 235.5
          description: Document grand total (subtotal + tax − discount), in `currency`.
        currency:
          type: string
          example: USD
          description: ISO 4217 currency code (e.g. `USD`, `EUR`, `GBP`).
        description:
          type: string
          example: Q2 kickoff travel & meals
          description: Free-text description visible on the record.
        accounting_period:
          type: string
          example: 019d04a5-period-uuid
          description: UUID of the accounting period this record belongs to.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        tracking_categories:
          type: array
          items:
            type: string
          description: >-
            UUIDs of tracking categories (classes / locations / departments)
            attached to this record.
        lines:
          type: array
          items:
            $ref: '#/components/schemas/AccountingExpenseReportLine'
          description: >-
            Double-entry lines on this transaction. Must balance: ∑debits ==
            ∑credits.
        integration_params:
          type: object
          additionalProperties: true
          description: Provider-specific passthrough fields.
    AccountingItemFulfillment:
      type: object
      title: Item Fulfillment
      properties:
        sales_order:
          type: string
          example: 019d04a5-so-uuid
          description: UUID of the sales order this fulfillment originated from.
        fulfillment_date:
          type: string
          example: '2026-04-15'
          description: ISO date the fulfillment was created.
        customer:
          type: string
          example: 019d04a5-customer-uuid
          description: UUID of the customer this fulfillment is for.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        status:
          type: string
          enum:
            - DRAFT
            - IN_PROGRESS
            - SHIPPED
            - CANCELLED
          example: SHIPPED
          description: >-
            Lifecycle status. One of `PENDING`, `SHIPPED`, `DELIVERED`,
            `CANCELLED`.
        memo:
          type: string
          example: Shipped via UPS Ground
          description: >-
            Free-text memo / private note. May not be visible to the
            counterparty depending on the provider.
        lines:
          type: array
          items:
            $ref: '#/components/schemas/AccountingItemFulfillmentLine'
          description: >-
            Double-entry lines on this transaction. Must balance: ∑debits ==
            ∑credits.
        integration_params:
          type: object
          additionalProperties: true
          description: Provider-specific passthrough fields.
    AccountingProject:
      type: object
      title: Project
      properties:
        name:
          type: string
          example: Acme Website Redesign
          description: The project's name. Required by most providers; <= 255 characters.
        is_active:
          type: boolean
          example: true
          description: '`true` when the record is active in the source provider.'
        contact:
          type: string
          example: 019d04a5-customer-uuid
          description: UUID of the supplier or customer involved in the project.
        company:
          type: string
          example: 019d04a5-2012-7119-bc07-75c081250434
          description: >-
            UUID of the company this record belongs to (used by multi-entity
            providers).
        integration_params:
          type: object
          additionalProperties: true
          description: Provider-specific passthrough fields.
  securitySchemes:
    bearerAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Enter your API key with the Bearer prefix — e.g. Bearer sk_live_xxx
        (production) or Bearer sk_test_xxx (sandbox)

````