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

# Update an inventory item

> Updates an inventory item. If you switch the income account, set `updateExistingTransactionsIncomeAccount` to true so QuickBooks applies the new account to existing transactions that reference the item.



## OpenAPI

````yaml POST /quickbooks-desktop/inventory-items/{id}
openapi: 3.1.0
info:
  title: Conductor API
  version: 0.0.1
servers:
  - url: https://api.conductor.is/v1
security:
  - BearerAuth: []
paths:
  /quickbooks-desktop/inventory-items/{id}:
    post:
      summary: Update an inventory item
      description: >-
        Updates an inventory item. If you switch the income account, set
        `updateExistingTransactionsIncomeAccount` to true so QuickBooks applies
        the new account to existing transactions that reference the item.
      parameters:
        - in: path
          name: id
          description: >-
            The QuickBooks-assigned unique identifier of the inventory item to
            update.
          schema:
            type: string
            description: >-
              The QuickBooks-assigned unique identifier of the inventory item to
              update.
            example: 80000001-1234567890
          required: true
        - 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:
                revisionNumber:
                  type: string
                  description: >-
                    The current QuickBooks-assigned revision number of the
                    inventory item object you are updating, which you can get by
                    fetching the object first. Provide the most recent
                    `revisionNumber` to ensure you're working with the latest
                    data; otherwise, the update will return an error.
                  example: '1721172183'
                name:
                  type: string
                  maxLength: 31
                  description: >-
                    The case-insensitive name of this inventory item. Not
                    guaranteed to be unique because it does not include the
                    names of its hierarchical parent objects like `fullName`
                    does. For example, two inventory items could both have the
                    `name` "Cabinet", but they could have unique `fullName`
                    values, such as "Kitchen:Cabinet" and "Inventory:Cabinet".


                    Maximum length: 31 characters.
                  example: Cabinet
                barcode:
                  type: object
                  properties:
                    value:
                      type: string
                      description: The item's barcode value.
                      example: '012345678905'
                    assignEvenIfUsed:
                      type: boolean
                      description: >-
                        Indicates whether to assign the barcode even if it is
                        already used.
                      example: false
                      default: false
                    allowOverride:
                      type: boolean
                      description: Indicates whether to allow the barcode to be overridden.
                      example: false
                      default: false
                  additionalProperties: false
                  description: The inventory item's barcode.
                isActive:
                  type: boolean
                  description: >-
                    Indicates whether this inventory item is active. Inactive
                    objects are typically hidden from views and reports in
                    QuickBooks. Defaults to `true`.
                  example: true
                classId:
                  type: string
                  description: >-
                    The inventory item'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.
                  example: 80000001-1234567890
                parentId:
                  type: string
                  description: >-
                    The parent inventory item one level above this one in the
                    hierarchy. For example, if this inventory item has a
                    `fullName` of "Kitchen:Cabinet", its parent has a `fullName`
                    of "Kitchen". If this inventory item is at the top level,
                    this field will be `null`.
                  example: 80000001-1234567890
                sku:
                  type: string
                  description: >-
                    The inventory item's stock keeping unit (SKU), which is
                    sometimes the manufacturer's part number.
                  example: MPN-123456
                unitOfMeasureSetId:
                  type: string
                  description: >-
                    The unit-of-measure set associated with this inventory item,
                    which consists of a base unit and related units.
                  example: 80000001-1234567890
                forceUnitOfMeasureChange:
                  type: boolean
                  description: >-
                    Indicates whether to allow changing the inventory item's
                    unit-of-measure set (using the `unitOfMeasureSetId` field)
                    when the base unit of the new unit-of-measure set does not
                    match that of the currently assigned set. Without setting
                    this field to `true` in this scenario, the request will fail
                    with an error; hence, this field is equivalent to accepting
                    the warning prompt in the QuickBooks UI.


                    NOTE: Changing the base unit requires you to update the
                    item's quantities-on-hand and cost to reflect the new unit;
                    otherwise, these values will be inaccurate. Alternatively,
                    consider creating a new item with the desired
                    unit-of-measure set and deactivating the old item.
                  example: false
                salesTaxCodeId:
                  type: string
                  description: >-
                    The default sales-tax code for this inventory item,
                    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
                salesDescription:
                  type: string
                  description: >-
                    The description of this inventory item that appears on sales
                    forms (e.g., invoices, sales receipts) when sold to
                    customers.
                  example: High-quality steel bolts suitable for construction
                salesPrice:
                  type: string
                  description: >-
                    The price at which this inventory item is sold to customers,
                    represented as a decimal string.
                  example: '19.99'
                incomeAccountId:
                  type: string
                  description: >-
                    The income account used to track revenue from sales of this
                    inventory item.
                  example: 80000001-1234567890
                updateExistingTransactionsIncomeAccount:
                  type: boolean
                  description: >-
                    When `true`, applies the new income account (specified by
                    the `incomeAccountId` field) to all existing transactions
                    that use this inventory item. This updates historical data
                    and should be used with caution. The update will fail if any
                    affected transaction falls within a closed accounting
                    period. If this parameter is not specified, QuickBooks will
                    prompt the user before making any changes.
                  example: false
                purchaseDescription:
                  type: string
                  description: >-
                    The description of this inventory item that appears on
                    purchase forms (e.g., checks, bills, item receipts) when it
                    is ordered or bought from vendors.
                  example: Bulk purchase of steel bolts for inventory
                purchaseCost:
                  type: string
                  description: >-
                    The cost at which this inventory item is purchased from
                    vendors, represented as a decimal string.
                  example: '15.75'
                purchaseTaxCodeId:
                  type: string
                  description: >-
                    The tax code applied to purchases of this inventory item.
                    Applicable in regions where purchase taxes are used, such as
                    Canada or the UK.
                  example: 80000001-1234567890
                cogsAccountId:
                  type: string
                  description: >-
                    The Cost of Goods Sold (COGS) account for this inventory
                    item, tracking the original direct costs of producing goods
                    sold.
                  example: 80000001-1234567890
                updateExistingTransactionsCogsAccount:
                  type: boolean
                  description: >-
                    When `true`, applies the new COGS account (specified by the
                    `cogsAccountId` field) to all existing transactions that use
                    this inventory item. This updates historical data and should
                    be used with caution. The update will fail if any affected
                    transaction falls within a closed accounting period. If this
                    parameter is not specified, QuickBooks will prompt the user
                    before making any changes.
                  example: false
                preferredVendorId:
                  type: string
                  description: >-
                    The preferred vendor from whom this inventory item is
                    typically purchased.
                  example: 80000001-1234567890
                assetAccountId:
                  type: string
                  description: >-
                    The asset account used to track the current value of this
                    inventory item in inventory.
                  example: 80000001-1234567890
                reorderPoint:
                  type: number
                  description: >-
                    The minimum quantity of this inventory item at which
                    QuickBooks prompts for reordering.
                  example: 50
                maximumQuantityOnHand:
                  type: number
                  description: >-
                    The maximum quantity of this inventory item desired in
                    inventory.
                  example: 200
              required:
                - revisionNumber
              additionalProperties: false
      responses:
        '200':
          description: Returns the updated inventory item.
          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_inventory_item'
      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 inventoryItem = await
            conductor.qbd.inventoryItems.update('80000001-1234567890', {
              revisionNumber: '1721172183',
              conductorEndUserId: 'end_usr_1234567abcdefg',
            });


            console.log(inventoryItem.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
            )
            inventory_item = conductor.qbd.inventory_items.update(
                id="80000001-1234567890",
                revision_number="1721172183",
                conductor_end_user_id="end_usr_1234567abcdefg",
            )
            print(inventory_item.id)
