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

# Create an inventory adjustment

> Creates an inventory adjustment to correct on-hand quantities or values. QuickBooks requires single-user mode unless you're on Enterprise with Advanced Inventory enabled.



## OpenAPI

````yaml POST /quickbooks-desktop/inventory-adjustments
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-adjustments:
    post:
      summary: Create an inventory adjustment
      description: >-
        Creates an inventory adjustment to correct on-hand quantities or values.
        QuickBooks requires single-user mode unless you're on Enterprise with
        Advanced Inventory enabled.
      parameters:
        - in: header
          name: Conductor-End-User-Id
          description: The ID of the End-User to receive this request.
          schema:
            type: string
            description: The ID of the End-User to receive this request.
            example: end_usr_1234567abcdefg
            x-stainless-naming:
              typescript:
                method_argument: conductorEndUserId
              mcp:
                method_argument: conductorEndUserId
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                accountId:
                  type: string
                  description: >-
                    The account to which this inventory adjustment is posted for
                    tracking inventory value changes.
                  example: 80000001-1234567890
                transactionDate:
                  type: string
                  format: date
                  description: >-
                    The date of this inventory adjustment, in ISO 8601 format
                    (YYYY-MM-DD).
                  example: '2024-10-01'
                refNumber:
                  type: string
                  description: >-
                    The case-sensitive user-defined reference number for this
                    inventory adjustment, which can be used to identify the
                    transaction in QuickBooks. This value is not required to be
                    unique and can be arbitrarily changed by the QuickBooks
                    user. When left blank in this create request, this field
                    will be left blank in QuickBooks (i.e., it does *not*
                    auto-increment).
                  example: INVADJ-1234
                inventorySiteId:
                  type: string
                  description: >-
                    The site location where inventory for the item associated
                    with this inventory adjustment is stored.
                  example: 80000001-1234567890
                customerId:
                  type: string
                  description: >-
                    The customer or customer-job associated with this inventory
                    adjustment.
                  example: 80000001-1234567890
                classId:
                  type: string
                  description: >-
                    The inventory adjustment'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 inventory adjustment's line items
                    unless overridden at the line item level.
                  example: 80000001-1234567890
                memo:
                  type: string
                  description: A memo or note for this inventory adjustment.
                  example: Adjusted quantity due to physical count discrepancy
                externalId:
                  type: string
                  format: uuid
                  description: >-
                    A globally unique identifier (GUID) you, the developer, can
                    provide for tracking this object in your external system.
                    This field is immutable and can only be set during object
                    creation.


                    **IMPORTANT**: This field must be formatted as a valid GUID;
                    otherwise, QuickBooks will return an error.
                  example: 12345678-abcd-1234-abcd-1234567890ab
                lines:
                  type: array
                  items:
                    type: object
                    properties:
                      itemId:
                        type: string
                        description: >-
                          The inventory item associated with this inventory
                          adjustment line.
                        example: 80000001-1234567890
                      adjustQuantity:
                        type: object
                        properties:
                          newQuantity:
                            type: number
                            description: >-
                              The new quantity for the inventory item associated
                              with this inventory adjustment line.
                            example: 10
                          quantityDifference:
                            type: number
                            description: >-
                              Either a positive or negative number that shows
                              the change in quantity for the inventory item
                              associated with this inventory adjustment line. A
                              positive number increases the quantity, while a
                              negative number decreases it.
                            example: 5
                          serialNumber:
                            type: string
                            description: >-
                              The serial number of the item associated with this
                              inventory adjustment line. This is used for
                              tracking individual units of serialized inventory
                              items.
                            example: SN1234567890
                          lotNumber:
                            type: string
                            description: >-
                              The lot number of the item associated with this
                              inventory adjustment line. Used for tracking
                              groups of inventory items that are purchased or
                              manufactured together.
                            example: LOT2023-001
                          expirationDate:
                            type: string
                            format: date
                            description: >-
                              The expiration date for the serial number or lot
                              number of the item associated with this inventory
                              adjustment line, in ISO 8601 format (YYYY-MM-DD).
                              This is particularly relevant for perishable or
                              time-sensitive inventory items. Note that this
                              field is only supported on QuickBooks Desktop 2023
                              or later.
                            example: '2025-12-31'
                          inventorySiteLocationId:
                            type: string
                            description: >-
                              The specific location (e.g., bin or shelf) within
                              the inventory site where the item associated with
                              this inventory adjustment line is stored.
                            example: 80000001-1234567890
                        additionalProperties: false
                        description: >-
                          Adjusts the inventory quantity of this inventory item
                          either by setting a new quantity or by adjusting the
                          current quantity up or down.
                      adjustValue:
                        type: object
                        properties:
                          newQuantity:
                            type: number
                            description: >-
                              The new quantity for the inventory item associated
                              with this inventory adjustment line.
                            example: 10
                          quantityDifference:
                            type: number
                            description: >-
                              Either a positive or negative number that shows
                              the change in quantity for the inventory item
                              associated with this inventory adjustment line. A
                              positive number increases the quantity, while a
                              negative number decreases it.
                            example: 5
                          newValue:
                            type: string
                            description: >-
                              The new total value of the entire stock of the
                              inventory item associated with this inventory
                              adjustment line.


                              **NOTE**: The new value does _not_ have to equal
                              `quantityOnHand` times `purchaseCost`.
                            example: '100.00'
                          valueDifference:
                            type: number
                            description: >-
                              Either a positive or negative number that shows
                              the change in the total value of the entire stock
                              of the inventory item associated with this
                              inventory adjustment line. A positive number
                              increases the value, while a negative number
                              decreases it.
                            example: 7
                        additionalProperties: false
                        description: >-
                          Adjusts the total value of the entire stock of this
                          inventory item by setting a new monetary value, and
                          optionally by setting a new quantity.
                      adjustSerialNumber:
                        type: object
                        properties:
                          addSerialNumber:
                            type: string
                            description: >-
                              The serial number, which represents a unique unit
                              of the inventory item associated with this
                              inventory adjustment line, to add to inventory.
                            example: '123456'
                          removeSerialNumber:
                            type: string
                            description: >-
                              The serial number, which represents a unique unit
                              of the inventory item associated with this
                              inventory adjustment line, to remove from
                              inventory.
                            example: '123456'
                          expirationDate:
                            type: string
                            format: date
                            description: >-
                              The expiration date for the serial number or lot
                              number of the item associated with this inventory
                              adjustment line, in ISO 8601 format (YYYY-MM-DD).
                              This is particularly relevant for perishable or
                              time-sensitive inventory items. Note that this
                              field is only supported on QuickBooks Desktop 2023
                              or later.
                            example: '2025-12-31'
                          inventorySiteLocationId:
                            type: string
                            description: >-
                              The specific location (e.g., bin or shelf) within
                              the inventory site where the item associated with
                              this inventory adjustment line is stored.
                            example: 80000001-1234567890
                        additionalProperties: false
                        description: >-
                          Adjusts the serial number of this inventory adjustment
                          line. This is used for tracking individual units of
                          serialized inventory items.
                      adjustLotNumber:
                        type: object
                        properties:
                          lotNumber:
                            type: string
                            description: >-
                              The lot number of the item associated with this
                              inventory adjustment line. Used for tracking
                              groups of inventory items that are purchased or
                              manufactured together.
                            example: LOT2023-001
                          adjustCount:
                            type: number
                            description: >-
                              The amount to adjust the count of the inventory
                              item associated with this inventory adjustment
                              line.
                            example: 2
                          expirationDate:
                            type: string
                            format: date
                            description: >-
                              The expiration date for the serial number or lot
                              number of the item associated with this inventory
                              adjustment line, in ISO 8601 format (YYYY-MM-DD).
                              This is particularly relevant for perishable or
                              time-sensitive inventory items. Note that this
                              field is only supported on QuickBooks Desktop 2023
                              or later.
                            example: '2025-12-31'
                          inventorySiteLocationId:
                            type: string
                            description: >-
                              The specific location (e.g., bin or shelf) within
                              the inventory site where the item associated with
                              this inventory adjustment line is stored.
                            example: 80000001-1234567890
                        additionalProperties: false
                        description: >-
                          Adjusts the lot number of this inventory adjustment
                          line.
                    required:
                      - itemId
                    additionalProperties: false
                  minItems: 1
                  description: >-
                    The inventory adjustment's item lines, each representing the
                    adjustment of an inventory item's quantity, value, serial
                    number, or lot number.
              required:
                - accountId
                - transactionDate
              additionalProperties: false
      responses:
        '200':
          description: Returns the newly created inventory adjustment.
          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_adjustment'
      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 inventoryAdjustment = await
            conductor.qbd.inventoryAdjustments.create({
              accountId: '80000001-1234567890',
              transactionDate: '2024-10-01',
              conductorEndUserId: 'end_usr_1234567abcdefg',
            });


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

            conductor = Conductor(
                api_key=os.environ.get("CONDUCTOR_SECRET_KEY"),  # This is the default and can be omitted
            )
            inventory_adjustment = conductor.qbd.inventory_adjustments.create(
                account_id="80000001-1234567890",
                transaction_date=date.fromisoformat("2024-10-01"),
                conductor_end_user_id="end_usr_1234567abcdefg",
            )
            print(inventory_adjustment.id)
