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

# Set custom fields on a sales order

> Sets or clears custom field values on a sales order and its lines. Custom fields defined for items go on the lines, and those defined for customers, vendors, and employees go on the sales order itself. Each value you send replaces the existing value of its custom field. To clear a custom field's existing value, send an empty string. Custom fields you omit from your request keep their existing values.

If the request fails, QuickBooks may still have saved some of the values you sent, because it saves each value separately. The error names the custom fields QuickBooks did not save. You can safely send the same request again.

**NOTE**: This request has no `revisionNumber` parameter, but it still updates the sales order's `revisionNumber`. Use the `revisionNumber` returned in the response for your next update.



## OpenAPI

````yaml POST /quickbooks-desktop/sales-orders/{id}/set-custom-fields
openapi: 3.1.0
info:
  title: Conductor API
  version: 0.0.1
servers:
  - url: https://api.conductor.is/v1
security:
  - BearerAuth: []
paths:
  /quickbooks-desktop/sales-orders/{id}/set-custom-fields:
    post:
      summary: Set custom fields on a sales order
      description: >-
        Sets or clears custom field values on a sales order and its lines.
        Custom fields defined for items go on the lines, and those defined for
        customers, vendors, and employees go on the sales order itself. Each
        value you send replaces the existing value of its custom field. To clear
        a custom field's existing value, send an empty string. Custom fields you
        omit from your request keep their existing values.


        If the request fails, QuickBooks may still have saved some of the values
        you sent, because it saves each value separately. The error names the
        custom fields QuickBooks did not save. You can safely send the same
        request again.


        **NOTE**: This request has no `revisionNumber` parameter, but it still
        updates the sales order's `revisionNumber`. Use the `revisionNumber`
        returned in the response for your next update.
      parameters:
        - in: header
          name: Conductor-End-User-Id
          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
          description: The ID of the End-User to receive this request.
        - in: path
          name: id
          schema:
            type: string
            maxLength: 36
            description: >-
              The QuickBooks-assigned unique identifier of the sales order to
              set custom fields on.
            example: 123ABC-1234567890
          required: true
          description: >-
            The QuickBooks-assigned unique identifier of the sales order to set
            custom fields on.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                customFields:
                  description: >-
                    The custom field values to set or clear on the sales order
                    itself, not on its lines. Custom fields you leave out keep
                    their values.


                    **IMPORTANT**: You must specify `customFields`, `lines`, or
                    both when setting custom fields on a sales order.
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      ownerId:
                        description: >-
                          The owner of the custom field. Defaults to `"0"`, the
                          owner of public custom fields, which QuickBooks users
                          define and see. Any other owner is an application's
                          GUID in braces, such as
                          `"{6B063959-81B0-4622-85D6-F548C8CCB517}"`, whose
                          private custom fields appear only in requests that
                          name it.
                        example: '0'
                        default: '0'
                        type: string
                      name:
                        type: string
                        maxLength: 31
                        description: >-
                          The name of the custom field, as its definition and a
                          record's `customFields` show it. The custom field must
                          already be defined for this type of record; to list or
                          create definitions, use the custom-field-definitions
                          endpoint. QuickBooks matches the name without regard
                          to letter case.
                        example: Customer Rating
                      value:
                        type: string
                        description: >-
                          The value to set, which replaces the custom field's
                          current value if it has one. Send an empty string
                          (`""`) to clear the custom field. A public custom
                          field's value can have at most 30 characters.
                        example: Gold
                    required:
                      - name
                      - value
                    additionalProperties: false
                lines:
                  description: >-
                    The lines of the sales order whose custom field values to
                    set or clear. Lines you leave out are not changed.


                    **IMPORTANT**: You must specify `customFields`, `lines`, or
                    both when setting custom fields on a sales order.
                  minItems: 1
                  type: array
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        maxLength: 36
                        description: >-
                          The QuickBooks-assigned unique identifier of the sales
                          order line, line group, or line inside a line group.
                        example: 123ABC-1234567890
                      customFields:
                        minItems: 1
                        type: array
                        items:
                          type: object
                          properties:
                            ownerId:
                              description: >-
                                The owner of the custom field. Defaults to
                                `"0"`, the owner of public custom fields, which
                                QuickBooks users define and see. Any other owner
                                is an application's GUID in braces, such as
                                `"{6B063959-81B0-4622-85D6-F548C8CCB517}"`,
                                whose private custom fields appear only in
                                requests that name it.
                              example: '0'
                              default: '0'
                              type: string
                            name:
                              type: string
                              maxLength: 31
                              description: >-
                                The name of the custom field, as its definition
                                and a record's `customFields` show it. The
                                custom field must already be defined for this
                                type of record; to list or create definitions,
                                use the custom-field-definitions endpoint.
                                QuickBooks matches the name without regard to
                                letter case.
                              example: Customer Rating
                            value:
                              type: string
                              description: >-
                                The value to set, which replaces the custom
                                field's current value if it has one. Send an
                                empty string (`""`) to clear the custom field. A
                                public custom field's value can have at most 30
                                characters.
                              example: Gold
                          required:
                            - name
                            - value
                          additionalProperties: false
                        description: >-
                          The custom field values to set or clear on this line.
                          Custom fields you leave out keep their values.
                    required:
                      - id
                      - customFields
                    additionalProperties: false
              additionalProperties: false
      responses:
        '200':
          description: >-
            Returns the sales order as it is after the change, with its custom
            fields.
          headers:
            Conductor-Request-Id:
              required: true
              description: The unique identifier for this API request.
              schema:
                type: string
                description: The unique identifier for this API request.
                example: req_1234567abcdefg
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/qbd_sales_order'
      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 salesOrder = await
            conductor.qbd.salesOrders.setCustomFields('123ABC-1234567890', {
              conductorEndUserId: 'end_usr_1234567abcdefg',
            });


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

            conductor = Conductor(
                api_key=os.environ.get("CONDUCTOR_SECRET_KEY"),  # This is the default and can be omitted
            )
            sales_order = conductor.qbd.sales_orders.set_custom_fields(
                id="123ABC-1234567890",
                conductor_end_user_id="end_usr_1234567abcdefg",
            )
            print(sales_order.id)
