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

# Create CustomerCredit record

> Create a new CustomerCredit record with the provided data. Validates all required fields and business rules.



## OpenAPI

````yaml /developers/openapi/resources-v2.json post /public/v2/customer-credits/
openapi: 3.1.0
info:
  title: DualEntry Public API
  version: 2.0.0
  description: ''
servers:
  - url: https://api.dualentry.com
    description: Production environment
  - url: https://api-dev.dualentry.com
    description: Development environment (for testing)
security: []
tags:
  - name: Health
    description: >-
      Monitor API availability and service status. Use these endpoints to verify
      connectivity and check if the API is operational.
  - name: Webhooks
    description: >-
      Register webhook endpoints to receive real-time event notifications when
      records change in your organization. Manage subscriptions, view available
      topics, and inspect delivery history.
  - name: Accounts
    description: >-
      Manage your chart of accounts. Create and maintain the accounts used to
      categorize financial transactions, including assets, liabilities, equity,
      revenue, and expenses.
  - name: Budgets
    description: >-
      Manage financial budgets. Create and track income statement and balance
      sheet budgets with monthly cell values, actuals comparison, and
      classification filtering.
  - name: Companies
    description: >-
      Access and manage company information. Retrieve details about your
      organization including legal name, tax identifiers, addresses, and
      accounting preferences.
  - name: Customers
    description: >-
      Manage customer records. Create, update, and track customers who purchase
      goods or services from your organization, including contact information,
      billing addresses, and payment terms.
  - name: Contracts
    description: >-
      Manage revenue recognition contracts. Create and retrieve contracts with
      performance obligations, and manage obligation usage for usage-based
      obligations.
  - name: Items
    description: >-
      Manage products and services. Define items that appear on invoices and
      bills, including pricing, descriptions, and associated accounts for
      revenue or expense tracking.
  - name: Vendors
    description: >-
      Manage vendor and supplier records. Track businesses and individuals from
      whom you purchase goods or services, including contact details, payment
      terms, and tax information.
  - name: Journal Entries
    description: >-
      Create and manage manual journal entries. Record direct debits and credits
      to accounts for adjustments, accruals, reclassifications, and other
      accounting transactions.
  - name: Invoices
    description: >-
      Manage sales invoices. Create and track invoices sent to customers for
      goods or services rendered, including line items, taxes, discounts, and
      payment status.
  - name: Sales Orders
    description: >-
      Create and manage sales orders. Track customer orders for goods or
      services before invoicing, including line items, quantities, fulfillment
      status, and invoicing progress.
  - name: Bills
    description: >-
      Manage vendor bills and payables. Record and track bills received from
      vendors for goods or services purchased, including line items, due dates,
      and payment tracking.
  - name: Customer Prepayments
    description: >-
      Track advance payments from customers. Access prepayments received before
      goods or services are delivered, which can be applied to future invoices.
  - name: Customer Prepayment Applications
    description: >-
      Apply customer prepayments and credits to invoices. Record applications of
      prepayments or credit memos to reduce invoice balances.
  - name: Customer Deposits
    description: >-
      Manage customer deposit transactions. Record and track deposits received
      from customers as security or partial payment, held in liability accounts
      until earned or refunded.
  - name: Customer Refunds
    description: >-
      Process and track customer refunds. Record refunds issued to customers for
      overpayments, returns, or cancelled transactions.
  - name: Customer Credits
    description: >-
      Manage credit memos for customers. Issue credits for returned goods,
      billing adjustments, or discounts that reduce customer balances or can be
      applied to future invoices.
  - name: Cash Sales
    description: >-
      Record immediate cash sales transactions. Track sales where payment is
      received at the time of sale, including point-of-sale transactions and
      cash receipts.
  - name: Customer Payments
    description: >-
      Record and manage customer payments. Track payments received from
      customers and apply them to outstanding invoices, including partial
      payments and overpayments.
  - name: Recurring Invoices
    description: >-
      Automate recurring billing. Set up and manage templates for invoices that
      are automatically generated on a regular schedule (e.g., monthly
      subscriptions).
  - name: Recurring Bills
    description: >-
      Automate recurring expenses. Configure templates for bills that repeat on
      a regular basis (e.g., monthly rent, subscriptions) to streamline expense
      tracking.
  - name: Recurring Journal Entries
    description: >-
      Automate recurring journal entries. Create templates for journal entries
      that occur regularly (e.g., monthly depreciation, amortization) to ensure
      consistent accounting treatment.
  - name: Classifications
    description: >-
      Manage custom classification dimensions. Create and maintain
      classification categories (e.g., departments, locations, projects) used to
      tag and analyze transactions across multiple dimensions.
  - name: Classifications Lines
    description: >-
      Manage classification values. Define the specific values within each
      classification category that can be assigned to transaction line items for
      detailed reporting and analysis.
  - name: Custom Fields
    description: >-
      Manage custom field definitions. Extend records with organization-specific
      attributes — name, type (text, number, boolean, date, single_select,
      multi_select, currency, link, paragraph), default value, options, and
      which record types (invoice, bill, customer, vendor, etc.) and companies
      the field applies to. Values are set via the `custom_fields` attribute on
      each record's create/update endpoint.
  - name: Purchase Orders
    description: >-
      Create and track purchase orders. Manage formal requests to vendors for
      goods or services, including approval workflows, receiving tracking, and
      bill matching.
  - name: Vendor Payments
    description: >-
      Record and manage vendor payments. Track payments made to vendors and
      apply them to outstanding bills and credits, including partial payments
      and overpayments.
  - name: Vendor Prepayments
    description: >-
      Track advance payments to vendors. Record prepayments made before goods or
      services are received, which can be applied to future bills.
  - name: Vendor Prepayment Applications
    description: >-
      Apply vendor prepayments to bills. Record applications of prepayments to
      reduce bill balances and track amounts owed.
  - name: Vendor Credits
    description: >-
      Manage vendor credit memos. Record credits from vendors for returned
      goods, billing adjustments, or discounts that reduce amounts owed or can
      be applied to future bills.
  - name: Vendor Refunds
    description: >-
      Process and track vendor refunds. Record refunds received from vendors for
      overpayments, returns, or cancelled transactions.
  - name: Paper Checks
    description: >-
      Manage paper check printing. Create, queue, and batch print paper checks
      for vendor payments, direct expenses, vendor prepayments, and customer
      refunds.
  - name: Direct Expenses
    description: >-
      Record direct expense transactions. Track payments made directly from a
      bank or credit card account for expenses, without going through the
      accounts payable process.
  - name: Bank Transfers
    description: >-
      Manage bank-to-bank transfers. Record and track transfers between bank and
      credit card accounts, including multi-currency transfers with exchange
      rate handling.
  - name: Bank Match
    description: >-
      Reconcile bank-feed rows against accounting transactions. List bank rows,
      trigger the matching pipeline, read AI suggestions, and confirm or undo
      matches. V2 API only.
  - name: Fixed Assets
    description: >-
      Manage fixed assets and capital equipment. Create, update, and track
      long-lived tangible assets including depreciation schedules, account
      assignments, and asset lifecycle management.
  - name: Intercompany Journal Entries
    description: >-
      Create and manage intercompany journal entries. Record GL activity that
      spans two or more companies within the same organization, with per-line
      company assignment and automatic intercompany elimination.
  - name: Depreciation Books
    description: >-
      Discover available depreciation books for multi-book depreciation. Each
      organization has a posting book (BOOK) and may have additional tax books
      (FEDERAL, AMT, STATE_*). V2 API only.
  - name: VAT Rates
    description: >-
      Look up available VAT (Value Added Tax) rates for your organization. Use
      these IDs as `vat_rate_id` on transaction line items. Rates are scoped by
      country and include standard, reduced, zero-rated, exempt, and reverse
      charge types. V2 API only.
  - name: GST Tax Rates
    description: >-
      Look up available GST (Goods and Services Tax) rates for your
      organization. Use these IDs as `gst_tax_rate_id` on transaction line
      items. Covers AU, NZ, SG, IN, CA GST regimes and MY SST, with
      per-component breakdowns (e.g. CGST+SGST for India). V2 API only.
  - name: Product Tax Codes
    description: >-
      Manage organization product tax codes and discover global product tax
      codes. Use these IDs as `product_tax_code_id` on item payloads. V2 API
      only.
  - name: Approval Policies
    description: >-
      Manage approval workflows and policies. Define approval rules, steps,
      conditions, and approvers for different record types. Monitor workflow
      execution states and view approval history.
  - name: Inbox
    description: >-
      View pending approvals and approval status. Access transactions and
      records awaiting approval across the organization, including full approval
      workflow details, approvers, and action history.