components:
  schemas:
    qbd_inventory_adjustment:
      type: object
      properties:
        id:
          type: string
          description: >-
            The unique identifier assigned by QuickBooks to this inventory
            adjustment. This ID is unique across all transaction types.
          example: 123ABC-1234567890
        objectType:
          type: string
          const: qbd_inventory_adjustment
          description: >-
            The type of object. This value is always
            `"qbd_inventory_adjustment"`.
          example: qbd_inventory_adjustment
        createdAt:
          type: string
          description: >-
            The date and time when this inventory adjustment 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 adjustment 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
            adjustment 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'
        account:
          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 account to which this inventory adjustment is posted for
            tracking inventory value changes.
          example:
            id: 80000001-1234567890
            fullName: Inventory Shrinkage
        inventorySite:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The site location where inventory for the item associated with this
            inventory adjustment is stored.
          example:
            id: 80000001-1234567890
            fullName: Main Warehouse
        transactionDate:
          type: string
          format: date
          description: >-
            The date of this inventory adjustment, in ISO 8601 format
            (YYYY-MM-DD).
          example: '2024-10-01'
        refNumber:
          type:
            - string
            - 'null'
          description: >-
            The case-sensitive user-defined reference number for this inventory
            adjustment, 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: INVADJ-1234
        customer:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The customer or customer-job associated with this inventory
            adjustment.
          example:
            id: 80000001-1234567890
            fullName: Acme Corporation
        class:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The inventory adjustment'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 inventory
            adjustment's line items unless overridden at the line item level.
          example:
            id: 80000001-1234567890
            fullName: Inventory Adjustment
        memo:
          type:
            - string
            - 'null'
          description: A memo or note for this inventory adjustment.
          example: Adjusted quantity due to physical count discrepancy
        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
        lines:
          type: array
          items:
            $ref: '#/components/schemas/qbd_inventory_adjustment_line'
          description: >-
            The inventory adjustment's item lines, each representing the
            adjustment of an inventory item's quantity, value, serial number, or
            lot number.
        customFields:
          type: array
          items:
            $ref: '#/components/schemas/qbd_custom_field'
          description: >-
            The custom fields for the inventory adjustment object, added as
            user-defined data extensions, not included in the standard
            QuickBooks object.
      required:
        - id
        - objectType
        - createdAt
        - updatedAt
        - revisionNumber
        - account
        - inventorySite
        - transactionDate
        - refNumber
        - customer
        - class
        - memo
        - externalId
        - lines
        - customFields
      additionalProperties: false
      title: The Inventory Adjustment object
      x-conductor-object-type: transaction
      summary: >-
        An inventory adjustment records changes to inventory item quantities and
        values in QuickBooks Desktop, typically used to correct discrepancies
        between physical counts and system records, or to account for damage,
        theft, or other inventory changes that aren't related to purchases or
        sales.
    qbd_inventory_adjustment_line:
      type: object
      properties:
        id:
          type: string
          description: >-
            The unique identifier assigned by QuickBooks to this inventory
            adjustment line. This ID is unique across all transaction line
            types.
          example: 456DEF-1234567890
        objectType:
          type: string
          const: qbd_inventory_adjustment_line
          description: >-
            The type of object. This value is always
            `"qbd_inventory_adjustment_line"`.
          example: qbd_inventory_adjustment_line
        item:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: The inventory item associated with this inventory adjustment line.
          example:
            id: 80000001-1234567890
            fullName: Widget A
        serialNumber:
          type:
            - string
            - 'null'
          description: >-
            The serial number of the item associated with this inventory
            adjustment line. This is used for tracking individual units of
            serialized inventory items.
          example: SN1234567890
        serialNumberAction:
          type:
            - string
            - 'null'
          enum:
            - added
            - removed
            - null
          description: >-
            Indicates whether this inventory adjustment line's serial number was
            added or removed from the inventory.
          example: added
        lotNumber:
          type:
            - string
            - 'null'
          description: >-
            The lot number of the item associated with this inventory adjustment
            line. Used for tracking groups of inventory items that are purchased
            or manufactured together.
          example: LOT2023-001
        expirationDate:
          type:
            - string
            - 'null'
          format: date
          description: >-
            The expiration date for the serial number or lot number of the item
            associated with this inventory adjustment line, in ISO 8601 format
            (YYYY-MM-DD). This is particularly relevant for perishable or
            time-sensitive inventory items. Note that this field is only
            supported on QuickBooks Desktop 2023 or later.
          example: '2025-12-31'
        inventorySiteLocation:
          type:
            - object
            - 'null'
          properties:
            id:
              type:
                - string
                - 'null'
              description: >-
                The unique identifier assigned by QuickBooks to this object.
                This ID is unique across all objects of the same type, but not
                across different QuickBooks object types.
              example: 80000001-1234567890
            fullName:
              type:
                - string
                - 'null'
              description: >-
                The fully-qualified unique name for this object, formed by
                combining the names of its parent objects with its own `name`,
                separated by colons. Not case-sensitive.
              example: Parent:Child:Grandchild
          required:
            - id
            - fullName
          additionalProperties: false
          description: >-
            The specific location (e.g., bin or shelf) within the inventory site
            where the item associated with this inventory adjustment line is
            stored.
          example:
            id: 80000001-1234567890
            fullName: Aisle 3, Shelf B
        quantityDifference:
          type:
            - number
            - 'null'
          description: >-
            Either a positive or negative number that shows the change in
            quantity for the inventory item associated with this inventory
            adjustment line. A positive number increases the quantity, while a
            negative number decreases it.
          example: 5
        valueDifference:
          type:
            - number
            - 'null'
          description: >-
            Either a positive or negative number that shows the change in the
            total value of the entire stock of the inventory item associated
            with this inventory adjustment line. A positive number increases the
            value, while a negative number decreases it.
          example: 7
      required:
        - id
        - objectType
        - item
        - serialNumber
        - serialNumberAction
        - lotNumber
        - expirationDate
        - inventorySiteLocation
        - quantityDifference
        - valueDifference
      additionalProperties: false
      title: The Inventory Adjustment Line object
      x-conductor-object-type: nested
    qbd_custom_field:
      type: object
      properties:
        ownerId:
          type: string
          description: >-
            The identifier of the owner of the custom field, which QuickBooks
            internally calls a "data extension". For public custom fields
            visible in the UI, such as those added by the QuickBooks user, this
            is always "0". For private custom fields that are only visible to
            the application that created them, this is a valid GUID identifying
            the owning application. Internally, Conductor always fetches all
            public custom fields (those with an `ownerId` of "0") for all
            objects.
          example: '0'
        name:
          type: string
          description: >-
            The name of the custom field, unique for the specified `ownerId`.
            For public custom fields, this name is visible as a label in the
            QuickBooks UI.
          example: Customer Rating
        type:
          type: string
          enum:
            - amount_type
            - date_time_type
            - integer_type
            - percent_type
            - price_type
            - quantity_type
            - string_1024_type
            - string_255_type
          description: The data type of this custom field.
          example: string_1024_type
        value:
          type: string
          description: >-
            The value of this custom field. The maximum length depends on the
            field's data type.
          example: Premium
      required:
        - ownerId
        - name
        - type
        - value
      additionalProperties: false
      title: The Custom Field object
      x-conductor-object-type: nested
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your Conductor secret key using Bearer auth (e.g., `"Authorization:
        Bearer {{YOUR_SECRET_KEY}}"`).

````

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