InventoryAdjustments
Represents inventory adjustments in QuickBooks Online, enabling you to create, modify, delete, and retrieve quantity adjustments for inventory items.
Table Specific Information
Inventory Adjustments may be inserted, deleted, updated, or queried via the InventoryAdjustments or InventoryAdjustmentLineItems tables. Inventory Adjustments may be deleted by using the InventoryAdjustments table.
Select
All filterable columns support the following operators:
- =
- >=
- <=
- >
- <
The driver processes other filters client-side within the driver.
Select
For example, the following queries are processed server-side:
select * from InventoryAdjustments where Id='110'
select * from InventoryAdjustments where MetaData_CreateTime = '2024-10-15 15:44:40.0'
select * from InventoryAdjustments where MetaData_CreateTime >= '2024-10-15 15:44:40.0'
select * from InventoryAdjustments where MetaData_CreateTime <= '2024-10-15 15:44:40.0'
select * from InventoryAdjustments where MetaData_CreateTime < '2024-10-15 15:44:40.0'
select * from InventoryAdjustments where MetaData_CreateTime > '2024-10-15 15:44:40.0'
select * from InventoryAdjustments where Id IN ('112','148')
Insert
To add an Inventory Adjustment, specify the TxnDate, AdjustAccountRef columns and at least one Line Item. The LineAggregate column may be used to specify an XML aggregate of Line Item data. Each _ denotes hierarchy. Use <Line> at the base level. The contents of LineAggregate will be sent to the API as is. All values for each field in the aggregate should adhere to the API's specifications (e.g. for dates in format yyyy-MM-dd, for date times in format yyyy-MM-dd'T'HH:mm:sszzz). The columns that may be used in the aggregates begin with the prefix 'Line_' to indicate they are part of the line item. Use the Line_ column along with the DocNumber to indicate which lines go with which Inventory Adjustments. For example:
INSERT INTO InventoryAdjustments (TxnDate, DocNumber, PrivateNote, AdjustAccountRef, LineAggregate)
VALUES ('2024-12-03', 'ADJ-001', 'Inventory adjustment for damaged goods', '34', '
<Line><DetailType>ItemAdjustmentLineDetail</DetailType><ItemAdjustmentLineDetail><ItemRef>11</ItemRef><QtyDiff>-5</QtyDiff></ItemAdjustmentLineDetail></Line>
<Line><DetailType>ItemAdjustmentLineDetail</DetailType><ItemAdjustmentLineDetail><ItemRef>17</ItemRef><QtyDiff>-100</QtyDiff></ItemAdjustmentLineDetail></Line>
')
Update
UPDATE InventoryAdjustments SET DocNumber = 'CORRECTED-145', PrivateNote = 'Corrected inventory count' WHERE Id = '145'
Delete
DELETE FROM InventoryAdjustments WHERE Id='149'
GetDeleted
GETDELETED FROM InventoryAdjustments
Columns
| Name | Type | ReadOnly | References | Filterable | Sortable | Description |
| Id [KEY] | String | True | True | False |
The identifier (Id) of the inventory adjustment. This Id uniquely identifies the inventory adjustment record within QuickBooks Online. | |
| SyncToken | String | True | False | False |
The version number that is assigned to the inventory adjustment object. The sync token locks the object for one application at a time, and QuickBooks Online increments it after each modification. An update or delete operation that uses an older sync token fails, ensuring that only the latest version of the object is maintained. | |
| MetaData_CreateTime | Datetime | True | True | True |
The date and time when the inventory adjustment record was originally created in QuickBooks Online. The CreateTime value provides a reference point for auditing and synchronization. | |
| MetaData_LastModifiedByRef | Long | True | False | False |
The identifier of the user who last modified the inventory adjustment record. This reference tracks who made the most recent changes to the record for auditing purposes. | |
| MetaData_LastUpdatedTime | Datetime | True | True | True |
The date and time when the inventory adjustment record was last updated in QuickBooks Online. The LastUpdatedTime value helps track changes and identify the most recent version of the record. | |
| DocNumber | String | False | False | False |
The document reference number that is associated with the transaction. This document number allows users to match QuickBooks transactions to external documents such as inventory adjustment forms. | |
| TxnDate | Date | False | False | False |
The date that is entered by the user for when this transaction occurred. This date is used as the posting date in financial statements. | |
| PrivateNote | String | False | False | False |
A private, internal note about the transaction. The private note does not appear on printed or shared transaction records by default. | |
| LineAggregate | String | False | False | False |
An XML aggregate that contains the line items that are associated with the inventory adjustment. This column enables applications to retrieve related lines in a structured format. | |
| AdjustAccountRef | String | False |
Accounts.Id | False | False |
The Id of the account that is used for this inventory adjustment. This Id connects the adjustment to the correct account in the chart of accounts for recording inventory changes. |
| AdjustAccountRef_Name | String | False |
Accounts.Name | False | False |
The name of the account that is used for this inventory adjustment. This name is the human-readable counterpart to the AdjustAccountRef Id. |