InvoiceLineItems
Create, update, delete, and query QuickBooks Invoice Line Items.
Table Specific Information
Invoices may be inserted, queried, or updated via the Invoices or InvoiceLineItems tables. Invoices may be deleted by using the Invoices table.
This table has a Custom Fields column. See the Custom Fields page for more information.
Select
By default, SupportEnhancedSQL is set to true, and the following will be honored if present. Other filters will be executed client side. If SupportEnhancedSQL is set to false, only the following filters will be honored.
QuickBooks allows only a small subset of columns to be used in the WHERE clause of a SELECT query. These columns can typically be used with only the equals or = comparison. The available columns for Invoices are Id, Date, TimeModified, ReferenceNumber, CustomerName, CustomerId, IsPaid, Account, and AccountId. TimeModified and Date may be used with the >, >=, <, <=, or = conditions and may be used twice to specify a range. ReferenceNumber may be used with the = or LIKE conditions to establish a starts-with, ends-with, or contains syntax. For example:
SELECT * FROM InvoiceLineItems WHERE TimeModified > '1/1/2011' AND TimeModified < '2/1/2011' AND ReferenceNumber LIKE '%12345%'
Insert
To add an Invoice, specify a Customer and at least one Line Item. All Line Item columns can be used for inserting multiple Line Items for a new Invoice transaction. For example, the following will insert a new Invoice with two Line Items:
INSERT INTO InvoiceLineItems#TEMP (CustomerName, ItemName, ItemQuantity) VALUES ('Abercrombie, Kristy', 'Repairs', 1) INSERT INTO InvoiceLineItems#TEMP (CustomerName, ItemName, ItemQuantity) VALUES ('Abercrombie, Kristy', 'Removal', 2) INSERT INTO InvoiceLineItems (CustomerName, ItemName, ItemQuantity) SELECT CustomerName, ItemName, ItemQuantity FROM InvoiceLineItems#TEMP
Columns
Name | Type | ReadOnly | References | ColumnSize | Description |
ID [KEY] | String | True | 255 |
The unique identifier in the format InvoiceId|ItemLineId. | |
InvoiceId | String | False |
Invoices.ID |
The unique identifier of the Invoice. | |
ReferenceNumber | String | False | 21 |
The transaction reference number. | |
TxnNumber | Integer | True |
The transaction number. An identifying number for the transaction, different from the QuickBooks-generated Id. | ||
CustomerName | String | False | 1000 |
The name of the customer on the invoice. Either CustomerName or CustomerId must have a value when inserting. | |
CustomerId | String | False |
Customers.ID | 255 |
The Id of the customer on the invoice. Alternatively give this field a value when inserting instead of CustomerName. |
Account | String | False | 1000 |
A reference to the accounts-receivable account where the money received from this transaction will be deposited. | |
AccountId | String | False |
Accounts.ID | 255 |
A reference to the accounts-receivable account where the money received from this transaction will be deposited. |
Date | Date | False |
The date of the transaction. If it is set in the WHERE clause of a SELECT query, the pseudo columns StartDate and EndDate are overwritten with the value. | ||
ShipMethod | String | False | 1000 |
The shipping method associated with the invoice. | |
ShipMethodId | String | False | 255 |
The shipping method associated with the invoice. | |
ShipDate | Date | False |
The shipping date associated with the invoice. | ||
Memo | String | False | 5000 |
A memo regarding this transaction. | |
Class | String | False | 1000 |
A reference to the class of the transaction. | |
ClassId | String | False |
Class.ID | 255 |
A reference to the class of the transaction. |
Amount | Decimal | True |
The total amount for this invoice. | ||
Message | String | False | 101 |
A message to the vendor or customer to appear in the invoice. | |
MessageId | String | False | 255 |
A message to vendor or customer to appear in the invoice. | |
SalesRep | String | False | 5 |
A reference to the (initials of) sales rep. | |
SalesRepId | String | False |
SalesReps.ID | 255 |
A reference to the sales rep. |
FOB | String | False | 13 |
Freight on board: The place to ship from. | |
BillingAddress | String | True |
Full billing address returned by QuickBooks. | ||
BillingLine1 | String | False | 500 |
First line of the billing address. | |
BillingLine2 | String | False | 500 |
Second line of the billing address. | |
BillingLine3 | String | False | 500 |
Third line of the billing address. | |
BillingLine4 | String | False | 500 |
Fourth line of the billing address. | |
BillingLine5 | String | False | 41 |
Fifth line of the billing address. | |
BillingCity | String | False | 255 |
City name for the billing address. | |
BillingState | String | False | 255 |
State name for the billing address. | |
BillingPostalCode | String | False | 30 |
Postal code for the billing address. | |
BillingCountry | String | False | 255 |
Country for the billing address. | |
BillingNote | String | False | 41 |
A note for the billing address. | |
ShippingAddress | String | True |
Full shipping address returned by QuickBooks. | ||
ShippingLine1 | String | False | 500 |
First line of the shipping address. | |
ShippingLine2 | String | False | 500 |
Second line of the shipping address. | |
ShippingLine3 | String | False | 500 |
Third line of the shipping address. | |
ShippingLine4 | String | False | 500 |
Fourth line of the shipping address. | |
ShippingLine5 | String | False | 41 |
Fifth line of the shipping address. | |
ShippingCity | String | False | 255 |
City name for the shipping address. | |
ShippingState | String | False | 255 |
State name for the shipping address. | |
ShippingPostalCode | String | False | 30 |
Postal code for the shipping address. | |
ShippingCountry | String | False | 255 |
Country for the shipping address. | |
ShippingNote | String | False | 41 |
A note for the shipping address. | |
Subtotal | Decimal | True |
The gross subtotal of the invoice. This does not include tax or amount already paid. | ||
Tax | Double | True |
The total sales tax applied to this transaction. | ||
TaxItem | String | False | 100 |
A sales tax item refers to a single sales tax that is collected at a specified rate and paid to a single agency. | |
TaxItemId | String | False | 255 |
A sales tax item refers to a single sales tax that is collected at a specified rate and paid to a single agency. | |
TaxPercent | Double | True |
The percentage charged for sales tax. | ||
PONumber | String | False | 25 |
The purchase order number. | |
DueDate | Date | False |
The date when payment is due. | ||
Terms | String | False | 100 |
The payment terms. | |
TermsId | String | False | 255 |
The payment terms. | |
CustomFields | String | False |
Custom fields returned from QuickBooks and formatted into XML. | ||
ItemLineId | String | True |
The line item identifier. | ||
ItemLineNumber | String | True | 255 |
The line item number. | |
ItemName | String | False | 1000 |
The item name. | |
ItemId | String | False |
Items.ID | 255 |
The item identifier. |
ItemGroup | String | False | 100 |
Item group name. Reference to a group of line items this item is part of. | |
ItemGroupId | String | False |
Items.ID | 255 |
Item group Id. Reference to a group of line items this item is part of. |
ItemDescription | String | False | 5000 |
A description of the item. | |
ItemUnitOfMeasure | String | False | 31 |
In a transaction line item, the name of the unit of measure is selected from within the item's available units. If the company file is enabled only for single unit of measure per item, this must be the base unit. Only available in QBXML Version 7.0 and above. | |
ItemQuantity | Double | False |
The quantity of the item or item group specified in this line. | ||
ItemRate | Double | False |
The unit rate charged for this item. | ||
ItemRatePercent | Double | False |
The rate precent charged for this item. | ||
ItemTaxCode | String | False | 3 |
Sales tax information for this item (taxable or nontaxable). | |
ItemTaxCodeId | String | False | 255 |
Sales tax information for this item. | |
ItemAmount | Decimal | False |
Total amount for this item. | ||
ItemClass | String | False | 1000 |
The class name of the item. | |
ItemClassId | String | False |
Class.ID | 255 |
The class name of the item. |
ItemServiceDate | Date | False |
The service date for the item if the item is a type of service. | ||
ItemInventorySiteId | String | False | 31 |
The inventory site Id of this item. This requires QBXML version at least 10.0 and the Advanced Inventory add-on. | |
ItemInventorySiteName | String | False | 255 |
The inventory site name of this item. This requires QBXML version at least 10.0 and the Advanced Inventory add-on. | |
ItemInventorySiteLocationId | String | False | 31 |
The inventory site location Id of this item. This requires QBXML version at least 10.0 and the Advanced Inventory add-on. | |
ItemInventorySiteLocationName | String | False | 255 |
The inventory site location name of this item. This requires QBXML version at least 10.0 and the Advanced Inventory add-on. | |
ItemSerialNumber | String | False | 5000 |
The serial number of this item. This requires QBXML version at least 11.0 and the Advanced Inventory add-on. | |
ItemLotNumber | String | False | 40 |
The lot number of this item. This requires QBXML version at least 11.0 and the Advanced Inventory add-on. | |
ItemExpirationDateForSerialLotNumber | String | True | 1099 |
The expiration date for serial lot number of this item. It is supported from QB Desktop 2023 version 3 (USA & Canada) and SDK 16.0. | |
ItemOther1 | String | False | 29 |
The Other1 field of this line item. QBXMLVersion must be set to 6.0 or higher. | |
ItemOther2 | String | False | 29 |
The Other2 field of this line item. QBXMLVersion must be set to 6.0 or higher. | |
ItemCustomFields | String | False |
The custom fields for this line item. | ||
ItemUOMSetFullName | String | False | 1000 |
Indicates the price of something as a percent. | |
ItemUOMSetListID | String | False | 1000 |
Indicates the price of something as a percent. | |
ItemIsGetPrintItemsInGroup | String | False | 1000 |
If true, a list of this group's individual items their amounts will appear on printed forms. | |
AppliedAmount | Decimal | True |
The total amount of applied credits and payments. | ||
Balance | Decimal | False |
The unpaid amount for this sale. | ||
CustomerTaxCode | String | False | 3 |
The tax code specific to this customer. | |
CustomerTaxCodeId | String | False | 255 |
The tax code specific to this customer. | |
IsToBePrinted | Boolean | False |
Whether this invoice is to be printed. | ||
IsToBeEmailed | Boolean | False |
Whether this invoice is to be emailed. | ||
IsPaid | Boolean | True |
Whether this invoice has been paid in full. | ||
IsTaxIncluded | Boolean | False |
Determines if tax is included in the transaction amount. | ||
IsPending | Boolean | False |
The transaction status (whether this transaction has been completed or it is still pending). | ||
IsFinanceCharge | String | False | 16 |
Whether this invoice includes a finance charge. 使用できる値は次のとおりです。NotSet, IsFinanceCharge, NotFinanceCharge デフォルト値はNotSetです。 | |
Template | String | False | 100 |
A reference to a template specifying how to print the transaction. | |
TemplateId | String | False |
Templates.ID | 255 |
A reference to a template specifying how to print the transaction. |
SuggestedDiscountAmount | Decimal | False |
A suggested discount amount for the invoice. | ||
SuggestedDiscountDate | Date | False |
A suggested discount date for the invoice. | ||
ExchangeRate | Double | False |
Currency exchange rate for this invoice. | ||
BalanceInHomeCurrency | Double | False |
Balance remaining in units of the home currency. | ||
CurrencyName | String | False | 64 |
Name of the currency code used for this invoice. | |
CurrencyId | String | False |
Currency.ID | 1000 |
Id of the currency code used for this invoice. |
Other | String | False | 29 |
Other data associated with the invoice. The QBXMLVersion connection property must be set to 6.0 for this field to be available. | |
EditSequence | String | True | 16 |
An identifier used for versioning for this copy of the object. | |
TimeModified | Datetime | True |
When the invoice was last modified. | ||
TimeCreated | Datetime | True |
When the invoice was created. |
Pseudo-Columns
Pseudo Column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
Name | Type | Description |
LinkToTxnId | String |
Link this transaction to another transaction. This is only available during inserts and requires a minimum QBXML Version 6.0. |
SetCreditAggregate | String |
Apply multiple credit Memos to this transaction. This is only available during inserts and updates requires a minimum QBXML Version 10.0 |
ItemLinkToTxnId | String |
Link this individual line item to another transaction. This is only available during inserts and requires a minimum QBXML Version 6.0 |
ItemLinkToTxnLineId | String |
Link this individual line item to another transaction line item. This is only available during inserts and requires a minimum QBXML Version 6.0. |
ItemOverrideAccount | String |
The Account Name used to override the default Account for the Item. This is only available during inserts and updates. |
ItemOverrideAccountId | String |
The Account Id used to override the default Account for the Item. This is only available during inserts and updates. |