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

# Create an invoice

> Creates an invoice to bill a customer when goods or services were delivered before payment. Use a sales receipt instead if the sale was paid in full.



## OpenAPI

````yaml POST /quickbooks-desktop/invoices
openapi: 3.1.0
info:
  title: Conductor API
  version: 0.0.1
servers:
  - url: https://api.conductor.is/v1
security:
  - BearerAuth: []
paths:
  /quickbooks-desktop/invoices:
    post:
      summary: Create an invoice
      description: >-
        Creates an invoice to bill a customer when goods or services were
        delivered before payment. Use a sales receipt instead if the sale was
        paid in full.
      parameters:
        - in: header
          name: Conductor-End-User-Id
          description: The ID of the End-User to receive this request.
          schema:
            type: string
            description: The ID of the End-User to receive this request.
            example: end_usr_1234567abcdefg
            x-stainless-naming:
              typescript:
                method_argument: conductorEndUserId
              mcp:
                method_argument: conductorEndUserId
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customerId:
                  type: string
                  description: The customer or customer-job associated with this invoice.
                  example: 80000001-1234567890
                classId:
                  type: string
                  description: >-
                    The invoice's class. Classes can be used to categorize
                    objects into meaningful segments, such as department,
                    location, or type of work. In QuickBooks, class tracking is
                    off by default. A class defined here is automatically used
                    in this invoice's line items unless overridden at the line
                    item level.
                  example: 80000001-1234567890
                receivablesAccountId:
                  type: string
                  description: >-
                    The Accounts-Receivable (A/R) account to which this invoice
                    is assigned, used to track the amount owed. If not
                    specified, QuickBooks Desktop will use its default A/R
                    account.


                    **IMPORTANT**: If this invoice is linked to other
                    transactions, this A/R account must match the
                    `receivablesAccount` used in all linked transactions.
                  example: 80000001-1234567890
                documentTemplateId:
                  type: string
                  description: >-
                    The predefined template in QuickBooks that determines the
                    layout and formatting for this invoice when printed or
                    displayed.
                  example: 80000001-1234567890
                transactionDate:
                  type: string
                  format: date
                  description: The date of this invoice, in ISO 8601 format (YYYY-MM-DD).
                  example: '2024-10-01'
                refNumber:
                  type: string
                  description: >-
                    The case-sensitive user-defined reference number for this
                    invoice, which can be used to identify the transaction in
                    QuickBooks. This value is not required to be unique and can
                    be arbitrarily changed by the QuickBooks user. When left
                    blank in this create request, this field will be left blank
                    in QuickBooks (i.e., it does *not* auto-increment).
                  example: INV-1234
                billingAddress:
                  type: object
                  properties:
                    line1:
                      type: string
                      maxLength: 41
                      description: >-
                        The first line of the address (e.g., street, PO Box, or
                        company name).


                        Maximum length: 41 characters.
                      example: Conductor Labs Inc.
                    line2:
                      type: string
                      maxLength: 41
                      description: >-
                        The second line of the address, if needed (e.g.,
                        apartment, suite, unit, or building).


                        Maximum length: 41 characters.
                      example: 540 Market St.
                    line3:
                      type: string
                      maxLength: 41
                      description: |-
                        The third line of the address, if needed.

                        Maximum length: 41 characters.
                      example: Suite 100
                    line4:
                      type: string
                      maxLength: 41
                      description: |-
                        The fourth line of the address, if needed.

                        Maximum length: 41 characters.
                      example: ''
                    line5:
                      type: string
                      maxLength: 41
                      description: |-
                        The fifth line of the address, if needed.

                        Maximum length: 41 characters.
                      example: ''
                    city:
                      type: string
                      maxLength: 31
                      description: >-
                        The city, district, suburb, town, or village name of the
                        address.


                        Maximum length: 31 characters.
                      example: San Francisco
                    state:
                      type: string
                      maxLength: 21
                      description: >-
                        The state, county, province, or region name of the
                        address.


                        Maximum length: 21 characters.
                      example: CA
                    postalCode:
                      type: string
                      maxLength: 13
                      description: |-
                        The postal code or ZIP code of the address.

                        Maximum length: 13 characters.
                      example: '94110'
                    country:
                      type: string
                      description: The country name of the address.
                      example: United States
                    note:
                      type: string
                      description: >-
                        A note written at the bottom of the address in the form
                        in which it appears, such as the invoice form.
                      example: Conductor HQ
                  additionalProperties: false
                  description: The invoice's billing address.
                shippingAddress:
                  type: object
                  properties:
                    line1:
                      type: string
                      maxLength: 41
                      description: >-
                        The first line of the address (e.g., street, PO Box, or
                        company name).


                        Maximum length: 41 characters.
                      example: Conductor Labs Inc.
                    line2:
                      type: string
                      maxLength: 41
                      description: >-
                        The second line of the address, if needed (e.g.,
                        apartment, suite, unit, or building).


                        Maximum length: 41 characters.
                      example: 540 Market St.
                    line3:
                      type: string
                      maxLength: 41
                      description: |-
                        The third line of the address, if needed.

                        Maximum length: 41 characters.
                      example: Suite 100
                    line4:
                      type: string
                      maxLength: 41
                      description: |-
                        The fourth line of the address, if needed.

                        Maximum length: 41 characters.
                      example: ''
                    line5:
                      type: string
                      maxLength: 41
                      description: |-
                        The fifth line of the address, if needed.

                        Maximum length: 41 characters.
                      example: ''
                    city:
                      type: string
                      maxLength: 31
                      description: >-
                        The city, district, suburb, town, or village name of the
                        address.


                        Maximum length: 31 characters.
                      example: San Francisco
                    state:
                      type: string
                      maxLength: 21
                      description: >-
                        The state, county, province, or region name of the
                        address.


                        Maximum length: 21 characters.
                      example: CA
                    postalCode:
                      type: string
                      maxLength: 13
                      description: |-
                        The postal code or ZIP code of the address.

                        Maximum length: 13 characters.
                      example: '94110'
                    country:
                      type: string
                      description: The country name of the address.
                      example: United States
                    note:
                      type: string
                      description: >-
                        A note written at the bottom of the address in the form
                        in which it appears, such as the invoice form.
                      example: Conductor HQ
                  additionalProperties: false
                  description: The invoice's shipping address.
                isPending:
                  type: boolean
                  description: >-
                    Indicates whether this invoice has not been completed or is
                    in a draft version.
                  example: false
                isFinanceCharge:
                  type: boolean
                  description: >-
                    Whether this invoice includes a finance charge. This field
                    is immutable and can only be set during invoice creation.
                  example: true
                purchaseOrderNumber:
                  type: string
                  maxLength: 25
                  description: >-
                    The customer's Purchase Order (PO) number associated with
                    this invoice. This field is often used to cross-reference
                    the invoice with the customer's purchasing system.


                    Maximum length: 25 characters.
                  example: PO-1234
                termsId:
                  type: string
                  description: >-
                    The invoice's payment terms, defining when payment is due
                    and any applicable discounts.
                  example: 80000001-1234567890
                dueDate:
                  type: string
                  format: date
                  description: >-
                    The date by which this invoice must be paid, in ISO 8601
                    format (YYYY-MM-DD).


                    **NOTE**: If `dueDate` is excluded when creating this
                    invoice, QuickBooks might determine the due date according
                    to the terms set for this customer.
                  example: '2024-10-31'
                salesRepresentativeId:
                  type: string
                  description: >-
                    The invoice's sales representative. Sales representatives
                    can be employees, vendors, or other names in QuickBooks.
                  example: 80000001-1234567890
                shipmentOrigin:
                  type: string
                  description: >-
                    The origin location from where the product associated with
                    this invoice is shipped. This is the point at which
                    ownership and liability for goods transfer from seller to
                    buyer. Internally, QuickBooks uses the term "FOB" for this
                    field, which stands for "freight on board". This field is
                    informational and has no accounting implications.
                  example: San Francisco, CA
                shippingDate:
                  type: string
                  format: date
                  description: >-
                    The date when the products or services for this invoice were
                    shipped or are expected to be shipped, in ISO 8601 format
                    (YYYY-MM-DD).
                  example: '2024-10-01'
                shippingMethodId:
                  type: string
                  description: >-
                    The shipping method used for this invoice, such as standard
                    mail or overnight delivery.
                  example: 80000001-1234567890
                salesTaxItemId:
                  type: string
                  description: >-
                    The sales-tax item used to calculate the actual tax amount
                    for this invoice's transactions by applying a specific tax
                    rate collected for a single tax agency. Unlike
                    `salesTaxCode`, which only indicates general taxability,
                    this field drives the actual tax calculation and reporting.


                    For invoices, while using this field to specify a single tax
                    item/group that applies uniformly is recommended, complex
                    tax scenarios may require alternative approaches. In such
                    cases, you can set this field to a 0% tax item
                    (conventionally named "Tax Calculated On Invoice") and
                    handle tax calculations through line items instead. When
                    using line items for taxes, note that only individual tax
                    items (not tax groups) can be used, subtotals can help apply
                    a tax to multiple items but only the first tax line after a
                    subtotal is calculated automatically (subsequent tax lines
                    require manual amounts), and the rate column will always
                    display the actual tax amount rather than the rate
                    percentage.
                  example: 80000001-1234567890
                memo:
                  type: string
                  description: >-
                    A memo or note for this invoice that appears in reports, but
                    not on the invoice. Use `customerMessage` to add a note to
                    this invoice.
                  example: Customer requested rush delivery
                customerMessageId:
                  type: string
                  description: The message to display to the customer on the invoice.
                  example: 80000001-1234567890
                isQueuedForPrint:
                  type: boolean
                  description: >-
                    Indicates whether this invoice is included in the queue of
                    documents for QuickBooks to print.
                  example: true
                isQueuedForEmail:
                  type: boolean
                  description: >-
                    Indicates whether this invoice is included in the queue of
                    documents for QuickBooks to email to the customer.
                  example: true
                salesTaxCodeId:
                  type: string
                  description: >-
                    The sales-tax code for this invoice, determining whether it
                    is taxable or non-taxable. This can be overridden at the
                    transaction-line level.


                    Default codes include "Non" (non-taxable) and "Tax"
                    (taxable), but custom codes can also be created in
                    QuickBooks. If QuickBooks is not set up to charge sales tax
                    (via the "Do You Charge Sales Tax?" preference), it will
                    assign the default non-taxable code to all sales.
                  example: 80000001-1234567890
                otherCustomField:
                  type: string
                  description: >-
                    A built-in custom field for additional information specific
                    to this invoice. Unlike the user-defined fields in the
                    `customFields` array, this is a standard QuickBooks field
                    that exists for all invoices for convenience. Developers
                    often use this field for tracking information that doesn't
                    fit into other standard QuickBooks fields. Unlike
                    `otherCustomField1` and `otherCustomField2`, which are line
                    item fields, this exists at the transaction level. Hidden by
                    default in the QuickBooks UI.
                  example: Special handling required
                exchangeRate:
                  type: number
                  description: >-
                    The market exchange rate between this invoice's currency and
                    the home currency in QuickBooks at the time of this
                    transaction. Represented as a decimal value (e.g., 1.2345
                    for 1 EUR = 1.2345 USD if USD is the home currency).
                  example: 1.2345
                externalId:
                  type: string
                  format: uuid
                  description: >-
                    A globally unique identifier (GUID) you, the developer, can
                    provide for tracking this object in your external system.
                    This field is immutable and can only be set during object
                    creation.


                    **IMPORTANT**: This field must be formatted as a valid GUID;
                    otherwise, QuickBooks will return an error.
                  example: 12345678-abcd-1234-abcd-1234567890ab
                linkToTransactionIds:
                  type: array
                  items:
                    type: string
                  minItems: 1
                  description: >-
                    IDs of existing transactions that you wish to link to this
                    invoice, such as payments applied, credits used, or
                    associated purchase orders. Note that this links entire
                    transactions, not individual transaction lines. If you want
                    to link individual lines in a transaction, instead use the
                    field `linkToTransactionLine` on this invoice's lines, if
                    available.


                    Transactions can only be linked when creating this invoice
                    and cannot be unlinked later.


                    You can use both `linkToTransactionIds` (on this invoice)
                    and `linkToTransactionLine` (on its transaction lines) as
                    long as they do NOT link to the same transaction (otherwise,
                    QuickBooks will return an error). QuickBooks will also
                    return an error if you attempt to link a transaction that is
                    empty or already closed.


                    **IMPORTANT**: By default, QuickBooks will not return any
                    information about the linked transactions in this endpoint's
                    response even when this request is successful. To see the
                    transactions linked via this field, refetch the invoice and
                    check the `linkedTransactions` response field. If fetching a
                    list of invoices, you must also specify the parameter
                    `includeLinkedTransactions=true` to see the
                    `linkedTransactions` response field.
                applyCredits:
                  type: array
                  items:
                    type: object
                    properties:
                      creditTransactionId:
                        type: string
                        description: >-
                          The unique identifier of the credit transaction
                          (credit memo or vendor credit) to apply to this
                          transaction.
                        example: ABCDEF-1234567890
                      appliedAmount:
                        type: string
                        description: >-
                          The amount of credit applied to this transaction. This
                          could include customer deposits, payments, or credits.
                          Represented as a decimal string.
                        example: '100.00'
                      overrideCreditApplication:
                        type: boolean
                        description: Indicates whether to override the credit.
                        example: false
                        default: false
                    required:
                      - creditTransactionId
                      - appliedAmount
                    additionalProperties: false
                  minItems: 1
                  description: >-
                    Credit memos to apply to this invoice, reducing its balance.
                    This creates a link between this invoice and the specified
                    credit memos.


                    **IMPORTANT**: By default, QuickBooks will not return any
                    information about the linked transactions in this endpoint's
                    response even when this request is successful. To see the
                    transactions linked via this field, refetch the invoice and
                    check the `linkedTransactions` response field. If fetching a
                    list of invoices, you must also specify the parameter
                    `includeLinkedTransactions=true` to see the
                    `linkedTransactions` response field.
                lines:
                  type: array
                  items:
                    type: object
                    properties:
                      itemId:
                        type: string
                        description: >-
                          The item associated with this invoice line. This can
                          refer to any good or service that the business buys or
                          sells, including item types such as a service item,
                          inventory item, or special calculation item like a
                          discount item or sales-tax item.
                        example: 80000001-1234567890
                      description:
                        type: string
                        description: A description of this invoice line.
                        example: High-quality widget with custom engraving
                      quantity:
                        type: number
                        description: >-
                          The quantity of the item associated with this invoice
                          line. This field cannot be cleared.


                          **NOTE**: Do not use this field if the associated item
                          is a discount item.
                        example: 5
                      unitOfMeasure:
                        type: string
                        description: >-
                          The unit-of-measure used for the `quantity` in this
                          invoice line. Must be a valid unit within the item's
                          available units of measure.
                        example: Each
                      rate:
                        type: string
                        description: >-
                          The price per unit for this invoice line. If both
                          `rate` and `amount` are specified, `rate` will be
                          ignored. If both `quantity` and `amount` are specified
                          but not `rate`, QuickBooks will use them to calculate
                          `rate`. Represented as a decimal string. This field
                          cannot be cleared.
                        example: '10.00'
                      ratePercent:
                        type: string
                        description: >-
                          The price of this invoice line expressed as a
                          percentage. Typically used for discount or markup
                          items.
                        example: '10.5'
                      priceLevelId:
                        type: string
                        description: >-
                          The price level applied to this invoice line. This
                          overrides any price level set on the corresponding
                          customer. The resulting invoice line will not show
                          this price level, only the final `rate` calculated
                          from it.
                        example: 80000001-1234567890
                      classId:
                        type: string
                        description: >-
                          The invoice line's class. Classes can be used to
                          categorize objects into meaningful segments, such as
                          department, location, or type of work. In QuickBooks,
                          class tracking is off by default. If a class is
                          specified for the entire parent transaction, it is
                          automatically applied to all invoice lines unless
                          overridden here, at the transaction line level.
                        example: 80000001-1234567890
                      amount:
                        type: string
                        description: >-
                          The monetary amount of this invoice line, represented
                          as a decimal string. If both `quantity` and `rate` are
                          specified but not `amount`, QuickBooks will use them
                          to calculate `amount`. If `amount`, `rate`, and
                          `quantity` are all unspecified, then QuickBooks will
                          calculate `amount` based on a `quantity` of `1` and
                          the suggested `rate`. This field cannot be cleared.
                        example: '1000.00'
                      priceRuleConflictStrategy:
                        type: string
                        enum:
                          - base_price
                          - zero
                        description: >-
                          Specifies how to resolve price rule conflicts when
                          adding or modifying this invoice line.
                        example: base_price
                      inventorySiteId:
                        type: string
                        description: >-
                          The site location where inventory for the item
                          associated with this invoice line is stored.
                        example: 80000001-1234567890
                      inventorySiteLocationId:
                        type: string
                        description: >-
                          The specific location (e.g., bin or shelf) within the
                          inventory site where the item associated with this
                          invoice line is stored.
                        example: 80000001-1234567890
                      serialNumber:
                        type: string
                        description: >-
                          The serial number of the item associated with this
                          invoice line. This is used for tracking individual
                          units of serialized inventory items.
                        example: SN1234567890
                      lotNumber:
                        type: string
                        description: >-
                          The lot number of the item associated with this
                          invoice line. Used for tracking groups of inventory
                          items that are purchased or manufactured together.
                        example: LOT2023-001
                      serviceDate:
                        type: string
                        format: date
                        description: >-
                          The date on which the service for this invoice line
                          was or will be performed, in ISO 8601 format
                          (YYYY-MM-DD). This is particularly relevant for
                          service items.
                        example: '2024-03-15'
                      salesTaxCodeId:
                        type: string
                        description: >-
                          The sales-tax code for this invoice line, determining
                          whether it is taxable or non-taxable. If set, this
                          overrides any sales-tax codes defined on the parent
                          transaction or the associated item.


                          Default codes include "Non" (non-taxable) and "Tax"
                          (taxable), but custom codes can also be created in
                          QuickBooks. If QuickBooks is not set up to charge
                          sales tax (via the "Do You Charge Sales Tax?"
                          preference), it will assign the default non-taxable
                          code to all sales.
                        example: 80000001-1234567890
                      overrideItemAccountId:
                        type: string
                        description: >-
                          The account to use for this invoice line, overriding
                          the default account associated with the item.
                        example: 80000001-1234567890
                      otherCustomField1:
                        type: string
                        description: >-
                          A built-in custom field for additional information
                          specific to this invoice line. Unlike the user-defined
                          fields in the `customFields` array, this is a standard
                          QuickBooks field that exists for all invoice lines for
                          convenience. Developers often use this field for
                          tracking information that doesn't fit into other
                          standard QuickBooks fields. Hidden by default in the
                          QuickBooks UI.
                        example: Special handling required
                      otherCustomField2:
                        type: string
                        description: >-
                          A second built-in custom field for additional
                          information specific to this invoice line. Unlike the
                          user-defined fields in the `customFields` array, this
                          is a standard QuickBooks field that exists for all
                          invoice lines for convenience. Like
                          `otherCustomField1`, developers often use this field
                          for tracking information that doesn't fit into other
                          standard QuickBooks fields. Hidden by default in the
                          QuickBooks UI.
                        example: Always ship with a spare
                      linkToTransactionLine:
                        type: object
                        properties:
                          transactionId:
                            type: string
                            description: >-
                              The ID of the transaction to which to link this
                              transaction.
                            example: 123ABC-1234567890
                          transactionLineId:
                            type: string
                            description: >-
                              The ID of the transaction line to which to link
                              this transaction.
                            example: 456DEF-1234567890
                        required:
                          - transactionId
                          - transactionLineId
                        additionalProperties: false
                        description: >-
                          An existing transaction line that you wish to link to
                          this invoice line. Note that this only links to a
                          single transaction line item, not an entire
                          transaction. If you want to link an entire transaction
                          and bring in all its lines, instead use the field
                          `linkToTransactionIds` on the parent transaction, if
                          available. For invoice lines, you can only link to
                          sales orders; QuickBooks does not support linking
                          invoice lines to other transaction types.


                          Transaction lines can only be linked when creating
                          this invoice line and cannot be unlinked later.


                          **IMPORTANT**: If you use `linkToTransactionLine` on
                          this invoice line, you cannot use the field `item` on
                          this line (QuickBooks will return an error) because
                          this field brings in all of the item information you
                          need. You can, however, specify whatever `quantity` or
                          `rate` that you want, or any other transaction line
                          element other than `item`.


                          If the parent transaction supports the
                          `linkToTransactionIds` field, you can use both
                          `linkToTransactionLine` (on this invoice line) and
                          `linkToTransactionIds` (on its parent transaction) in
                          the same request as long as they do NOT link to the
                          same transaction (otherwise, QuickBooks will return an
                          error). QuickBooks will also return an error if you
                          attempt to link a transaction that is empty or already
                          closed.


                          **IMPORTANT**: By default, QuickBooks will not return
                          any information about the linked transaction line in
                          this endpoint's response even when this request is
                          successful. To see the transaction line linked via
                          this field, refetch the parent invoice and check the
                          `linkedTransactions` response field. If fetching a
                          list of invoices, you must also specify the parameter
                          `includeLinkedTransactions=true` to see the
                          `linkedTransactions` response field.
                      customFields:
                        type: array
                        items:
                          type: object
                          properties:
                            ownerId:
                              type: string
                              description: >-
                                The identifier of the owner of the custom field,
                                which QuickBooks internally calls a "data
                                extension". For public custom fields visible in
                                the UI, such as those added by the QuickBooks
                                user, this is always "0". For private custom
                                fields that are only visible to the application
                                that created them, this is a valid GUID
                                identifying the owning application. Internally,
                                Conductor always fetches all public custom
                                fields (those with an `ownerId` of "0") for all
                                objects.
                              example: '0'
                            name:
                              type: string
                              description: >-
                                The name of the custom field, unique for the
                                specified `ownerId`. For public custom fields,
                                this name is visible as a label in the
                                QuickBooks UI.
                              example: Customer Rating
                            value:
                              type: string
                              description: >-
                                The value of this custom field. The maximum
                                length depends on the field's data type.
                              example: Premium
                          required:
                            - ownerId
                            - name
                            - value
                          additionalProperties: false
                        minItems: 1
                        description: >-
                          The custom fields for the invoice line object, added
                          as user-defined data extensions, not included in the
                          standard QuickBooks object.
                    additionalProperties: false
                  minItems: 1
                  description: >-
                    The invoice's line items, each representing a single product
                    or service sold.
                lineGroups:
                  type: array
                  items:
                    type: object
                    properties:
                      itemGroupId:
                        type: string
                        description: >-
                          The invoice line group's item group, representing a
                          predefined set of items bundled because they are
                          commonly purchased together or grouped for faster
                          entry.
                        example: 80000001-1234567890
                      quantity:
                        type: number
                        description: >-
                          The quantity of the item group associated with this
                          invoice line group. This field cannot be cleared.


                          **NOTE**: Do not use this field if the associated item
                          group is a discount item group.
                        example: 5
                      unitOfMeasure:
                        type: string
                        description: >-
                          The unit-of-measure used for the `quantity` in this
                          invoice line group. Must be a valid unit within the
                          item's available units of measure.
                        example: Each
                      serviceDate:
                        type: string
                        format: date
                        description: >-
                          The date on which the service for this invoice line
                          group was or will be performed, in ISO 8601 format
                          (YYYY-MM-DD). This is particularly relevant for
                          service items.
                        example: '2024-03-15'
                      inventorySiteId:
                        type: string
                        description: >-
                          The site location where inventory for the item group
                          associated with this invoice line group is stored.
                        example: 80000001-1234567890
                      inventorySiteLocationId:
                        type: string
                        description: >-
                          The specific location (e.g., bin or shelf) within the
                          inventory site where the item group associated with
                          this invoice line group is stored.
                        example: 80000001-1234567890
                      customFields:
                        type: array
                        items:
                          type: object
                          properties:
                            ownerId:
                              type: string
                              description: >-
                                The identifier of the owner of the custom field,
                                which QuickBooks internally calls a "data
                                extension". For public custom fields visible in
                                the UI, such as those added by the QuickBooks
                                user, this is always "0". For private custom
                                fields that are only visible to the application
                                that created them, this is a valid GUID
                                identifying the owning application. Internally,
                                Conductor always fetches all public custom
                                fields (those with an `ownerId` of "0") for all
                                objects.
                              example: '0'
                            name:
                              type: string
                              description: >-
                                The name of the custom field, unique for the
                                specified `ownerId`. For public custom fields,
                                this name is visible as a label in the
                                QuickBooks UI.
                              example: Customer Rating
                            value:
                              type: string
                              description: >-
                                The value of this custom field. The maximum
                                length depends on the field's data type.
                              example: Premium
                          required:
                            - ownerId
                            - name
                            - value
                          additionalProperties: false
                        minItems: 1
                        description: >-
                          The custom fields for the invoice line group object,
                          added as user-defined data extensions, not included in
                          the standard QuickBooks object.
                    required:
                      - itemGroupId
                    additionalProperties: false
                  minItems: 1
                  description: >-
                    The invoice's line item groups, each representing a
                    predefined set of related items.
              required:
                - customerId
                - transactionDate
              additionalProperties: false
      responses:
        '200':
          description: Returns the newly created invoice.
          headers:
            Conductor-Request-Id:
              schema:
                type: string
                description: The unique identifier for this API request.
                example: req_1234567abcdefg
              required: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/qbd_invoice'
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Conductor from 'conductor-node';

            const conductor = new Conductor({
              apiKey: process.env['CONDUCTOR_SECRET_KEY'], // This is the default and can be omitted
            });

            const invoice = await conductor.qbd.invoices.create({
              customerId: '80000001-1234567890',
              transactionDate: '2024-10-01',
              conductorEndUserId: 'end_usr_1234567abcdefg',
            });

            console.log(invoice.id);
        - lang: Python
          source: |-
            import os
            from datetime import date
            from conductor import Conductor

            conductor = Conductor(
                api_key=os.environ.get("CONDUCTOR_SECRET_KEY"),  # This is the default and can be omitted
            )
            invoice = conductor.qbd.invoices.create(
                customer_id="80000001-1234567890",
                transaction_date=date.fromisoformat("2024-10-01"),
                conductor_end_user_id="end_usr_1234567abcdefg",
            )
            print(invoice.id)
