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

# Create a new resource



## OpenAPI

````yaml /api-reference/openapi.json post /accounting/{resource}
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}:
    post:
      tags:
        - Accounting Resources
      summary: Create a new resource
      operationId: AccountingResourceController_createResource
      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
              - 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 create. 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 (`balance_sheet`, `income_statement`,
            `cash_flow_statement`), bank feeds, `general_ledger_transaction`,
            `address`, `phone_number`, and the generic `transaction` — cannot be
            created.
        - $ref: '#/components/parameters/ProviderQueryRequired'
        - $ref: '#/components/parameters/XEndUserIdHeader'
      requestBody:
        required: true
        description: >-
          Accounting resource body. Pick an example from the dropdown to see the
          schema for each resource type. For attachment uploads, see the
          dedicated `POST /accounting/attachment` endpoint — it uses multipart
          and is documented separately.
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/AccountingInvoice'
                - $ref: '#/components/schemas/AccountingContact'
                - $ref: '#/components/schemas/AccountingAccount'
                - $ref: '#/components/schemas/AccountingPayment'
                - $ref: '#/components/schemas/AccountingTaxRate'
                - $ref: '#/components/schemas/AccountingJournalEntry'
                - $ref: '#/components/schemas/AccountingExpense'
                - $ref: '#/components/schemas/AccountingPurchaseOrder'
                - $ref: '#/components/schemas/AccountingSalesOrder'
                - $ref: '#/components/schemas/AccountingCreditNote'
                - $ref: '#/components/schemas/AccountingVendorCredit'
                - $ref: '#/components/schemas/AccountingCompanyInfo'
                - $ref: '#/components/schemas/AccountingItem'
                - $ref: '#/components/schemas/AccountingTrackingCategory'
                - $ref: '#/components/schemas/AccountingPeriod'
                - $ref: '#/components/schemas/AccountingPaymentMethod'
                - $ref: '#/components/schemas/AccountingPaymentTerm'
                - $ref: '#/components/schemas/AccountingEmployee'
                - $ref: '#/components/schemas/AccountingExpenseReport'
                - $ref: '#/components/schemas/AccountingItemFulfillment'
                - $ref: '#/components/schemas/AccountingProject'
              discriminator:
                propertyName: resource
                mapping:
                  invoice:
                    $ref: '#/components/schemas/AccountingInvoice'
                  contact:
                    $ref: '#/components/schemas/AccountingContact'
                  account:
                    $ref: '#/components/schemas/AccountingAccount'
                  payment:
                    $ref: '#/components/schemas/AccountingPayment'
                  tax_rate:
                    $ref: '#/components/schemas/AccountingTaxRate'
                  journal_entry:
                    $ref: '#/components/schemas/AccountingJournalEntry'
                  expense:
                    $ref: '#/components/schemas/AccountingExpense'
                  purchase_order:
                    $ref: '#/components/schemas/AccountingPurchaseOrder'
                  sales_order:
                    $ref: '#/components/schemas/AccountingSalesOrder'
                  credit_note:
                    $ref: '#/components/schemas/AccountingCreditNote'
                  vendor_credit:
                    $ref: '#/components/schemas/AccountingVendorCredit'
                  company_info:
                    $ref: '#/components/schemas/AccountingCompanyInfo'
                  item:
                    $ref: '#/components/schemas/AccountingItem'
                  tracking_category:
                    $ref: '#/components/schemas/AccountingTrackingCategory'
                  accounting_period:
                    $ref: '#/components/schemas/AccountingPeriod'
                  payment_method:
                    $ref: '#/components/schemas/AccountingPaymentMethod'
                  payment_term:
                    $ref: '#/components/schemas/AccountingPaymentTerm'
                  employee:
                    $ref: '#/components/schemas/AccountingEmployee'
                  expense_report:
                    $ref: '#/components/schemas/AccountingExpenseReport'
                  item_fulfillment:
                    $ref: '#/components/schemas/AccountingItemFulfillment'
                  project:
                    $ref: '#/components/schemas/AccountingProject'
            examples:
              invoice:
                summary: Invoice — type discriminates AR/AP
                value:
                  type: ACCOUNTS_RECEIVABLE
                  contact: 022a2bef-57e5-4def-8285-d68a25d1e36e
                  number: AIM-01-2026
                  issue_date: '2026-04-15'
                  due_date: '2026-05-15'
                  currency: USD
                  status: OPEN
                  total_amount: 1620
                  line_items:
                    - description: Strategy consulting — April 2026
                      unit_price: 1500
                      quantity: 1
                      account: 9d9eaaf6-9f95-4e34-bc03-d33b7b4d2611
                  inclusive_of_tax: false
              contact:
                summary: Contact — name + is_customer/is_supplier
                value:
                  name: Acme Inc.
                  is_customer: true
                  email_address: billing@acme.example
                  tax_number: 12-3456789
                  status: ACTIVE
                  currency: USD
                  addresses:
                    - type: BILLING
                      street_1: 1 Market St
                      city: San Francisco
                      country_subdivision: CA
                      country: US
                      zip_code: '94105'
              account:
                summary: Account — chart of accounts entry
                value:
                  name: Sales Revenue
                  classification: REVENUE
                  account_type: OTHER_INCOME
                  currency: USD
                  account_number: '4000'
              payment:
                summary: Payment
                value:
                  transaction_date: '2026-04-20'
                  contact: 022a2bef-57e5-4def-8285-d68a25d1e36e
                  account: 9d9eaaf6-9f95-4e34-bc03-d33b7b4d2611
                  payment_method: 70afef8b-21cb-4f5a-bf6e-9b85a8c1ea45
                  currency: USD
                  total_amount: 1620
                  type: ACCOUNTS_RECEIVABLE
                  applied_to_lines:
                    - applied_amount: '1620.00'
                      applied_date: '2026-04-20'
                      related_object_id: 0958cbc6-6040-430a-848e-aafacbadf4ae
                      related_object_type: INVOICE
              tax_rate:
                summary: Tax rate
                value:
                  code: CA-SALES-08
                  name: California Sales Tax 8%
                  status: ACTIVE
                  country: US
                  total_tax_rate: 8
              journal_entry:
                summary: Journal entry — balanced lines required
                value:
                  transaction_date: '2026-04-30'
                  memo: Month-end depreciation.
                  currency: USD
                  posting_status: POSTED
                  lines:
                    - account: 9d9eaaf6-9f95-4e34-bc03-d33b7b4d2611
                      net_amount: -500
                      description: Depreciation — office equipment
              expense:
                summary: Expense
                value:
                  transaction_date: '2026-04-22'
                  account: 9d9eaaf6-9f95-4e34-bc03-d33b7b4d2611
                  total_amount: 235.5
                  currency: USD
                  memo: Team lunch — Q2 kickoff.
                  lines:
                    - net_amount: 220
                      account: 9d9eaaf6-9f95-4e34-bc03-d33b7b4d2611
                      description: Team lunch
              purchase_order:
                summary: Purchase order
                value:
                  status: AUTHORIZED
                  issue_date: '2026-04-10'
                  purchase_order_number: PO-2026-042
                  delivery_date: '2026-05-01'
                  vendor: 88888888-8888-8888-8888-888888888888
                  total_amount: 750
                  currency: USD
                  line_items:
                    - description: Standing desk
                      unit_price: 750
                      quantity: 1
                      account: 9d9eaaf6-9f95-4e34-bc03-d33b7b4d2611
              sales_order:
                summary: Sales order
                value:
                  contact: 022a2bef-57e5-4def-8285-d68a25d1e36e
                  currency: USD
                  status: OPEN
                  issue_date: '2026-04-12'
                  total: 4800
                  lines:
                    - description: Annual software license
                      unit_price: '4800.00'
                      quantity: '1'
              credit_note:
                summary: Credit note
                value:
                  transaction_date: '2026-04-25'
                  status: AUTHORIZED
                  number: CN-2026-007
                  contact: 022a2bef-57e5-4def-8285-d68a25d1e36e
                  total_amount: 200
                  currency: USD
                  line_items:
                    - name: Adjustment
                      description: Pricing correction.
                      quantity: '1'
                      unit_price: '200.00'
              vendor_credit:
                summary: Vendor credit
                value:
                  number: VC-2026-003
                  transaction_date: '2026-04-18'
                  vendor: 88888888-8888-8888-8888-888888888888
                  total_amount: 100
                  currency: USD
                  lines:
                    - net_amount: 100
                      description: Returned defective unit
              company_info:
                summary: Company info
                value:
                  name: RouteMCP Inc.
                  legal_name: RouteMCP Holdings, Inc.
                  tax_number: 98-7654321
                  fiscal_year_end_month: 12
                  fiscal_year_end_day: 31
                  currency: USD
              item:
                summary: Item
                value:
                  name: Annual Software License
                  status: ACTIVE
                  type: SERVICE
                  unit_price: 4800
                  sales_account: 9d9eaaf6-9f95-4e34-bc03-d33b7b4d2611
              tracking_category:
                summary: Tracking category
                value:
                  name: Product
                  status: ACTIVE
                  category_type: DEPARTMENT
              accounting_period:
                summary: Accounting period
                value:
                  name: FY2026 Q2
                  status: ACTIVE
                  start_date: '2026-04-01'
                  end_date: '2026-06-30'
              payment_method:
                summary: Payment method
                value:
                  method_type: ACH
                  name: Bank ACH
                  is_active: true
              payment_term:
                summary: Payment term
                value:
                  name: Net 30
                  is_active: true
                  days_until_due: 30
                  discount_days: 10
              employee:
                summary: Employee
                value:
                  first_name: Gil
                  last_name: Feig
                  email_address: gil@routemcp.io
                  employee_number: E-1001
                  is_contractor: false
                  status: ACTIVE
              expense_report:
                summary: Expense report
                value:
                  report_date: '2026-04-22'
                  report_identifier: ER-2026-001
                  employee: 7e1bb333-bbbb-cccc-dddd-2222bbbb2222
                  status: SUBMITTED
                  total_amount: 235.5
                  currency: USD
                  description: Q2 kickoff travel & meals
                  lines:
                    - account: 9d9eaaf6-9f95-4e34-bc03-d33b7b4d2611
                      description: Team lunch — Q2 kickoff
                      expense_date: '2026-04-22'
                      amount: 235.5
                      currency: USD
              item_fulfillment:
                summary: Item fulfillment
                value:
                  sales_order: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
                  fulfillment_date: '2026-04-15'
                  contact: 022a2bef-57e5-4def-8285-d68a25d1e36e
                  status: SHIPPED
                  memo: Shipped via UPS Ground
                  lines:
                    - item: 10101010-1010-1010-1010-101010101010
                      sales_order_line: bbbbbbbb-cccc-dddd-eeee-ffffffffffff
                      quantity: '1'
              project:
                summary: Project
                value:
                  name: Acme Website Redesign
                  is_active: true
                  contact: 022a2bef-57e5-4def-8285-d68a25d1e36e
      responses:
        '201':
          description: Resource created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateAccountingResourceResponse'
              examples:
                invoice:
                  summary: Invoice created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    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
                contact:
                  summary: Contact created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:022a2bef-57e5-4def-8285-d68a25d1e36e
                      remote_id: '12345'
                      created_at: '2026-04-01T08:00:00Z'
                      modified_at: '2026-04-15T10:30:00Z'
                      name: Acme Inc.
                      is_supplier: false
                      is_customer: true
                      email_address: billing@acme.example
                      tax_number: 12-3456789
                      status: ACTIVE
                      currency: USD
                      remote_updated_at: '2026-04-15T10:30:00Z'
                      company: 0bb37dc5-2bf3-4c75-95ab-58f06a93a2ac
                      addresses:
                        - type: BILLING
                          street_1: 1 Market St
                          city: San Francisco
                          state: California
                          country_subdivision: CA
                          country: US
                          zip_code: '94105'
                      phone_numbers:
                        - number: '+14155550100'
                          type: Office
                      remote_was_deleted: false
                account:
                  summary: Account created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:9d9eaaf6-9f95-4e34-bc03-d33b7b4d2611
                      remote_id: '1010'
                      created_at: '2026-01-01T00:00:00Z'
                      modified_at: '2026-04-01T00:00:00Z'
                      name: Sales Revenue
                      description: Top-of-funnel revenue.
                      classification: REVENUE
                      type: Income
                      account_type: OTHER_INCOME
                      status: ACTIVE
                      current_balance: 245890.55
                      currency: USD
                      account_number: '4000'
                      parent_account: null
                      company: 0bb37dc5-2bf3-4c75-95ab-58f06a93a2ac
                      remote_was_deleted: false
                payment:
                  summary: Payment created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:9b1b3c6e-2eb6-4f6e-bb24-3c2b9bbbac98
                      remote_id: PMT-2026-001
                      created_at: '2026-04-20T10:00:00Z'
                      modified_at: '2026-04-20T10:00:00Z'
                      transaction_date: '2026-04-20'
                      contact: 022a2bef-57e5-4def-8285-d68a25d1e36e
                      account: 9d9eaaf6-9f95-4e34-bc03-d33b7b4d2611
                      payment_method: 70afef8b-21cb-4f5a-bf6e-9b85a8c1ea45
                      currency: USD
                      exchange_rate: '1.00'
                      company: 0bb37dc5-2bf3-4c75-95ab-58f06a93a2ac
                      total_amount: 1620
                      type: ACCOUNTS_RECEIVABLE
                      tracking_categories: []
                      accounting_period: 0a3a9f8b-2c2c-4f50-b34a-e7a3e4d56789
                      applied_to_lines:
                        - id: urn:uuid:11111111-1111-1111-1111-111111111111
                          applied_amount: '1620.00'
                          applied_date: '2026-04-20'
                          related_object_id: 0958cbc6-6040-430a-848e-aafacbadf4ae
                          related_object_type: INVOICE
                      remote_updated_at: '2026-04-20T10:00:00Z'
                      remote_was_deleted: false
                tax_rate:
                  summary: Tax rate created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:ee2c8927-d59f-4f89-90e3-4eef5ee43a91
                      remote_id: TAX-08-CA
                      name: California Sales Tax 8%
                      code: CA-SALES-08
                      status: ACTIVE
                      country: US
                      total_tax_rate: 8
                      effective_tax_rate: 8
                      remote_was_deleted: false
                journal_entry:
                  summary: Journal entry created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:33333333-3333-3333-3333-333333333333
                      remote_id: JE-2026-09
                      transaction_date: '2026-04-30'
                      memo: Month-end depreciation.
                      currency: USD
                      exchange_rate: '1.00'
                      company: 0bb37dc5-2bf3-4c75-95ab-58f06a93a2ac
                      posting_status: POSTED
                      journal_number: JE-2026-09
                      lines:
                        - account: 9d9eaaf6-9f95-4e34-bc03-d33b7b4d2611
                          net_amount: -500
                          description: Depreciation — office equipment
                      remote_was_deleted: false
                expense:
                  summary: Expense created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:55555555-5555-5555-5555-555555555555
                      remote_id: EXP-2026-100
                      transaction_date: '2026-04-22'
                      account: 9d9eaaf6-9f95-4e34-bc03-d33b7b4d2611
                      total_amount: 235.5
                      currency: USD
                      memo: Team lunch — Q2 kickoff.
                      remote_was_deleted: false
                purchase_order:
                  summary: Purchase order created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:77777777-7777-7777-7777-777777777777
                      remote_id: PO-2026-042
                      status: AUTHORIZED
                      purchase_order_number: PO-2026-042
                      issue_date: '2026-04-10'
                      delivery_date: '2026-05-01'
                      vendor: 88888888-8888-8888-8888-888888888888
                      total_amount: 750
                      currency: USD
                      remote_was_deleted: false
                sales_order:
                  summary: Sales order created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
                      remote_id: SO-2026-088
                      contact: 022a2bef-57e5-4def-8285-d68a25d1e36e
                      status: OPEN
                      issue_date: '2026-04-12'
                      transaction_number: SO-2026-088
                      total: 4800
                      currency: USD
                      remote_was_deleted: false
                credit_note:
                  summary: Credit note created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:cccccccc-dddd-eeee-ffff-111111111111
                      remote_id: CN-2026-007
                      transaction_date: '2026-04-25'
                      status: AUTHORIZED
                      number: CN-2026-007
                      contact: 022a2bef-57e5-4def-8285-d68a25d1e36e
                      total_amount: 200
                      remaining_credit: 200
                      currency: USD
                      remote_was_deleted: false
                vendor_credit:
                  summary: Vendor credit created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:eeeeeeee-ffff-1111-2222-333333333333
                      remote_id: VC-2026-003
                      number: VC-2026-003
                      transaction_date: '2026-04-18'
                      vendor: 88888888-8888-8888-8888-888888888888
                      total_amount: 100
                      currency: USD
                      remote_was_deleted: false
                company_info:
                  summary: Company info created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:0bb37dc5-2bf3-4c75-95ab-58f06a93a2ac
                      remote_id: REALM-12345
                      name: RouteMCP Inc.
                      legal_name: RouteMCP Holdings, Inc.
                      tax_number: 98-7654321
                      fiscal_year_end_month: 12
                      fiscal_year_end_day: 31
                      currency: USD
                      remote_was_deleted: false
                item:
                  summary: Item created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:10101010-1010-1010-1010-101010101010
                      remote_id: ITEM-001
                      name: Annual Software License
                      status: ACTIVE
                      type: SERVICE
                      unit_price: 4800
                      sales_account: 9d9eaaf6-9f95-4e34-bc03-d33b7b4d2611
                      remote_was_deleted: false
                tracking_category:
                  summary: Tracking category created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:b6e3f2c0-3aa0-4d31-9f7c-91d44b2a1b3c
                      remote_id: CLASS-PROD
                      name: Product
                      status: ACTIVE
                      category_type: DEPARTMENT
                      remote_was_deleted: false
                accounting_period:
                  summary: Accounting period created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:0a3a9f8b-2c2c-4f50-b34a-e7a3e4d56789
                      remote_id: FY2026-Q2
                      name: FY2026 Q2
                      status: ACTIVE
                      start_date: '2026-04-01'
                      end_date: '2026-06-30'
                      remote_was_deleted: false
                payment_method:
                  summary: Payment method created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:70afef8b-21cb-4f5a-bf6e-9b85a8c1ea45
                      remote_id: ACH-001
                      method_type: ACH
                      name: Bank ACH
                      is_active: true
                      remote_was_deleted: false
                payment_term:
                  summary: Payment term created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:fb8c55b6-0525-4452-b3b5-d2922d20b212
                      remote_id: NET30
                      name: Net 30
                      is_active: true
                      days_until_due: 30
                      discount_days: 10
                      remote_was_deleted: false
                employee:
                  summary: Employee created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:7e1bb333-bbbb-cccc-dddd-2222bbbb2222
                      remote_id: EMP-001
                      first_name: Gil
                      last_name: Feig
                      is_contractor: false
                      employee_number: E-1001
                      email_address: gil@routemcp.io
                      company: 0bb37dc5-2bf3-4c75-95ab-58f06a93a2ac
                      status: ACTIVE
                      remote_was_deleted: false
                expense_report:
                  summary: Expense report created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:7e1bb333-bbbb-cccc-dddd-3333bbbb3333
                      remote_id: ER-2026-001
                      report_date: '2026-04-22'
                      report_identifier: ER-2026-001
                      employee: 7e1bb333-bbbb-cccc-dddd-2222bbbb2222
                      status: SUBMITTED
                      total_amount: 235.5
                      currency: USD
                      description: Q2 kickoff travel & meals
                      remote_was_deleted: false
                item_fulfillment:
                  summary: Item fulfillment created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:7e1bb333-bbbb-cccc-dddd-5555bbbb5555
                      remote_id: IF-2026-001
                      sales_order: aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee
                      fulfillment_date: '2026-04-15'
                      contact: 022a2bef-57e5-4def-8285-d68a25d1e36e
                      status: SHIPPED
                      memo: Shipped via UPS Ground
                      remote_was_deleted: false
                project:
                  summary: Project created
                  value:
                    success: true
                    statusCode: 201
                    message: Created
                    data:
                      id: urn:uuid:7e1bb333-bbbb-cccc-dddd-7777bbbb7777
                      remote_id: PROJ-001
                      name: Acme Website Redesign
                      is_active: true
                      company: 0bb37dc5-2bf3-4c75-95ab-58f06a93a2ac
                      contact: 022a2bef-57e5-4def-8285-d68a25d1e36e
                      remote_was_deleted: false
        '400':
          description: Validation failed or missing params
        '401':
          description: Missing or invalid API key
        '404':
          description: End user or provider not found
        '405':
          description: Provider does not support this operation for the requested 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:
    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:
    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.
    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.
    CreateAccountingResourceResponse:
      type: object
      title: CreateAccountingResourceResponse
      description: >-
        Standard envelope returned by `POST /accounting/{resource}`. Contains
        the newly created record. 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: 201
          description: >-
            HTTP status code mirrored inside the envelope. `201` for successful
            creation.
        message:
          type: string
          example: Created
        data:
          $ref: '#/components/schemas/CreatableAccountingResource'
      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.
    CreatableAccountingResource:
      title: AccountingResource
      description: >-
        An accounting record returned after creation. The concrete shape depends
        on the `{resource}` path parameter — switch tabs to see each variant.
        Read-only resources (reports, bank feeds, GL transactions, address,
        phone_number, transaction) cannot be created.
      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/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'
    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.
  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)

````