paths:
  /public/v2/customer-credits/:
    post:
      tags:
        - Customer Credits
      summary: Create CustomerCredit record
      description: >-
        Create a new CustomerCredit record with the provided data. Validates all
        required fields and business rules.
      operationId: create_CustomerCredit_record
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicCustomerCreditSchemaCreateIn'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCustomerCreditSchemaOut'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
components:
  schemas:
    PublicCustomerCreditSchemaCreateIn:
      description: Input schema for creating Customer Credit records.
      properties:
        bill_to_address:
          default: ''
          deprecated: true
          description: >-
            Deprecated: send the structured billing_address / shipping_address
            instead.
          title: Bill To Address
          type:
            - string
            - 'null'
        ship_to_address:
          default: ''
          deprecated: true
          description: >-
            Deprecated: send the structured billing_address / shipping_address
            instead.
          title: Ship To Address
          type:
            - string
            - 'null'
        billing_address:
          anyOf:
            - $ref: '#/components/schemas/AddressSchemaIn'
            - type: 'null'
        shipping_address:
          anyOf:
            - $ref: '#/components/schemas/AddressSchemaIn'
            - type: 'null'
        custom_fields:
          title: Custom Fields
          items:
            additionalProperties: true
            type: object
          type:
            - array
            - 'null'
        date:
          format: date
          title: Date
          type: string
        transaction_date:
          title: Transaction Date
          format: date
          type:
            - string
            - 'null'
        invoice_number:
          title: Invoice Number
          type:
            - integer
            - 'null'
        cash_sale_number:
          title: Cash Sale Number
          type:
            - integer
            - 'null'
        customer_id:
          title: Customer Id
          type:
            - integer
            - 'null'
        company_id:
          title: Company Id
          type: integer
        currency_iso_4217_code:
          $ref: '#/components/schemas/SystemCurrencies'
        memo:
          default: ''
          title: Memo
          type: string
        exchange_rate:
          anyOf:
            - type: number
            - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,16}0*$
              type: string
          title: Exchange Rate
        items:
          default: []
          items:
            $ref: '#/components/schemas/PublicCustomerCreditItemIn'
          title: Items
          type: array
        attachments:
          default: []
          items:
            $ref: '#/components/schemas/AttachmentSchemaOut'
          title: Attachments
          type: array
        record_status:
          allOf:
            - $ref: '#/components/schemas/RecordStatus'
          default: posted
        contract_id:
          title: Contract Id
          type:
            - integer
            - 'null'
      required:
        - date
        - company_id
        - currency_iso_4217_code
        - exchange_rate
      title: PublicCustomerCreditSchemaCreateIn
      type: object
    PublicCustomerCreditSchemaOut:
      properties:
        bill_to_address:
          deprecated: true
          description: >-
            Deprecated: send the structured billing_address / shipping_address
            instead.
          title: Bill To Address
          type: string
        ship_to_address:
          deprecated: true
          description: >-
            Deprecated: send the structured billing_address / shipping_address
            instead.
          title: Ship To Address
          type: string
        billing_address:
          anyOf:
            - $ref: '#/components/schemas/AddressSchemaOut'
            - type: 'null'
        shipping_address:
          anyOf:
            - $ref: '#/components/schemas/AddressSchemaOut'
            - type: 'null'
        customer_id:
          title: Customer Id
          type:
            - integer
            - 'null'
        customer_name:
          title: Customer Name
          type:
            - string
            - 'null'
        transaction_ids:
          items:
            type: integer
          title: Transaction Ids
          type: array
        attachments:
          default: []
          items:
            $ref: '#/components/schemas/PublicAttachmentSchemaOut'
          title: Attachments
          type: array
        custom_fields:
          default: []
          items:
            $ref: '#/components/schemas/CustomFieldValuePairOutputSchema'
          title: Custom Fields
          type: array
        integration_remote_records:
          default: []
          items:
            $ref: '#/components/schemas/IntegrationRemoteRecordSchemaOut'
          title: Integration Remote Records
          type: array
        created_by:
          anyOf:
            - $ref: '#/components/schemas/AuditActorSchemaOut'
            - type: 'null'
        updated_by:
          anyOf:
            - $ref: '#/components/schemas/AuditActorSchemaOut'
            - type: 'null'
        internal_id:
          title: Internal Id
          type: integer
        number:
          title: Number
          type: integer
        invoice_number:
          title: Invoice Number
          type:
            - integer
            - 'null'
        cash_sale_number:
          title: Cash Sale Number
          type:
            - integer
            - 'null'
        date:
          description: >-
            Posting date (GL date) - the date when the transaction is recorded
            in the general ledger
          format: date
          title: Date
          type: string
        transaction_date:
          description: >-
            Transaction date (inception date) - the date when the transaction
            actually occurred
          format: date
          title: Transaction Date
          type: string
        company_id:
          title: Company Id
          type: integer
        company_name:
          title: Company Name
          type: string
        company_currency:
          title: Company Currency
          type: string
        currency_iso_4217_code:
          anyOf:
            - $ref: '#/components/schemas/SystemCurrencies'
            - type: 'null'
        exchange_rate:
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,16}0*$
          title: Exchange Rate
          type: string
        amount:
          description: Total transaction amount
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          title: Amount
          type: string
        used_amount:
          description: >-
            Amount that was already applied to Invoices through Customer Refunds
            or Customer Prepayment Applications
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          title: Used Amount
          type: string
        remaining_amount:
          description: >-
            Amount that can be applied to Invoices through Customer Refunds or
            Customer Prepayment Applications
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          title: Remaining Amount
          type: string
        memo:
          title: Memo
          type: string
        items:
          items:
            $ref: '#/components/schemas/PublicCustomerCreditItemOut'
          title: Items
          type: array
        record_status:
          $ref: '#/components/schemas/RecordStatus'
        contract_id:
          title: Contract Id
          type:
            - integer
            - 'null'
        contracted:
          default: false
          title: Contracted
          type: boolean
        created_at:
          description: Date and time the record was created
          format: date-time
          title: Created At
          type: string
        updated_at:
          description: Date and time the record was last updated
          format: date-time
          title: Updated At
          type: string
      required:
        - bill_to_address
        - ship_to_address
        - transaction_ids
        - internal_id
        - number
        - invoice_number
        - cash_sale_number
        - date
        - transaction_date
        - company_id
        - company_name
        - company_currency
        - currency_iso_4217_code
        - exchange_rate
        - amount
        - used_amount
        - remaining_amount
        - memo
        - items
        - record_status
        - created_at
        - updated_at
      title: PublicCustomerCreditSchemaOut
      type: object
    ErrorSchema:
      properties:
        success:
          const: false
          default: false
          title: Success
          type: boolean
        errors:
          additionalProperties:
            items:
              type: string
            type: array
          title: Errors
          type: object
      required:
        - errors
      title: ErrorSchema
      type: object
    AddressSchemaIn:
      properties:
        street:
          title: Street
          type: string
        city:
          title: City
          type: string
        state:
          default: ''
          title: State
          type: string
        postal_code:
          title: Postal Code
          type: string
        country:
          anyOf:
            - const: ''
              type: string
            - $ref: '#/components/schemas/SystemCountries'
          default: ''
          title: Country
        second_line:
          default: ''
          title: Second Line
          type: string
        name:
          title: Name
          type:
            - string
            - 'null'
      required:
        - street
        - city
        - postal_code
      title: AddressSchemaIn
      type: object
    SystemCurrencies:
      enum:
        - AED
        - AFN
        - ALL
        - AMD
        - ANG
        - AOA
        - ARS
        - AUD
        - AWG
        - AZN
        - BAM
        - BBD
        - BDT
        - BGN
        - BHD
        - BIF
        - BMD
        - BND
        - BOB
        - BRL
        - BSD
        - BTN
        - BWP
        - BYN
        - BZD
        - CAD
        - CDF
        - CHF
        - CLF
        - CLP
        - CNY
        - COP
        - CRC
        - CUP
        - CVE
        - CZK
        - DJF
        - DKK
        - DOP
        - DZD
        - EGP
        - ERN
        - ETB
        - EUR
        - FJD
        - FKP
        - GBP
        - GEL
        - GHS
        - GIP
        - GMD
        - GNF
        - GTQ
        - GYD
        - HKD
        - HNL
        - HTG
        - HUF
        - IDR
        - ILS
        - INR
        - IQD
        - IRR
        - ISK
        - JMD
        - JOD
        - JPY
        - KES
        - KGS
        - KHR
        - KMF
        - KPW
        - KRW
        - KWD
        - KYD
        - KZT
        - LAK
        - LBP
        - LKR
        - LRD
        - LSL
        - LYD
        - MAD
        - MDL
        - MGA
        - MKD
        - MMK
        - MNT
        - MOP
        - MRU
        - MUR
        - MVR
        - MWK
        - MXN
        - MYR
        - MZN
        - NAD
        - NGN
        - NIO
        - NOK
        - NPR
        - NZD
        - OMR
        - PAB
        - PEN
        - PGK
        - PHP
        - PKR
        - PLN
        - PYG
        - QAR
        - RON
        - RSD
        - RUB
        - RWF
        - SAR
        - SBD
        - SCR
        - SDG
        - SEK
        - SGD
        - SHP
        - SLL
        - SOS
        - SRD
        - STN
        - SVC
        - SYP
        - SZL
        - THB
        - TJS
        - TMT
        - TND
        - TOP
        - TRY
        - TTD
        - TWD
        - TZS
        - UAH
        - UGX
        - USD
        - UYU
        - UZS
        - VES
        - VND
        - VUV
        - WST
        - XAF
        - XAG
        - XAU
        - XCD
        - XDR
        - XOF
        - XPD
        - XPF
        - XPT
        - YER
        - ZAR
        - ZMW
        - ZWL
      title: SystemCurrencies
      type: string
    PublicCustomerCreditItemIn:
      description: Input schema for customer credit item lines.
      properties:
        tax:
          anyOf:
            - $ref: '#/components/schemas/ItemTaxData'
            - type: 'null'
        id:
          title: Id
          type:
            - integer
            - 'null'
        position:
          title: Position
          type: integer
        item_id:
          title: Item Id
          type: integer
        rate:
          anyOf:
            - type: number
            - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,6}0*$
              type: string
          title: Rate
        quantity:
          anyOf:
            - type: number
            - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,6}0*$
              type: string
          title: Quantity
        memo:
          default: ''
          title: Memo
          type: string
        classifications:
          default: []
          items:
            $ref: '#/components/schemas/PublicRecordClassificationsSchemaOut'
          title: Classifications
          type: array
      required:
        - position
        - item_id
        - rate
        - quantity
      title: PublicCustomerCreditItemIn
      type: object
    AttachmentSchemaOut:
      properties:
        id:
          title: Id
          type: integer
        file_name:
          title: File Name
          type: string
        file_size:
          title: File Size
          type: integer
        download_url:
          title: Download Url
          type:
            - string
            - 'null'
        upload_url:
          title: Upload Url
          type:
            - string
            - 'null'
        category:
          default: default
          title: Category
          type: string
      required:
        - id
        - file_name
        - file_size
      title: AttachmentSchemaOut
      type: object
    RecordStatus:
      enum:
        - draft
        - posted
        - archived
      title: RecordStatus
      type: string
    AddressSchemaOut:
      properties:
        name:
          title: Name
          type:
            - string
            - 'null'
        street:
          title: Street
          type: string
        second_line:
          title: Second Line
          type: string
        city:
          title: City
          type: string
        state:
          title: State
          type: string
        postal_code:
          title: Postal Code
          type: string
        country:
          title: Country
          type: string
      required:
        - street
        - second_line
        - city
        - state
        - postal_code
        - country
      title: AddressSchemaOut
      type: object
    PublicAttachmentSchemaOut:
      properties:
        id:
          title: Id
          type: integer
        file_name:
          title: File Name
          type: string
        file_size:
          title: File Size
          type: integer
        download_url:
          title: Download Url
          type:
            - string
            - 'null'
      required:
        - id
        - file_name
        - file_size
      title: PublicAttachmentSchemaOut
      type: object
    CustomFieldValuePairOutputSchema:
      properties:
        field:
          $ref: '#/components/schemas/CustomFieldSchemaOut'
        value:
          anyOf:
            - $ref: '#/components/schemas/CustomFieldValueSchemaOut'
            - type: 'null'
      required:
        - field
      title: CustomFieldValuePairOutputSchema
      type: object
    IntegrationRemoteRecordSchemaOut:
      properties:
        transactional_date:
          title: Transactional Date
          format: date-time
          type:
            - string
            - 'null'
        external_source:
          anyOf:
            - $ref: '#/components/schemas/ExternalIntegrationSourceOut'
            - type: 'null'
        id:
          title: Id
          type: integer
        source_id:
          title: Source Id
          type: string
        connection_id:
          title: Connection Id
          type:
            - integer
            - 'null'
        integration_id:
          title: Integration Id
          type:
            - integer
            - 'null'
        integration_provider:
          anyOf:
            - $ref: '#/components/schemas/IntegrationProviderSchemaOut'
            - type: 'null'
        url:
          title: Url
          type:
            - string
            - 'null'
      required:
        - id
        - source_id
      title: IntegrationRemoteRecordSchemaOut
      type: object
    AuditActorSchemaOut:
      description: Schema for audit actor information.
      properties:
        actor_type:
          title: Actor Type
          type:
            - string
            - 'null'
        email:
          title: Email
          type:
            - string
            - 'null'
        first_name:
          title: First Name
          type:
            - string
            - 'null'
        last_name:
          title: Last Name
          type:
            - string
            - 'null'
        timestamp:
          title: Timestamp
          format: date-time
          type:
            - string
            - 'null'
      title: AuditActorSchemaOut
      type: object
    PublicCustomerCreditItemOut:
      properties:
        classifications:
          default: []
          items:
            $ref: '#/components/schemas/PublicRecordClassificationsSchemaOut'
          title: Classifications
          type: array
        item_type:
          title: Item Type
          type:
            - string
            - 'null'
        hsn_sac_code:
          title: Hsn Sac Code
          type:
            - string
            - 'null'
        tax:
          anyOf:
            - $ref: '#/components/schemas/ItemTaxDataOut'
            - type: 'null'
        item_id:
          title: Item Id
          type: integer
        quantity:
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,6}0*$
          title: Quantity
          type: string
        rate:
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,6}0*$
          title: Rate
          type: string
        position:
          title: Position
          type: integer
        memo:
          title: Memo
          type: string
        net_amount:
          description: Net amount before tax
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          readOnly: true
          title: Net Amount
          type: string
        tax_amount:
          description: Calculated tax amount
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          readOnly: true
          title: Tax Amount
          type: string
        gross_amount:
          description: Calculated total amount including tax
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          readOnly: true
          title: Gross Amount
          type: string
        amount:
          description: >-
            Calculated total amount including tax named amount for backward
            compatibility
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          readOnly: true
          title: Amount
          type: string
      required:
        - item_id
        - quantity
        - rate
        - position
        - memo
        - net_amount
        - tax_amount
        - gross_amount
        - amount
      title: PublicCustomerCreditItemOut
      type: object
    SystemCountries:
      enum:
        - AA
        - AB
        - AC
        - AD
        - AE
        - AF
        - AG
        - AH
        - AI
        - AJ
        - AK
        - AL
        - AM
        - AN
        - AO
        - AP
        - AQ
        - AR
        - AS
        - AT
        - AU
        - AV
        - AW
        - AX
        - AY
        - AZ
        - BA
        - BB
        - BC
        - BD
        - BE
        - BF
        - BG
        - BH
        - BI
        - BJ
        - BK
        - BL
        - BM
        - BN
        - BO
        - BP
        - BQ
        - BR
        - BS
        - BT
        - BU
        - BV
        - BW
        - BX
        - BY
        - BZ
        - CA
        - CB
        - CC
        - CD
        - CE
        - CF
        - CG
        - CH
        - CI
        - CJ
        - CK
        - CL
        - CM
        - CN
        - CO
        - CP
        - CQ
        - CR
        - CS
        - CT
        - CU
        - CV
        - CW
        - CX
        - CY
        - CZ
        - DA
        - DB
        - DC
        - DD
        - DE
        - DF
        - DG
        - DH
        - DI
        - DJ
        - DK
        - DL
        - DM
        - DN
        - DO
        - DP
        - DQ
        - DR
        - DS
        - DT
        - DU
        - DV
        - DW
        - DX
        - DY
        - DZ
        - EA
        - EB
        - EC
        - ED
        - EE
        - EF
        - EG
        - EH
        - EI
        - EJ
        - EK
        - EL
        - EM
        - EN
        - EO
        - EP
        - EQ
        - ER
        - ES
        - ET
        - EU
        - EV
        - EW
        - EX
        - EY
        - EZ
        - FA
        - FB
        - FC
        - FD
        - FE
        - FF
        - FG
        - FH
        - FI
        - FJ
        - FK
        - FL
        - FM
        - FN
        - FO
        - FP
        - FQ
        - FR
        - FS
        - FT
        - FU
        - FV
        - FW
        - FX
        - FY
        - FZ
        - GA
        - GB
        - GC
        - GD
        - GE
        - GF
        - GG
        - GH
        - GI
        - GJ
        - GK
        - GL
        - GM
        - GN
        - GO
        - GP
        - GQ
        - GR
        - GS
        - GT
        - GU
        - GV
        - GW
        - GX
        - GY
        - GZ
        - HA
        - HB
        - HC
        - HD
        - HE
        - HF
        - HG
        - HH
        - HI
        - HJ
        - HK
        - HL
        - HM
        - HN
        - HO
        - HP
        - HQ
        - HR
        - HS
        - HT
        - HU
        - HV
        - HW
        - HX
        - HY
        - HZ
        - IA
        - IB
        - IC
        - ID
        - IE
        - IF
        - IG
        - IH
        - II
        - IJ
        - IK
        - IL
        - IM
        - IN
        - IO
        - IP
        - IQ
        - IR
        - IS
        - IT
        - IU
        - IV
        - IW
        - IX
        - IY
        - IZ
        - JA
        - JB
        - JC
        - JD
        - JE
        - JF
        - JG
        - JH
        - JI
        - JJ
        - JK
        - JL
        - JM
        - JN
        - JO
        - JP
        - JQ
        - JR
        - JS
        - JT
        - JU
        - JV
        - JW
        - JX
        - JY
        - JZ
        - KA
        - KB
        - KC
        - KD
        - KE
        - KF
        - KG
        - KH
        - KI
        - KJ
        - KK
        - KL
        - KM
        - KN
        - KO
        - KP
        - KQ
        - KR
        - KS
        - KT
        - KU
        - KV
        - KW
        - KX
        - KY
        - KZ
        - LA
        - LB
        - LC
        - LD
        - LE
        - LF
        - LG
        - LH
        - LI
        - LJ
        - LK
        - LL
        - LM
        - LN
        - LO
        - LP
        - LQ
        - LR
        - LS
        - LT
        - LU
        - LV
        - LW
        - LX
        - LY
        - LZ
        - MA
        - MB
        - MC
        - MD
        - ME
        - MF
        - MG
        - MH
        - MI
        - MJ
        - MK
        - ML
        - MM
        - MN
        - MO
        - MP
        - MQ
        - MR
        - MS
        - MT
        - MU
        - MV
        - MW
        - MX
        - MY
        - MZ
        - NA
        - NB
        - NC
        - ND
        - NE
        - NF
        - NG
        - NH
        - NI
        - NJ
        - NK
        - NL
        - NM
        - NN
        - 'NO'
        - NP
        - NQ
        - NR
        - NS
        - NT
        - NU
        - NV
        - NW
        - NX
        - NY
        - NZ
        - OA
        - OB
        - OC
        - OD
        - OE
        - OF
        - OG
        - OH
        - OI
        - OJ
        - OK
        - OL
        - OM
        - 'ON'
        - OO
        - OP
        - OQ
        - OR
        - OS
        - OT
        - OU
        - OV
        - OW
        - OX
        - OY
        - OZ
        - PA
        - PB
        - PC
        - PD
        - PE
        - PF
        - PG
        - PH
        - PI
        - PJ
        - PK
        - PL
        - PM
        - PN
        - PO
        - PP
        - PQ
        - PR
        - PS
        - PT
        - PU
        - PV
        - PW
        - PX
        - PY
        - PZ
        - QA
        - QB
        - QC
        - QD
        - QE
        - QF
        - QG
        - QH
        - QI
        - QJ
        - QK
        - QL
        - QM
        - QN
        - QO
        - QP
        - QQ
        - QR
        - QS
        - QT
        - QU
        - QV
        - QW
        - QX
        - QY
        - QZ
        - RA
        - RB
        - RC
        - RD
        - RE
        - RF
        - RG
        - RH
        - RI
        - RJ
        - RK
        - RL
        - RM
        - RN
        - RO
        - RP
        - RQ
        - RR
        - RS
        - RT
        - RU
        - RV
        - RW
        - RX
        - RY
        - RZ
        - SA
        - SB
        - SC
        - SD
        - SE
        - SF
        - SG
        - SH
        - SI
        - SJ
        - SK
        - SL
        - SM
        - SN
        - SO
        - SP
        - SQ
        - SR
        - SS
        - ST
        - SU
        - SV
        - SW
        - SX
        - SY
        - SZ
        - TA
        - TB
        - TC
        - TD
        - TE
        - TF
        - TG
        - TH
        - TI
        - TJ
        - TK
        - TL
        - TM
        - TN
        - TO
        - TP
        - TQ
        - TR
        - TS
        - TT
        - TU
        - TV
        - TW
        - TX
        - TY
        - TZ
        - UA
        - UB
        - UC
        - UD
        - UE
        - UF
        - UG
        - UH
        - UI
        - UJ
        - UK
        - UL
        - UM
        - UN
        - UO
        - UP
        - UQ
        - UR
        - US
        - UT
        - UU
        - UV
        - UW
        - UX
        - UY
        - UZ
        - VA
        - VB
        - VC
        - VD
        - VE
        - VF
        - VG
        - VH
        - VI
        - VJ
        - VK
        - VL
        - VM
        - VN
        - VO
        - VP
        - VQ
        - VR
        - VS
        - VT
        - VU
        - VV
        - VW
        - VX
        - VY
        - VZ
        - WA
        - WB
        - WC
        - WD
        - WE
        - WF
        - WG
        - WH
        - WI
        - WJ
        - WK
        - WL
        - WM
        - WN
        - WO
        - WP
        - WQ
        - WR
        - WS
        - WT
        - WU
        - WV
        - WW
        - WX
        - WY
        - WZ
        - XA
        - XB
        - XC
        - XD
        - XE
        - XF
        - XG
        - XH
        - XI
        - XJ
        - XK
        - XL
        - XM
        - XN
        - XO
        - XP
        - XQ
        - XR
        - XS
        - XT
        - XU
        - XV
        - XW
        - XX
        - XY
        - XZ
        - YA
        - YB
        - YC
        - YD
        - YE
        - YF
        - YG
        - YH
        - YI
        - YJ
        - YK
        - YL
        - YM
        - YN
        - YO
        - YP
        - YQ
        - YR
        - YS
        - YT
        - YU
        - YV
        - YW
        - YX
        - YY
        - YZ
        - ZA
        - ZB
        - ZC
        - ZD
        - ZE
        - ZF
        - ZG
        - ZH
        - ZI
        - ZJ
        - ZK
        - ZL
        - ZM
        - ZN
        - ZO
        - ZP
        - ZQ
        - ZR
        - ZS
        - ZT
        - ZU
        - ZV
        - ZW
        - ZX
        - ZY
        - ZZ
      title: SystemCountries
      type: string
    ItemTaxData:
      properties:
        code:
          title: Code
          type: string
        rate:
          anyOf:
            - type: number
            - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,6}0*$
              type: string
          title: Rate
        amount:
          anyOf:
            - type: number
            - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
              type: string
          title: Amount
        is_taxable:
          title: Is Taxable
          type:
            - boolean
            - 'null'
        tax_exempt_amount:
          anyOf:
            - type: number
            - pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
              type: string
            - type: 'null'
          title: Tax Exempt Amount
        vat_rate_id:
          title: Vat Rate Id
          type:
            - integer
            - 'null'
        gst_tax_rate_id:
          title: Gst Tax Rate Id
          type:
            - integer
            - 'null'
      required:
        - code
        - rate
        - amount
      title: ItemTaxData
      type: object
    PublicRecordClassificationsSchemaOut:
      properties:
        id:
          title: Id
          type: integer
        name:
          title: Name
          type: string
        line_id:
          title: Line Id
          type: integer
        line_name:
          title: Line Name
          type: string
        parent_classification_id:
          title: Parent Classification Id
          type:
            - integer
            - 'null'
        parent_classification_line_id:
          title: Parent Classification Line Id
          type:
            - integer
            - 'null'
      required:
        - id
        - name
        - line_id
        - line_name
      title: PublicRecordClassificationsSchemaOut
      type: object
    CustomFieldSchemaOut:
      properties:
        id:
          title: Id
          type: integer
        company_id:
          title: Company Id
          type:
            - integer
            - 'null'
        company_ids:
          title: Company Ids
          items:
            type: integer
          type:
            - array
            - 'null'
        name:
          title: Name
          type: string
        description:
          title: Description
          type:
            - string
            - 'null'
        helper_text:
          title: Helper Text
          type:
            - string
            - 'null'
        field_type:
          $ref: '#/components/schemas/FieldType'
        applies_to:
          items:
            $ref: '#/components/schemas/AppliesToItemSchema'
          title: Applies To
          type: array
        default_value:
          anyOf:
            - type: string
            - items:
                type: string
              type: array
            - type: 'null'
          title: Default Value
        options:
          title: Options
          items:
            type: string
          type:
            - array
            - 'null'
        is_active:
          title: Is Active
          type:
            - boolean
            - 'null'
      required:
        - id
        - name
        - description
        - helper_text
        - field_type
        - applies_to
        - options
        - is_active
      title: CustomFieldSchemaOut
      type: object
    CustomFieldValueSchemaOut:
      properties:
        id:
          title: Id
          type: integer
        custom_field_id:
          title: Custom Field Id
          type: integer
        custom_field_name:
          title: Custom Field Name
          type: string
        custom_field_type:
          title: Custom Field Type
          type: string
        custom_field_value_id:
          title: Custom Field Value Id
          type: integer
        value:
          title: Value
        created_at:
          title: Created At
          type: string
        updated_at:
          title: Updated At
          type: string
      required:
        - id
        - custom_field_id
        - custom_field_name
        - custom_field_type
        - custom_field_value_id
        - value
        - created_at
        - updated_at
      title: CustomFieldValueSchemaOut
      type: object
    ExternalIntegrationSourceOut:
      properties:
        integration_type:
          anyOf:
            - $ref: '#/components/schemas/IntegrationProviderType'
            - $ref: '#/components/schemas/MigrationProviderType'
            - type: string
          title: Integration Type
        external_integration_url:
          title: External Integration Url
          type:
            - string
            - 'null'
      required:
        - integration_type
        - external_integration_url
      title: ExternalIntegrationSourceOut
      type: object
    IntegrationProviderSchemaOut:
      properties:
        id:
          title: Id
          type: integer
        name:
          title: Name
          type: string
        integration_type:
          anyOf:
            - $ref: '#/components/schemas/IntegrationProviderType'
            - type: string
          title: Integration Type
        logo_url:
          title: Logo Url
          type:
            - string
            - 'null'
        website:
          title: Website
          type:
            - string
            - 'null'
        description:
          title: Description
          type:
            - string
            - 'null'
        category:
          title: Category
          type:
            - string
            - 'null'
      required:
        - id
        - name
        - integration_type
      title: IntegrationProviderSchemaOut
      type: object
    ItemTaxDataOut:
      properties:
        code:
          title: Code
          type: string
        rate:
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,6}0*$
          title: Rate
          type: string
        amount:
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          title: Amount
          type: string
        is_taxable:
          title: Is Taxable
          type:
            - boolean
            - 'null'
        tax_exempt_amount:
          title: Tax Exempt Amount
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          type:
            - string
            - 'null'
        vat_rate_id:
          title: Vat Rate Id
          type:
            - integer
            - 'null'
        gst_tax_rate_id:
          title: Gst Tax Rate Id
          type:
            - integer
            - 'null'
        tax_components:
          title: Tax Components
          items:
            $ref: '#/components/schemas/TaxComponentSchema'
          type:
            - array
            - 'null'
        amount_with_tax:
          title: Amount With Tax
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          type:
            - string
            - 'null'
        rate_name:
          title: Rate Name
          type:
            - string
            - 'null'
        rate_type:
          title: Rate Type
          type:
            - string
            - 'null'
        tax_treatment:
          title: Tax Treatment
          type:
            - string
            - 'null'
      required:
        - code
        - rate
        - amount
      title: ItemTaxDataOut
      type: object
    FieldType:
      enum:
        - text
        - number
        - currency
        - date
        - boolean
        - single_select
        - multi_select
        - link
        - paragraph
      title: FieldType
      type: string
    AppliesToItemSchema:
      description: >-
        An entry in `applies_to` — binds a custom field to a record type with
        activation/required flags.
      properties:
        type:
          $ref: '#/components/schemas/AppliesToTypes'
        is_active:
          default: true
          title: Is Active
          type: boolean
        is_required:
          default: false
          title: Is Required
          type: boolean
      required:
        - type
      title: AppliesToItemSchema
      type: object
    IntegrationProviderType:
      enum:
        - bill_com
        - ramp
        - zoho
        - fivetran
        - stripe
        - finch
        - hubspot
        - brex
        - cubby
        - avalara
        - deel
        - tax1099
        - sitelink
        - postgresql
        - qlik
        - power_bi
        - snowflake
        - avidxchange
        - concur
        - salesforce
        - hmrc
      title: IntegrationProviderType
      type: string
    MigrationProviderType:
      enum:
        - quickbooks
        - xero
        - stripe
      title: MigrationProviderType
      type: string
    TaxComponentSchema:
      description: >-
        Per-component tax breakdown stored on line items (denormalized from
        GstTaxRateComponent).
      properties:
        component_type:
          $ref: '#/components/schemas/GstComponentType'
        rate:
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,6}0*$
          title: Rate
          type: string
        amount:
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d{0,2}0*$
          title: Amount
          type: string
        region:
          title: Region
          type:
            - string
            - 'null'
        position:
          title: Position
          type: integer
      required:
        - component_type
        - rate
        - amount
        - position
      title: TaxComponentSchema
      type: object
    AppliesToTypes:
      enum:
        - invoice
        - bill
        - direct_expense
        - journal_entry
        - vendor_prepayment
        - vendor_credit
        - vendor_payment
        - vendor_refund
        - customer_payment
        - customer_prepayment
        - customer_refund
        - customer_deposit
        - currency_revaluation
        - contract
        - fixed_asset
        - customer
        - vendor
        - company
        - sales_order
        - cash_sale
        - customer_credit
      title: AppliesToTypes
      type: string
    GstComponentType:
      enum:
        - CGST
        - SGST
        - IGST
        - CESS
        - GST
        - PST
        - HST
        - QST
      title: GstComponentType
      type: string

````