components:
  schemas:
    qbd_inventory_item:
      type: object
      properties:
        id:
          type: string
          description: >-
            The unique identifier assigned by QuickBooks to this inventory item.
            This ID is unique across all inventory items but not across
            different QuickBooks object types.
          example: 80000001-1234567890
        objectType:
          type: string
          const: qbd_inventory_item
          description: The type of object. This value is always `"qbd_inventory_item"`.
          example: qbd_inventory_item
        createdAt:
          type: string
          description: >-
            The date and time when this inventory item 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 inventory item 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 inventory
            item 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'
        name:
          type: string
          description: >-
            The case-insensitive name of this inventory item. Not guaranteed to
            be unique because it does not include the names of its hierarchical
            parent objects like `fullName` does. For example, two inventory
            items could both have the `name` "Cabinet", but they could have
            unique `fullName` values, such as "Kitchen:Cabinet" and
            "Inventory:Cabinet".
          example: Cabinet
        fullName:
          type: string
          description: >-
            The case-insensitive fully-qualified unique name of this inventory
            item, formed by combining the names of its hierarchical parent
            objects with its own `name`, separated by colons. For example, if an
            inventory item is under "Kitchen" and has the `name` "Cabinet", its
            `fullName` would be "Kitchen:Cabinet".


            **NOTE**: Unlike `name`, `fullName` is guaranteed to be unique
            across all inventory item objects. However, `fullName` can still be
            arbitrarily changed by the QuickBooks user when they modify the
            underlying `name` field.
          example: Kitchen:Cabinet
        barcode:
          type:
            - string
            - 'null'
          description: The inventory item's barcode.
          example: '012345678905'
        isActive:
          type: boolean
          description: >-
            Indicates whether this inventory item is active. Inactive objects
            are typically hidden from views and reports in QuickBooks. Defaults
            to `true`.
          example: true
        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 inventory item'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.
          example:
            id: 80000001-1234567890
            fullName: Furniture
        parent:
          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 parent inventory item one level above this one in the hierarchy.
            For example, if this inventory item has a `fullName` of
            "Kitchen:Cabinet", its parent has a `fullName` of "Kitchen". If this
            inventory item is at the top level, this field will be `null`.
          example:
            id: 80000001-1234567890
            fullName: Kitchen
        sublevel:
          type: number
          description: >-
            The depth level of this inventory item in the hierarchy. A top-level
            inventory item has a `sublevel` of 0; each subsequent sublevel
            increases this number by 1. For example, an inventory item with a
            `fullName` of "Kitchen:Cabinet" would have a `sublevel` of 1.
          example: 1
        sku:
          type:
            - string
            - 'null'
          description: >-
            The inventory item's stock keeping unit (SKU), which is sometimes
            the manufacturer's part number.
          example: MPN-123456
        unitOfMeasureSet:
          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 unit-of-measure set associated with this inventory item, which
            consists of a base unit and related units.
          example:
            id: 80000001-1234567890
            fullName: Weight Units
        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 default sales-tax code for this inventory item, 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
        salesDescription:
          type:
            - string
            - 'null'
          description: >-
            The description of this inventory item that appears on sales forms
            (e.g., invoices, sales receipts) when sold to customers.
          example: High-quality steel bolts suitable for construction
        salesPrice:
          type:
            - string
            - 'null'
          description: >-
            The price at which this inventory item is sold to customers,
            represented as a decimal string.
          example: '19.99'
        incomeAccount:
          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 income account used to track revenue from sales of this
            inventory item.
          example:
            id: 80000001-1234567890
            fullName: Income:Product Sales
        purchaseDescription:
          type:
            - string
            - 'null'
          description: >-
            The description of this inventory item that appears on purchase
            forms (e.g., checks, bills, item receipts) when it is ordered or
            bought from vendors.
          example: Bulk purchase of steel bolts for inventory
        purchaseCost:
          type:
            - string
            - 'null'
          description: >-
            The cost at which this inventory item is purchased from vendors,
            represented as a decimal string.
          example: '15.75'
        purchaseTaxCode:
          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 tax code applied to purchases of this inventory item. Applicable
            in regions where purchase taxes are used, such as Canada or the UK.
          example:
            id: 80000001-1234567890
            fullName: GST
        cogsAccount:
          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 Cost of Goods Sold (COGS) account for this inventory item,
            tracking the original direct costs of producing goods sold.
          example:
            id: 80000001-1234567890
            fullName: Expenses:COGS
        preferredVendor:
          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 preferred vendor from whom this inventory item is typically
            purchased.
          example:
            id: 80000001-1234567890
            fullName: Acme Supplies Ltd.
        assetAccount:
          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 asset account used to track the current value of this inventory
            item in inventory.
          example:
            id: 80000001-1234567890
            fullName: Assets:Inventory
        reorderPoint:
          type:
            - number
            - 'null'
          description: >-
            The minimum quantity of this inventory item at which QuickBooks
            prompts for reordering.
          example: 50
        maximumQuantityOnHand:
          type:
            - number
            - 'null'
          description: The maximum quantity of this inventory item desired in inventory.
          example: 200
        quantityOnHand:
          type:
            - number
            - 'null'
          description: >-
            The number of units of this inventory item currently in inventory.
            `quantityOnHand` multiplied by `averageCost` equals `totalValue` for
            inventory item lists. To change the `quantityOnHand` for an
            inventory item, you must use an inventory-adjustment instead of
            updating the inventory item directly.
          example: 150
        averageCost:
          type:
            - string
            - 'null'
          description: >-
            The average cost per unit of this inventory item, represented as a
            decimal string.
          example: '16.50'
        quantityOnPurchaseOrder:
          type:
            - number
            - 'null'
          description: >-
            The number of units of this inventory item that have been ordered
            from vendors (as recorded in purchase orders) but not yet received.
          example: 10
        quantityOnSalesOrder:
          type:
            - number
            - 'null'
          description: >-
            The number of units of this inventory item that have been sold (as
            recorded in sales orders) but not yet fulfilled or delivered to
            customers.
          example: 10
        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
        customFields:
          type: array
          items:
            $ref: '#/components/schemas/qbd_custom_field'
          description: >-
            The custom fields for the inventory item object, added as
            user-defined data extensions, not included in the standard
            QuickBooks object.
      required:
        - id
        - objectType
        - createdAt
        - updatedAt
        - revisionNumber
        - name
        - fullName
        - barcode
        - isActive
        - class
        - parent
        - sublevel
        - sku
        - unitOfMeasureSet
        - salesTaxCode
        - salesDescription
        - salesPrice
        - incomeAccount
        - purchaseDescription
        - purchaseCost
        - purchaseTaxCode
        - cogsAccount
        - preferredVendor
        - assetAccount
        - reorderPoint
        - maximumQuantityOnHand
        - quantityOnHand
        - averageCost
        - quantityOnPurchaseOrder
        - quantityOnSalesOrder
        - externalId
        - customFields
      additionalProperties: false
      title: The Inventory Item object
      x-conductor-object-type: item
      summary: >-
        An inventory item is any merchandise or part that a business purchases,
        tracks as inventory, and then resells.
    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).