components:
  schemas:
    qbd_invoice:
      type: object
      properties:
        id:
          type: string
          description: >-
            The unique identifier assigned by QuickBooks to this invoice. This
            ID is unique across all transaction types.
          example: 123ABC-1234567890
        objectType:
          type: string
          const: qbd_invoice
          description: The type of object. This value is always `"qbd_invoice"`.
          example: qbd_invoice
        createdAt:
          type: string
          description: >-
            The date and time when this invoice was created, in ISO 8601 format
            (YYYY-MM-DDThh:mm:ss±hh:mm), which QuickBooks Desktop interprets in
            the local timezone of the end-user's computer.
          example: '2025-01-01T12:34:56.000Z'
        updatedAt:
          type: string
          description: >-
            The date and time when this invoice was last updated, in ISO 8601
            format (YYYY-MM-DDThh:mm:ss±hh:mm), which QuickBooks Desktop
            interprets in the local timezone of the end-user's computer.
          example: '2025-02-01T12:34:56.000Z'
        revisionNumber:
          type: string
          description: >-
            The current QuickBooks-assigned revision number of this invoice
            object, which changes each time the object is modified. When
            updating this object, you must provide the most recent
            `revisionNumber` to ensure you're working with the latest data;
            otherwise, the update will return an error.
          example: '1721172183'
        customer:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: The customer or customer-job associated with this invoice.
          example:
            id: 80000001-1234567890
            fullName: Acme Corporation
        class:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The invoice's class. Classes can be used to categorize objects into
            meaningful segments, such as department, location, or type of work.
            In QuickBooks, class tracking is off by default. A class defined
            here is automatically used in this invoice's line items unless
            overridden at the line item level.
          example:
            id: 80000001-1234567890
            fullName: Construction
        receivablesAccount:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The Accounts-Receivable (A/R) account to which this invoice is
            assigned, used to track the amount owed. If not specified,
            QuickBooks Desktop will use its default A/R account.


            **IMPORTANT**: If this invoice is linked to other transactions, this
            A/R account must match the `receivablesAccount` used in all linked
            transactions.
          example:
            id: 80000001-1234567890
            fullName: Accounts-Receivable
        documentTemplate:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The predefined template in QuickBooks that determines the layout and
            formatting for this invoice when printed or displayed.
          example:
            id: 80000001-1234567890
            fullName: Invoice Template
        transactionDate:
          type: string
          format: date
          description: The date of this invoice, in ISO 8601 format (YYYY-MM-DD).
          example: '2024-10-01'
        refNumber:
          type:
            - string
            - 'null'
          description: >-
            The case-sensitive user-defined reference number for this invoice,
            which can be used to identify the transaction in QuickBooks. This
            value is not required to be unique and can be arbitrarily changed by
            the QuickBooks user.
          example: INV-1234
        billingAddress:
          oneOf:
            - $ref: '#/components/schemas/qbd_address'
            - type: 'null'
          description: The invoice's billing address.
        shippingAddress:
          oneOf:
            - $ref: '#/components/schemas/qbd_address'
            - type: 'null'
          description: The invoice's shipping address.
        isPending:
          type:
            - boolean
            - 'null'
          description: >-
            Indicates whether this invoice has not been completed or is in a
            draft version.
          example: false
        isFinanceCharge:
          type:
            - boolean
            - 'null'
          description: >-
            Whether this invoice includes a finance charge. This field is
            immutable and can only be set during invoice creation.
          example: true
        purchaseOrderNumber:
          type:
            - string
            - 'null'
          description: >-
            The customer's Purchase Order (PO) number associated with this
            invoice. This field is often used to cross-reference the invoice
            with the customer's purchasing system.
          example: PO-1234
        terms:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The invoice's payment terms, defining when payment is due and any
            applicable discounts.
          example:
            id: 80000001-1234567890
            fullName: Net 30
        dueDate:
          type:
            - string
            - 'null'
          format: date
          description: >-
            The date by which this invoice must be paid, in ISO 8601 format
            (YYYY-MM-DD).
          example: '2024-10-31'
        salesRepresentative:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The invoice's sales representative. Sales representatives can be
            employees, vendors, or other names in QuickBooks.
          example:
            id: 80000001-1234567890
            fullName: Jane Doe
        shipmentOrigin:
          type:
            - string
            - 'null'
          description: >-
            The origin location from where the product associated with this
            invoice is shipped. This is the point at which ownership and
            liability for goods transfer from seller to buyer. Internally,
            QuickBooks uses the term "FOB" for this field, which stands for
            "freight on board". This field is informational and has no
            accounting implications.
          example: San Francisco, CA
        shippingDate:
          type:
            - string
            - 'null'
          format: date
          description: >-
            The date when the products or services for this invoice were shipped
            or are expected to be shipped, in ISO 8601 format (YYYY-MM-DD).
          example: '2024-10-01'
        shippingMethod:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The shipping method used for this invoice, such as standard mail or
            overnight delivery.
          example:
            id: 80000001-1234567890
            fullName: FedEx Ground
        subtotal:
          type: string
          description: >-
            The subtotal of this invoice, which is the sum of all invoice lines
            before taxes and payments are applied, represented as a decimal
            string.
          example: '1000.00'
        salesTaxItem:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The sales-tax item used to calculate the actual tax amount for this
            invoice's transactions by applying a specific tax rate collected for
            a single tax agency. Unlike `salesTaxCode`, which only indicates
            general taxability, this field drives the actual tax calculation and
            reporting.


            For invoices, while using this field to specify a single tax
            item/group that applies uniformly is recommended, complex tax
            scenarios may require alternative approaches. In such cases, you can
            set this field to a 0% tax item (conventionally named "Tax
            Calculated On Invoice") and handle tax calculations through line
            items instead. When using line items for taxes, note that only
            individual tax items (not tax groups) can be used, subtotals can
            help apply a tax to multiple items but only the first tax line after
            a subtotal is calculated automatically (subsequent tax lines require
            manual amounts), and the rate column will always display the actual
            tax amount rather than the rate percentage.
          example:
            id: 80000001-1234567890
            fullName: State Sales Tax
        salesTaxPercentage:
          type:
            - string
            - 'null'
          description: >-
            The sales tax percentage applied to this invoice, represented as a
            decimal string.
          example: '0.07'
        salesTaxTotal:
          type:
            - string
            - 'null'
          description: >-
            The total amount of sales tax charged for this invoice, represented
            as a decimal string.
          example: '10.00'
        appliedAmount:
          type:
            - string
            - 'null'
          description: >-
            The amount of credit applied to this invoice. This could include
            customer deposits, payments, or credits. Represented as a decimal
            string.
          example: '100.00'
        balanceRemaining:
          type:
            - string
            - 'null'
          description: >-
            The outstanding balance of this invoice after applying any credits
            or payments. Calculated as `subtotal` + `salesTaxTotal` -
            `appliedAmount`. Represented as a decimal string.
          example: '100.00'
        currency:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The invoice's currency. For built-in currencies, the name and code
            are standard ISO 4217 international values. For user-defined
            currencies, all values are editable.
          example:
            id: 80000001-1234567890
            fullName: USD
        exchangeRate:
          type:
            - number
            - 'null'
          description: >-
            The market exchange rate between this invoice's currency and the
            home currency in QuickBooks at the time of this transaction.
            Represented as a decimal value (e.g., 1.2345 for 1 EUR = 1.2345 USD
            if USD is the home currency).
          example: 1.2345
        balanceRemainingInHomeCurrency:
          type:
            - string
            - 'null'
          description: >-
            The outstanding balance of this invoice converted to the home
            currency of the QuickBooks company file. Represented as a decimal
            string.
          example: '100.00'
        memo:
          type:
            - string
            - 'null'
          description: >-
            A memo or note for this invoice that appears in reports, but not on
            the invoice. Use `customerMessage` to add a note to this invoice.
          example: Customer requested rush delivery
        isPaid:
          type:
            - boolean
            - 'null'
          description: >-
            Indicates whether this invoice has been paid in full. When `true`,
            `openAmount` will be 0.
          example: false
        customerMessage:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: The message to display to the customer on the invoice.
          example:
            id: 80000001-1234567890
            fullName: Thank you for your business!
        isQueuedForPrint:
          type:
            - boolean
            - 'null'
          description: >-
            Indicates whether this invoice is included in the queue of documents
            for QuickBooks to print.
          example: true
        isQueuedForEmail:
          type:
            - boolean
            - 'null'
          description: >-
            Indicates whether this invoice is included in the queue of documents
            for QuickBooks to email to the customer.
          example: true
        salesTaxCode:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The sales-tax code for this invoice, determining whether it is
            taxable or non-taxable. This can be overridden at the
            transaction-line level.


            Default codes include "Non" (non-taxable) and "Tax" (taxable), but
            custom codes can also be created in QuickBooks. If QuickBooks is not
            set up to charge sales tax (via the "Do You Charge Sales Tax?"
            preference), it will assign the default non-taxable code to all
            sales.
          example:
            id: 80000001-1234567890
            fullName: Non
        suggestedDiscountAmount:
          type:
            - string
            - 'null'
          description: >-
            The suggested discount amount for this invoice, represented as a
            decimal string.
          example: '10.00'
        suggestedDiscountDate:
          type:
            - string
            - 'null'
          format: date
          description: >-
            The date when the `suggestedDiscountAmount` for this invoice would
            apply, in ISO 8601 format (YYYY-MM-DD).
          example: '2024-01-01'
        otherCustomField:
          type:
            - string
            - 'null'
          description: >-
            A built-in custom field for additional information specific to this
            invoice. Unlike the user-defined fields in the `customFields` array,
            this is a standard QuickBooks field that exists for all invoices for
            convenience. Developers often use this field for tracking
            information that doesn't fit into other standard QuickBooks fields.
            Unlike `otherCustomField1` and `otherCustomField2`, which are line
            item fields, this exists at the transaction level. Hidden by default
            in the QuickBooks UI.
          example: Special handling required
        externalId:
          type:
            - string
            - 'null'
          description: >-
            A globally unique identifier (GUID) you, the developer, can provide
            for tracking this object in your external system. This field is
            immutable and can only be set during object creation.
          example: 12345678-abcd-1234-abcd-1234567890ab
        linkedTransactions:
          type: array
          items:
            $ref: '#/components/schemas/qbd_linked_transaction'
          description: >-
            The invoice's linked transactions, such as payments applied, credits
            used, or associated purchase orders.


            **IMPORTANT**: You must specify the parameter
            `includeLinkedTransactions` when fetching a list of invoices to
            receive this field because it is not returned by default.
        lines:
          type: array
          items:
            $ref: '#/components/schemas/qbd_invoice_line'
          description: >-
            The invoice's line items, each representing a single product or
            service sold.
        lineGroups:
          type: array
          items:
            $ref: '#/components/schemas/qbd_invoice_line_group'
          description: >-
            The invoice's line item groups, each representing a predefined set
            of related items.
        customFields:
          type: array
          items:
            $ref: '#/components/schemas/qbd_custom_field'
          description: >-
            The custom fields for the invoice object, added as user-defined data
            extensions, not included in the standard QuickBooks object.
      required:
        - id
        - objectType
        - createdAt
        - updatedAt
        - revisionNumber
        - customer
        - class
        - receivablesAccount
        - documentTemplate
        - transactionDate
        - refNumber
        - billingAddress
        - shippingAddress
        - isPending
        - isFinanceCharge
        - purchaseOrderNumber
        - terms
        - dueDate
        - salesRepresentative
        - shipmentOrigin
        - shippingDate
        - shippingMethod
        - subtotal
        - salesTaxItem
        - salesTaxPercentage
        - salesTaxTotal
        - appliedAmount
        - balanceRemaining
        - currency
        - exchangeRate
        - balanceRemainingInHomeCurrency
        - memo
        - isPaid
        - customerMessage
        - isQueuedForPrint
        - isQueuedForEmail
        - salesTaxCode
        - suggestedDiscountAmount
        - suggestedDiscountDate
        - otherCustomField
        - externalId
        - linkedTransactions
        - lines
        - lineGroups
        - customFields
      additionalProperties: false
      title: The Invoice object
      x-conductor-object-type: transaction
      summary: >-
        An invoice is a commercial document issued to customers that itemizes
        and records a transaction between buyer and seller. It lists the
        products or services provided, their quantities, prices, payment terms,
        and the total amount due. In QuickBooks, invoices are used to track
        accounts receivable and record sales transactions where payment was not
        made in full at the time of purchase.
    qbd_address:
      type: object
      properties:
        line1:
          type:
            - string
            - 'null'
          description: >-
            The first line of the address (e.g., street, PO Box, or company
            name).
          example: Conductor Labs Inc.
        line2:
          type:
            - string
            - 'null'
          description: >-
            The second line of the address, if needed (e.g., apartment, suite,
            unit, or building).
          example: 540 Market St.
        line3:
          type:
            - string
            - 'null'
          description: The third line of the address, if needed.
          example: Suite 100
        line4:
          type:
            - string
            - 'null'
          description: The fourth line of the address, if needed.
          example: ''
        line5:
          type:
            - string
            - 'null'
          description: The fifth line of the address, if needed.
          example: ''
        city:
          type:
            - string
            - 'null'
          description: The city, district, suburb, town, or village name of the address.
          example: San Francisco
        state:
          type:
            - string
            - 'null'
          description: The state, county, province, or region name of the address.
          example: CA
        postalCode:
          type:
            - string
            - 'null'
          description: The postal code or ZIP code of the address.
          example: '94110'
        country:
          type:
            - string
            - 'null'
          description: The country name of the address.
          example: United States
        note:
          type:
            - string
            - 'null'
          description: >-
            A note written at the bottom of the address in the form in which it
            appears, such as the invoice form.
          example: Conductor HQ
      required:
        - line1
        - line2
        - line3
        - line4
        - line5
        - city
        - state
        - postalCode
        - country
        - note
      additionalProperties: false
      title: The Address object
      x-conductor-object-type: nested
    qbd_linked_transaction:
      type: object
      properties:
        id:
          type: string
          description: >-
            The unique identifier assigned by QuickBooks to this linked
            transaction. This ID is unique across all transaction types.
          example: 123ABC-1234567890
        objectType:
          type: string
          const: qbd_linked_transaction
          description: The type of object. This value is always `"qbd_linked_transaction"`.
          example: qbd_linked_transaction
        transactionType:
          type: string
          enum:
            - ar_refund_credit_card
            - bill
            - bill_payment_check
            - bill_payment_credit_card
            - build_assembly
            - charge
            - check
            - credit_card_charge
            - credit_card_credit
            - credit_memo
            - deposit
            - estimate
            - inventory_adjustment
            - invoice
            - item_receipt
            - journal_entry
            - liability_adjustment
            - paycheck
            - payroll_liability_check
            - purchase_order
            - receive_payment
            - sales_order
            - sales_receipt
            - sales_tax_payment_check
            - transfer
            - vendor_credit
            - ytd_adjustment
            - unknown
          description: The type of transaction for this linked transaction.
          example: invoice
        transactionDate:
          type: string
          format: date
          description: >-
            The date of this linked transaction, in ISO 8601 format
            (YYYY-MM-DD).
          example: '2024-10-01'
        refNumber:
          type:
            - string
            - 'null'
          description: >-
            The case-sensitive user-defined reference number for this linked
            transaction, which can be used to identify the transaction in
            QuickBooks. This value is not required to be unique and can be
            arbitrarily changed by the QuickBooks user.
          example: LINK-1234
        linkType:
          type:
            - string
            - 'null'
          enum:
            - amount
            - quantity
            - null
          description: >-
            Indicates the nature of the link between the transactions: `amount`
            denotes an amount-based link (e.g., an invoice linked to a payment),
            and `quantity` denotes a quantity-based link (e.g., an invoice
            created from a sales order based on the quantity of items received).
          example: amount
        amount:
          type:
            - string
            - 'null'
          description: >-
            The monetary amount of this linked transaction, represented as a
            decimal string.
          example: '1000.00'
      required:
        - id
        - objectType
        - transactionType
        - transactionDate
        - refNumber
        - linkType
        - amount
      additionalProperties: false
      title: The Linked Transaction object
      x-conductor-object-type: nested
    qbd_invoice_line:
      type: object
      properties:
        id:
          type: string
          description: >-
            The unique identifier assigned by QuickBooks to this invoice line.
            This ID is unique across all transaction line types.
          example: 456DEF-1234567890
        objectType:
          type: string
          const: qbd_invoice_line
          description: The type of object. This value is always `"qbd_invoice_line"`.
          example: qbd_invoice_line
        item:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The item associated with this invoice line. This can refer to any
            good or service that the business buys or sells, including item
            types such as a service item, inventory item, or special calculation
            item like a discount item or sales-tax item.
          example:
            id: 80000001-1234567890
            fullName: Widget A
        description:
          type:
            - string
            - 'null'
          description: A description of this invoice line.
          example: High-quality widget with custom engraving
        quantity:
          type:
            - number
            - 'null'
          description: >-
            The quantity of the item associated with this invoice line. This
            field cannot be cleared.


            **NOTE**: Do not use this field if the associated item is a discount
            item.
          example: 5
        unitOfMeasure:
          type:
            - string
            - 'null'
          description: >-
            The unit-of-measure used for the `quantity` in this invoice line.
            Must be a valid unit within the item's available units of measure.
          example: Each
        overrideUnitOfMeasureSet:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            Specifies an alternative unit-of-measure set when updating this
            invoice line's `unitOfMeasure` field (e.g., "pound" or "kilogram").
            This allows you to select units from a different set than the item's
            default unit-of-measure set, which remains unchanged on the item
            itself. The override applies only to this specific line. For
            example, you can sell an item typically measured in volume units
            using weight units in a specific transaction by specifying a
            different unit-of-measure set with this field.
          example:
            id: 80000001-1234567890
            fullName: Volume Units
        rate:
          type:
            - string
            - 'null'
          description: >-
            The price per unit for this invoice line. If both `rate` and
            `amount` are specified, `rate` will be ignored. If both `quantity`
            and `amount` are specified but not `rate`, QuickBooks will use them
            to calculate `rate`. Represented as a decimal string. This field
            cannot be cleared.
          example: '10.00'
        ratePercent:
          type:
            - string
            - 'null'
          description: >-
            The price of this invoice line expressed as a percentage. Typically
            used for discount or markup items.
          example: '10.5'
        class:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The invoice line's class. Classes can be used to categorize objects
            into meaningful segments, such as department, location, or type of
            work. In QuickBooks, class tracking is off by default. If a class is
            specified for the entire parent transaction, it is automatically
            applied to all invoice lines unless overridden here, at the
            transaction line level.
          example:
            id: 80000001-1234567890
            fullName: Installation:Residential
        amount:
          type:
            - string
            - 'null'
          description: >-
            The monetary amount of this invoice line, represented as a decimal
            string. If both `quantity` and `rate` are specified but not
            `amount`, QuickBooks will use them to calculate `amount`. If
            `amount`, `rate`, and `quantity` are all unspecified, then
            QuickBooks will calculate `amount` based on a `quantity` of `1` and
            the suggested `rate`. This field cannot be cleared.
          example: '1000.00'
        inventorySite:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The site location where inventory for the item associated with this
            invoice line is stored.
          example:
            id: 80000001-1234567890
            fullName: Main Warehouse
        inventorySiteLocation:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The specific location (e.g., bin or shelf) within the inventory site
            where the item associated with this invoice line is stored.
          example:
            id: 80000001-1234567890
            fullName: Aisle 3, Shelf B
        serialNumber:
          type:
            - string
            - 'null'
          description: >-
            The serial number of the item associated with this invoice line.
            This is used for tracking individual units of serialized inventory
            items.
          example: SN1234567890
        lotNumber:
          type:
            - string
            - 'null'
          description: >-
            The lot number of the item associated with this invoice line. Used
            for tracking groups of inventory items that are purchased or
            manufactured together.
          example: LOT2023-001
        expirationDate:
          type:
            - string
            - 'null'
          format: date
          description: >-
            The expiration date for the serial number or lot number of the item
            associated with this invoice line, in ISO 8601 format (YYYY-MM-DD).
            This is particularly relevant for perishable or time-sensitive
            inventory items. Note that this field is only supported on
            QuickBooks Desktop 2023 or later.
          example: '2025-12-31'
        serviceDate:
          type:
            - string
            - 'null'
          format: date
          description: >-
            The date on which the service for this invoice line was or will be
            performed, in ISO 8601 format (YYYY-MM-DD). This is particularly
            relevant for service items.
          example: '2024-03-15'
        salesTaxCode:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The sales-tax code for this invoice line, determining whether it is
            taxable or non-taxable. If set, this overrides any sales-tax codes
            defined on the parent transaction or the associated item.


            Default codes include "Non" (non-taxable) and "Tax" (taxable), but
            custom codes can also be created in QuickBooks. If QuickBooks is not
            set up to charge sales tax (via the "Do You Charge Sales Tax?"
            preference), it will assign the default non-taxable code to all
            sales.
          example:
            id: 80000001-1234567890
            fullName: Non
        otherCustomField1:
          type:
            - string
            - 'null'
          description: >-
            A built-in custom field for additional information specific to this
            invoice line. Unlike the user-defined fields in the `customFields`
            array, this is a standard QuickBooks field that exists for all
            invoice lines for convenience. Developers often use this field for
            tracking information that doesn't fit into other standard QuickBooks
            fields. Hidden by default in the QuickBooks UI.
          example: Special handling required
        otherCustomField2:
          type:
            - string
            - 'null'
          description: >-
            A second built-in custom field for additional information specific
            to this invoice line. Unlike the user-defined fields in the
            `customFields` array, this is a standard QuickBooks field that
            exists for all invoice lines for convenience. Like
            `otherCustomField1`, developers often use this field for tracking
            information that doesn't fit into other standard QuickBooks fields.
            Hidden by default in the QuickBooks UI.
          example: Always ship with a spare
        customFields:
          type: array
          items:
            $ref: '#/components/schemas/qbd_custom_field'
          description: >-
            The custom fields for the invoice line object, added as user-defined
            data extensions, not included in the standard QuickBooks object.
      required:
        - id
        - objectType
        - item
        - description
        - quantity
        - unitOfMeasure
        - overrideUnitOfMeasureSet
        - rate
        - ratePercent
        - class
        - amount
        - inventorySite
        - inventorySiteLocation
        - serialNumber
        - lotNumber
        - expirationDate
        - serviceDate
        - salesTaxCode
        - otherCustomField1
        - otherCustomField2
        - customFields
      additionalProperties: false
      title: The Invoice Line object
      x-conductor-object-type: nested
    qbd_invoice_line_group:
      type: object
      properties:
        id:
          type: string
          description: >-
            The unique identifier assigned by QuickBooks to this invoice line
            group. This ID is unique across all transaction line types.
          example: 456DEF-1234567890
        objectType:
          type: string
          const: qbd_invoice_line_group
          description: The type of object. This value is always `"qbd_invoice_line_group"`.
          example: qbd_invoice_line_group
        itemGroup:
          type: object
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The invoice line group's item group, representing a predefined set
            of items bundled because they are commonly purchased together or
            grouped for faster entry.
          example:
            id: 80000001-1234567890
            fullName: Office Supplies Bundle
        description:
          type:
            - string
            - 'null'
          description: A description of this invoice line group.
          example: Standard widget bulk package
        quantity:
          type:
            - number
            - 'null'
          description: >-
            The quantity of the item group associated with this invoice line
            group. This field cannot be cleared.


            **NOTE**: Do not use this field if the associated item group is a
            discount item group.
          example: 5
        unitOfMeasure:
          type:
            - string
            - 'null'
          description: >-
            The unit-of-measure used for the `quantity` in this invoice line
            group. Must be a valid unit within the item's available units of
            measure.
          example: Each
        overrideUnitOfMeasureSet:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            Specifies an alternative unit-of-measure set when updating this
            invoice line group's `unitOfMeasure` field (e.g., "pound" or
            "kilogram"). This allows you to select units from a different set
            than the item's default unit-of-measure set, which remains unchanged
            on the item itself. The override applies only to this specific line.
            For example, you can sell an item typically measured in volume units
            using weight units in a specific transaction by specifying a
            different unit-of-measure set with this field.
          example:
            id: 80000001-1234567890
            fullName: Volume Units
        shouldPrintItemsInGroup:
          type: boolean
          description: >-
            Indicates whether the individual items in this invoice line group
            and their separate amounts appear on printed forms.
          example: true
        totalAmount:
          type: string
          description: >-
            The total monetary amount of this invoice line group, equivalent to
            the sum of the amounts in `lines`, represented as a decimal string.
          example: '1000.00'
        serviceDate:
          type:
            - string
            - 'null'
          format: date
          description: >-
            The date on which the service for this invoice line group was or
            will be performed, in ISO 8601 format (YYYY-MM-DD). This is
            particularly relevant for service items.
          example: '2024-03-15'
        lines:
          type: array
          items:
            $ref: '#/components/schemas/qbd_invoice_line'
          description: >-
            The invoice line group's line items, each representing a single
            product or service sold.
        customFields:
          type: array
          items:
            $ref: '#/components/schemas/qbd_custom_field'
          description: >-
            The custom fields for the invoice line group object, added as
            user-defined data extensions, not included in the standard
            QuickBooks object.
      required:
        - id
        - objectType
        - itemGroup
        - description
        - quantity
        - unitOfMeasure
        - overrideUnitOfMeasureSet
        - shouldPrintItemsInGroup
        - totalAmount
        - serviceDate
        - lines
        - customFields
      additionalProperties: false
      title: The Invoice Line Group object
      x-conductor-object-type: nested
    qbd_custom_field:
      type: object
      properties:
        ownerId:
          type: string
          description: >-
            The identifier of the owner of the custom field, which QuickBooks
            internally calls a "data extension". For public custom fields
            visible in the UI, such as those added by the QuickBooks user, this
            is always "0". For private custom fields that are only visible to
            the application that created them, this is a valid GUID identifying
            the owning application. Internally, Conductor always fetches all
            public custom fields (those with an `ownerId` of "0") for all
            objects.
          example: '0'
        name:
          type: string
          description: >-
            The name of the custom field, unique for the specified `ownerId`.
            For public custom fields, this name is visible as a label in the
            QuickBooks UI.
          example: Customer Rating
        type:
          type: string
          enum:
            - amount_type
            - date_time_type
            - integer_type
            - percent_type
            - price_type
            - quantity_type
            - string_1024_type
            - string_255_type
          description: The data type of this custom field.
          example: string_1024_type
        value:
          type: string
          description: >-
            The value of this custom field. The maximum length depends on the
            field's data type.
          example: Premium
      required:
        - ownerId
        - name
        - type
        - value
      additionalProperties: false
      title: The Custom Field object
      x-conductor-object-type: nested
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Conductor secret key using Bearer auth (e.g., `"Authorization:
        Bearer {{YOUR_SECRET_KEY}}"`).

````

Built with [Mintlify](https://mintlify.com).