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.
Select
All filterable columns support the following operators:
=
!=
>=
<=
>
<
IN
LIKE
CONTAINS
The driver processes other filters client-side within the driver.
Insert
To add an Invoice, specify a Customer and at least one Line Item. For example, the following will insert a new Invoice with two Line Items:\
INSERT INTO InvoiceLineItems#TEMP (CustomerRef,Line_DetailType, Line_SalesItemLineDetail_ItemRef,Line_Amount) VALUES ('4','SalesItemLineDetail', '2', 0.01)INSERT INTO InvoiceLineItems#TEMP (CustomerRef,Line_DetailType, Line_SalesItemLineDetail_ItemRef,Line_Amount) VALUES ('4','SalesItemLineDetail', '3', 0.02)INSERT INTO InvoiceLineItems (CustomerRef,Line_DetailType, Line_SalesItemLineDetail_ItemRef,Line_Amount) SELECT CustomerRef,Line_DetailType, Line_SalesItemLineDetail_ItemRef,Line_Amount FROM InvoiceLineItems#TEMP
To add lines to an existing Invoice, You'll need to specify the InvoiceId in the WHERE clause for the INSERT command. For example:\
INSERT INTO InvoiceLineItems#TEMP (InvoiceId,Line_DetailType, Line_SalesItemLineDetail_ItemRef,Line_Amount) VALUES ('1234','SalesItemLineDetail', '2', 0.01)INSERT INTO InvoiceLineItems#TEMP (InvoiceId,Line_DetailType, Line_SalesItemLineDetail_ItemRef,Line_Amount) VALUES ('1234','SalesItemLineDetail', '3', 0.02)INSERT INTO InvoiceLineItems (InvoiceId,Line_DetailType, Line_SalesItemLineDetail_ItemRef,Line_Amount) SELECT InvoiceId,Line_DetailType, Line_SalesItemLineDetail_ItemRef,Line_Amount FROM InvoiceLineItems#TEMP
Update
To update an existing Line Item, you'll need to specify the LineId. You can only update Line Items which have a Detail Type of SalesItemLineDetail.\
UPDATE InvoiceLineItems SET Line_SalesItemLineDetail_Qty=20 WHERE LineId='5656'
Delete
To delete existing Line Items, you'll need to set the LineId and InvoiceId:\
DELETE From InvoiceLineItems WHERE LineId='5656'
AND InvoiceId='1'
Columns
Name
Type
ReadOnly
References
Filterable
Sortable
Description
LineId [KEY]
String
False
false
false
The Id of the line item of the invoice.
SyncToken
String
True
false
false
Version number of the object. It is used to lock an object for use by one app at a time. As soon as an application modifies an object, its SyncToken is incremented. Attempts to modify an object specifying an older SyncToken fails. Only the latest version of the object is maintained by QuickBooks Online.
MetaData_CreateTime
Datetime
True
true
true
The time the record was created.
MetaData_LastUpdatedTime
Datetime
True
true
true
The time the record was last updated.
CustomFieldAggregate
String
False
false
false
Am XML aggregate of custom field information.
DocNumber
String
False
true
true
The reference number for the transaction.
TxnDate
Date
False
true
true
The date entered by the user when this transaction occurred.
PrivateNote
String
False
false
false
A private note for the transaction, which does not appear on the transaction records.
TxnStatus
String
False
false
false
The status of the transaction.
The allowed values are Accepted, Closed, Pending, Rejected.
LinkedTxnAggregate
String
False
false
false
An XML aggregate of transactions linked to the estimate.
Line_Id
String
False
false
false
The Id of the line item.
Line_LineNum
String
False
false
false
The line number of the line item.
Line_Description
String
False
false
false
The description of the line item.
Line_Amount
Decimal
False
false
false
The amount of the line item.
Line_DetailType
String
False
false
false
The detail type of the line item. Different detail types indicate different types of line items.
Line_SalesItemLineDetail_ItemRef_Name
String
True
Items.Name
false
false
The name of the item in the line item.
Line_SalesItemLineDetail_ClassRef_Name
String
True
Class.FullyQualifiedName
false
false
The name of the class in the line item.
Line_SalesItemLineDetail_UnitPrice
Decimal
False
false
false
The unit price of the item.
Line_SalesItemLineDetail_Qty
Double
False
false
false
The number of items for the line item.
Line_SalesItemLineDetail_DiscountAmt
Decimal
False
false
false
The discount rate applied to an individual line item. If both DiscountAmt and DiscountRate are supplied, DiscountRate takes precedence and DiscountAmt is recalculated by QuickBooks services based on amount of DiscountRate.
Line_SalesItemLineDetail_ServiceDate
Date
False
false
false
The service date for the item.
Line_GroupLineDetail_GroupItemRef
String
True
false
false
The Id of the group item object.
Line_GroupLineDetail_GroupItemRef_Name
String
True
false
false
The name of the group item object.
Line_GroupLineDetail_Quantity
Integer
True
false
false
The amount of the group item.
Line_DiscountLineDetail_ClassRef_Name
String
True
Class.FullyQualifiedName
false
false
The name of the class in the line item.
Line_DiscountLineDetail_TaxCodeRef_Name
String
True
TaxCodes.Name
false
false
The name for the tax sales code.
Line_DiscountLineDetail_PercentBased
Boolean
False
false
false
True if the discount is a percentage; null or false if discount based on amount.
Line_DiscountLineDetail_DiscountAccountRef
String
False
false
false
The discount code for the item.
Line_DiscountLineDetail_DiscountAccountRef_Name
String
True
false
false
The name for the discount account.
Line_DiscountLineDetail_DiscountPercent
Decimal
False
false
false
Percentage by which the amount due is reduced, from 0% to 100%. To enter a discount of 8.5% use 8.5, not 0.085.
TxnTaxDetail_TotalTax
String
False
false
false
The total tax calculated for the transaction, excluding any tax lines manually inserted into the transaction line list.
TxnTaxDetail_TaxLineAggregate
String
False
false
false
An XML aggregate of tax line items.
CustomerMemo
String
False
false
false
The message to the customer, which appears in the invoice and the printed invoice.
BillAddr_Id
String
False
false
false
The Id of the entity for the billing address, mainly used for modifying the address. This field is assigned by the data service.
BillAddr_Line1
String
False
false
false
First line of the address.
BillAddr_Line2
String
False
false
false
Second line of the address.
BillAddr_Line3
String
False
false
false
Third line of the address.
BillAddr_Line4
String
False
false
false
Fourth line of the address.
BillAddr_Line5
String
False
false
false
Fifth line of the address.
BillAddr_City
String
False
false
false
City name.
BillAddr_Country
String
False
false
false
Country name.
BillAddr_CountrySubDivisionCode
String
False
false
false
Region within a country. For example, the state name for the USA or the province name for Canada.
BillAddr_PostalCode
String
False
false
false
Postal code. For example, the zip code for the USA and Canada.
BillAddr_Note
String
False
false
false
Note for the customer.
BillAddr_Lat
String
False
false
false
The latitude coordinate of the geocoded billing address.
BillAddr_Long
String
False
false
false
The longitude coordinate of the geocoded billing address.
ShipAddr_Id
String
False
false
false
The Id of the entity for the shipping address, mainly used for modifying the address. This field is assigned by the data service.
ShipAddr_Line1
String
False
false
false
First line of the address.
ShipAddr_Line2
String
False
false
false
Second line of the address.
ShipAddr_Line3
String
False
false
false
Third line of the address.
ShipAddr_Line4
String
False
false
false
Fourth line of the address.
ShipAddr_Line5
String
False
false
false
Fifth line of the address.
ShipAddr_City
String
False
false
false
City name.
ShipAddr_Country
String
False
false
false
Country name.
ShipAddr_CountrySubDivisionCode
String
False
false
false
Region within a country. For example, the state name for the USA and the province name for Canada.
ShipAddr_PostalCode
String
False
false
false
Postal code. For example, the zip code for the USA and Canada.
ShipAddr_Note
String
False
false
false
Note for the customer.
ShipAddr_Lat
String
False
false
false
The latitude coordinate of the geocoded shipping address.
ShipAddr_Long
String
False
false
false
The longitude coordinate of the geocoded shipping address.
ClassRef_Name
String
True
Class.FullyQualifiedName
false
false
The name of the class associated with the transaction.
SalesTermRef_Name
String
True
Terms.Name
false
false
The name of the sales terms associated with the transaction.
DueDate
Date
False
true
false
The date when the invoice is to be paid, not including any early payment discount incentives or late payment penalties. If the date is not supplied, the current date on the server is used.
ShipMethodRef
String
False
false
false
The Id of the shipping method associated with the transaction.
ShipMethodRef_Name
String
True
false
false
The name of the shipping method associated with the transaction.
ShipDate
Date
False
false
false
The date for delivery of goods or services.
TrackingNum
String
False
false
false
The tracking number for the shipping provider for the delivery of the goods associated with the transaction.
TotalAmt
Decimal
True
true
true
The total amount of the transaction. This includes the total of all the charges, allowances, and taxes.
PrintStatus
String
False
false
false
The print status of the invoice.
The allowed values are NotSet, NeedToPrint, PrintComplete.
The default value is NotSet.
EmailStatus
String
False
false
false
The email status of the invoice.
The allowed values are NotSet, NeedToSend, EmailSent.
The default value is NotSet.
BillEmail_Address
String
False
false
false
The email address where the invoice is sent. If the value of EmailStatus is NeedToSend, BillEmail is a required input.
Balance
Decimal
True
true
true
This field indicates whether the transaction is a finance charge.
DepartmentRef
String
False
Departments.Id
false
false
The Id of the department, which stores the location of the transaction as defined using location tracking in QuickBooks Online.
DepartmentRef_Name
String
True
Departments.Name
false
false
The name of the department, which stores the location of the transaction as defined using location tracking in QuickBooks Online.
AllowOnlineCreditCardPayment
Boolean
False
false
false
It specifies if online credit card payments are allowed for this invoice and corresponds to the Cards online payment check box on the QuickBooks UI.
ApplyTaxAfterDiscount
Boolean
False
false
false
This field sets whether discounts are applied before the tax is calculated.
CurrencyRef
String
False
false
false
The Id of the currency used in the transaction.
CurrencyRef_Name
String
True
false
false
The name of the currency used in the transaction.
ExchangeRate
Decimal
False
false
false
The currency exchange rate. Valid only if the company file is set up to use multicurrency feature. In QuickBooks, exchange rates are always recorded as the number of home currency units it takes to equal one foreign currency unit. This field is available for only the UK, AU, IN, and CA editions.
GlobalTaxCalculation
String
False
false
false
The method in which tax is applied. This field is valid in the UK, AU, IN, and CA editions.
The allowed values are TaxExcluded, TaxInclusive, NotApplicable.
HomeTotalAmt
Decimal
True
false
false
The total amount of the transaction in the home currency. Includes the total of all the charges, allowances, and taxes. This field is valid in the UK, AU, IN, and CA editions.
Last updated