components:
  schemas:
    qbd_sales_order:
      type: object
      properties:
        id:
          type: string
          description: >-
            The unique identifier assigned by QuickBooks to this sales order.
            This ID is unique across all transaction types.
          example: 123ABC-1234567890
        objectType:
          description: The type of object. This value is always `"qbd_sales_order"`.
          example: qbd_sales_order
          type: string
          const: qbd_sales_order
        createdAt:
          type: string
          description: >-
            The date and time when this sales order 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 sales order 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 sales order
            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:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: The customer or customer-job associated with this sales order.
          example:
            id: 80000001-1234567890
            fullName: Acme Corporation
        class:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: >-
            The sales order'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 sales order's line items
            unless overridden at the line item level.
          example:
            id: 80000001-1234567890
            fullName: Online Sales
        documentTemplate:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: >-
            The predefined template in QuickBooks that determines the layout and
            formatting for this sales order when printed or displayed.
          example:
            id: 80000001-1234567890
            fullName: Sales Order Template
        transactionDate:
          type: string
          format: date
          description: The date of this sales order, in ISO 8601 format (YYYY-MM-DD).
          example: '2024-10-01'
        refNumber:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The case-sensitive user-defined reference number for this sales
            order, 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: SO-1234
        billingAddress:
          anyOf:
            - $ref: '#/components/schemas/qbd_address'
            - type: 'null'
          description: The sales order's billing address.
        shippingAddress:
          anyOf:
            - $ref: '#/components/schemas/qbd_address'
            - type: 'null'
          description: The sales order's shipping address.
        purchaseOrderNumber:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The customer's Purchase Order (PO) number associated with this sales
            order. This field is often used to cross-reference the sales order
            with the customer's purchasing system.
          example: PO-1234
        terms:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: >-
            The sales order's payment terms, defining when payment is due and
            any applicable discounts.
          example:
            id: 80000001-1234567890
            fullName: Net 30
        dueDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          description: >-
            The date by which this sales order must be paid, in ISO 8601 format
            (YYYY-MM-DD).
          example: '2024-10-31T00:00:00.000Z'
        salesRepresentative:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: >-
            The sales order's sales representative. Sales representatives can be
            employees, vendors, or other names in QuickBooks.
          example:
            id: 80000001-1234567890
            fullName: Jane Doe
        shipmentOrigin:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The origin location from where the product associated with this
            sales order 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:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          description: >-
            The date when the products or services for this sales order were
            shipped or are expected to be shipped, in ISO 8601 format
            (YYYY-MM-DD).
          example: '2024-10-01T00:00:00.000Z'
        shippingMethod:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: >-
            The shipping method used for this sales order, such as standard mail
            or overnight delivery.
          example:
            id: 80000001-1234567890
            fullName: FedEx Ground
        subtotal:
          type: string
          description: >-
            The subtotal of this sales order, which is the sum of all sales
            order lines before taxes and payments are applied, represented as a
            decimal string.
          example: '1000.00'
        salesTaxItem:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: >-
            The sales-tax item used to calculate the actual tax amount for this
            sales order'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.
          example:
            id: 80000001-1234567890
            fullName: State Sales Tax
        salesTaxPercentage:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The sales tax percentage applied to this sales order, represented as
            a decimal string.
          example: '0.07'
        salesTaxTotal:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The total amount of sales tax charged for this sales order,
            represented as a decimal string.
          example: '10.00'
        totalAmount:
          type: string
          description: >-
            The total monetary amount of this sales order, equivalent to the sum
            of the amounts in `lines` and `lineGroups`, represented as a decimal
            string.
          example: '1000.00'
        currency:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: >-
            The sales order'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:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            The market exchange rate between this sales order'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
        totalAmountInHomeCurrency:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The total monetary amount of this sales order converted to the home
            currency of the QuickBooks company file. Represented as a decimal
            string.
          example: '1234.56'
        isManuallyClosed:
          type: boolean
          description: >-
            Indicates whether this sales order has been manually marked as
            closed, even if it has not been invoiced.
          example: true
        isFullyInvoiced:
          anyOf:
            - type: boolean
            - type: 'null'
          description: Indicates whether all items in this sales order have been invoiced.
          example: false
        memo:
          anyOf:
            - type: string
            - type: 'null'
          description: A memo or note for this sales order.
          example: Customer requested rush delivery
        customerMessage:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: The message to display to the customer on the sales order.
          example:
            id: 80000001-1234567890
            fullName: Thank you for your business!
        isQueuedForPrint:
          anyOf:
            - type: boolean
              description: >-
                Indicates whether this sales order is included in the queue of
                documents for QuickBooks to print.
              example: true
            - type: 'null'
        isQueuedForEmail:
          anyOf:
            - type: boolean
            - type: 'null'
          description: >-
            Indicates whether this sales order is included in the queue of
            documents for QuickBooks to email to the customer.
          example: true
        salesTaxCode:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: >-
            The sales-tax code for this sales order, 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 Desktop. If
            QuickBooks Desktop is not set up to charge sales tax (via the "Do
            You Charge Sales Tax?" preference), it assigns the default
            non-taxable sales-tax code configured in the company file to all
            sales.
          example:
            id: 80000001-1234567890
            fullName: Non
        otherCustomField:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            A built-in custom field for additional information specific to this
            sales order. Unlike the user-defined fields in the `customFields`
            array, this is a standard QuickBooks field that exists for all sales
            orders 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:
          anyOf:
            - type: string
              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
            - type: 'null'
        linkedTransactions:
          type: array
          items:
            $ref: '#/components/schemas/qbd_linked_transaction'
          description: >-
            The sales order'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 sales orders to
            receive this field because it is not returned by default.
        lines:
          type: array
          items:
            $ref: '#/components/schemas/qbd_sales_order_line'
          description: >-
            The sales order's line items, each representing a single product or
            service ordered.
        lineGroups:
          type: array
          items:
            $ref: '#/components/schemas/qbd_sales_order_line_group'
          description: >-
            The sales order'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 that have a value on this sales order, for the
            owners named in the request's `customFieldOwnerIds` (by default, the
            public custom fields).


            **NOTE**: To set or clear custom field values, use the
            set-custom-fields endpoint. An update cannot change them, and its
            response returns this as an empty array even when values exist;
            retrieve the record to see them.
        salesChannelName:
          anyOf:
            - type: string
              enum:
                - blank
                - ecommerce
            - type: 'null'
          description: The type of the sales channel for this sales order.
          example: ecommerce
        salesStoreName:
          anyOf:
            - type: string
            - type: 'null'
          description: The name of the sales store for this sales order.
          example: Store 1
        salesStoreType:
          anyOf:
            - type: string
            - type: 'null'
          description: The type of the sales store for this sales order.
          example: Retail
      required:
        - id
        - objectType
        - createdAt
        - updatedAt
        - revisionNumber
        - customer
        - class
        - documentTemplate
        - transactionDate
        - refNumber
        - billingAddress
        - shippingAddress
        - purchaseOrderNumber
        - terms
        - dueDate
        - salesRepresentative
        - shipmentOrigin
        - shippingDate
        - shippingMethod
        - subtotal
        - salesTaxItem
        - salesTaxPercentage
        - salesTaxTotal
        - totalAmount
        - currency
        - exchangeRate
        - totalAmountInHomeCurrency
        - isManuallyClosed
        - isFullyInvoiced
        - memo
        - customerMessage
        - isQueuedForPrint
        - isQueuedForEmail
        - salesTaxCode
        - otherCustomField
        - externalId
        - linkedTransactions
        - lines
        - lineGroups
        - customFields
        - salesChannelName
        - salesStoreName
        - salesStoreType
      additionalProperties: false
      title: The Sales Order object
      x-conductor-object-type: transaction
      summary: >-
        A sales order tracks inventory that is on back order for a customer. In
        QuickBooks, sales orders and invoices use similar fields, and a sales
        order can be "converted" into an invoice (by linking the invoice to the
        sales order) once the inventory is in stock.
    qbd_address:
      type: object
      properties:
        line1:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The first line of the address (e.g., street, PO Box, or company
            name).
          example: Conductor Labs Inc.
        line2:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The second line of the address, if needed (e.g., apartment, suite,
            unit, or building).
          example: 540 Market St.
        line3:
          anyOf:
            - type: string
            - type: 'null'
          description: The third line of the address, if needed.
          example: Suite 100
        line4:
          anyOf:
            - type: string
            - type: 'null'
          description: The fourth line of the address, if needed.
          example: ''
        line5:
          anyOf:
            - type: string
            - type: 'null'
          description: The fifth line of the address, if needed.
          example: ''
        city:
          anyOf:
            - type: string
            - type: 'null'
          description: The city, district, suburb, town, or village name of the address.
          example: San Francisco
        state:
          anyOf:
            - type: string
            - type: 'null'
          description: The state, county, province, or region name of the address.
          example: CA
        postalCode:
          anyOf:
            - type: string
            - type: 'null'
          description: The postal code or ZIP code of the address.
          example: '94110'
        country:
          anyOf:
            - type: string
            - type: 'null'
          description: The country name of the address.
          example: United States
        note:
          anyOf:
            - type: string
            - type: '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:
          description: The type of object. This value is always `"qbd_linked_transaction"`.
          example: qbd_linked_transaction
          type: string
          const: 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
            - transfer_inventory
            - 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:
          anyOf:
            - type: string
            - type: '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:
          anyOf:
            - type: string
              enum:
                - amount
                - quantity
            - type: '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:
          anyOf:
            - type: string
            - type: '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_sales_order_line:
      type: object
      properties:
        id:
          type: string
          description: >-
            The unique identifier assigned by QuickBooks to this sales order
            line. This ID is unique across all transaction line types.
          example: 456DEF-1234567890
        objectType:
          description: The type of object. This value is always `"qbd_sales_order_line"`.
          example: qbd_sales_order_line
          type: string
          const: qbd_sales_order_line
        item:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: >-
            The item associated with this sales order 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:
          anyOf:
            - type: string
            - type: 'null'
          description: A description of this sales order line.
          example: Widget Model X100 - Blue
        quantity:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            The quantity of the item associated with this sales order line. This
            field cannot be cleared.


            **NOTE**: Do not use this field if the associated item is a discount
            item.
          example: 5
        unitOfMeasure:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The unit-of-measure used for the `quantity` in this sales order
            line. Must be a valid unit within the item's available units of
            measure.
          example: Each
        overrideUnitOfMeasureSet:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: >-
            Specifies an alternative unit-of-measure set when updating this
            sales order 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.


            IMPORTANT: Right after QuickBooks Desktop launches, it can briefly
            report an alternate `id` for a unit-of-measure set, so match on
            `fullName` when joining to the unit-of-measure sets list.
          example:
            id: 80000001-1234567890
            fullName: Volume Units
        rate:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The price per unit for this sales order 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:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The price of this sales order line expressed as a percentage.
            Typically used for discount or markup items.
          example: '10.5'
        class:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: >-
            The sales order 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 sales order lines unless overridden
            here, at the transaction line level.
          example:
            id: 80000001-1234567890
            fullName: West-Coast:Sales
        amount:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The monetary amount of this sales order 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:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: >-
            The site location where inventory for the item associated with this
            sales order line is stored.
          example:
            id: 80000001-1234567890
            fullName: Main Warehouse
        inventorySiteLocation:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: >-
            The specific location (e.g., bin or shelf) within the inventory site
            where the item associated with this sales order line is stored.
          example:
            id: 80000001-1234567890
            fullName: Aisle 3, Shelf B
        serialNumber:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The serial number of the item associated with this sales order line.
            This is used for tracking individual units of serialized inventory
            items.
          example: SN1234567890
        lotNumber:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The lot number of the item associated with this sales order line.
            Used for tracking groups of inventory items that are purchased or
            manufactured together.
          example: LOT2023-001
        expirationDate:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          description: >-
            The expiration date for the serial number or lot number of the item
            associated with this sales order 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-31T00:00:00.000Z'
        salesTaxCode:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: >-
            The sales-tax code for this sales order 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 Desktop. If
            QuickBooks Desktop is not set up to charge sales tax (via the "Do
            You Charge Sales Tax?" preference), it assigns the default
            non-taxable sales-tax code configured in the company file to all
            sales.
          example:
            id: 80000001-1234567890
            fullName: Non
        quantityInvoiced:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            The number of units of this sales order line's `quantity` that have
            been invoiced.
          example: 5
        isManuallyClosed:
          type: boolean
          description: >-
            Indicates whether this sales order line has been manually marked as
            closed, even if it has not been invoiced.
          example: true
        otherCustomField1:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            A built-in custom field for additional information specific to this
            sales order line. Unlike the user-defined fields in the
            `customFields` array, this is a standard QuickBooks field that
            exists for all sales order 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:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            A second built-in custom field for additional information specific
            to this sales order line. Unlike the user-defined fields in the
            `customFields` array, this is a standard QuickBooks field that
            exists for all sales order 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 that have a value on this sales order line, for
            the owners named in the request's `customFieldOwnerIds` (by default,
            the public custom fields).


            **NOTE**: To set or clear custom field values, use the sales order's
            set-custom-fields endpoint. An update cannot change them, and its
            response returns this as an empty array even when values exist;
            retrieve the sales order to see them.
      required:
        - id
        - objectType
        - item
        - description
        - quantity
        - unitOfMeasure
        - overrideUnitOfMeasureSet
        - rate
        - ratePercent
        - class
        - amount
        - inventorySite
        - inventorySiteLocation
        - serialNumber
        - lotNumber
        - expirationDate
        - salesTaxCode
        - quantityInvoiced
        - isManuallyClosed
        - otherCustomField1
        - otherCustomField2
        - customFields
      additionalProperties: false
      title: The Sales Order Line object
      x-conductor-object-type: nested
    qbd_sales_order_line_group:
      type: object
      properties:
        id:
          type: string
          description: >-
            The unique identifier assigned by QuickBooks to this sales order
            line group. This ID is unique across all transaction line types.
          example: 456DEF-1234567890
        objectType:
          description: >-
            The type of object. This value is always
            `"qbd_sales_order_line_group"`.
          example: qbd_sales_order_line_group
          type: string
          const: qbd_sales_order_line_group
        itemGroup:
          type: object
          properties:
            id:
              anyOf:
                - type: string
                - type: '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:
              anyOf:
                - type: string
                - type: '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 order 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:
          anyOf:
            - type: string
            - type: 'null'
          description: A description of this sales order line group.
          example: Service Bundle 1
        quantity:
          anyOf:
            - type: number
            - type: 'null'
          description: >-
            The quantity of the item group associated with this sales order 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:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            The unit-of-measure used for the `quantity` in this sales order line
            group. Must be a valid unit within the item's available units of
            measure.
          example: Each
        overrideUnitOfMeasureSet:
          anyOf:
            - type: object
              properties:
                id:
                  anyOf:
                    - type: string
                    - type: '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:
                  anyOf:
                    - type: string
                    - type: '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
            - type: 'null'
          description: >-
            Specifies an alternative unit-of-measure set when updating this
            sales order 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.


            IMPORTANT: Right after QuickBooks Desktop launches, it can briefly
            report an alternate `id` for a unit-of-measure set, so match on
            `fullName` when joining to the unit-of-measure sets list.
          example:
            id: 80000001-1234567890
            fullName: Volume Units
        shouldPrintItemsInGroup:
          type: boolean
          description: >-
            Indicates whether the individual items in this sales order line
            group and their separate amounts appear on printed forms.
          example: true
        totalAmount:
          type: string
          description: >-
            The total monetary amount of this sales order line group, equivalent
            to the sum of the amounts in `lines`, represented as a decimal
            string.
          example: '1000.00'
        lines:
          type: array
          items:
            $ref: '#/components/schemas/qbd_sales_order_line'
          description: >-
            The sales order line group's line items, each representing a single
            product or service ordered.
        customFields:
          type: array
          items:
            $ref: '#/components/schemas/qbd_custom_field'
          description: >-
            The custom fields that have a value on this sales order line group,
            for the owners named in the request's `customFieldOwnerIds` (by
            default, the public custom fields).


            **NOTE**: To set or clear custom field values, use the sales order's
            set-custom-fields endpoint. An update cannot change them, and its
            response returns this as an empty array even when values exist;
            retrieve the sales order to see them.
      required:
        - id
        - objectType
        - itemGroup
        - description
        - quantity
        - unitOfMeasure
        - overrideUnitOfMeasureSet
        - shouldPrintItemsInGroup
        - totalAmount
        - lines
        - customFields
      additionalProperties: false
      title: The Sales Order Line Group object
      x-conductor-object-type: nested
    qbd_custom_field:
      type: object
      properties:
        ownerId:
          type: string
          description: >-
            The owner of this custom field: `"0"` for a public custom field,
            which QuickBooks users define and see, or an application's GUID in
            braces for a private custom field, which appears only in requests
            that name that owner.
          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.
          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}}"`).

````

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