PurchaseOrderLineItems
Create, update, delete, and query QuickBooks Purchase Order Line Items.
Table Specific Information
PurchaseOrders may be inserted, queried, or updated via the PurchaseOrders or PurchaseOrderLineItems tables. PurchaseOrders may be deleted by using the PurchaseOrders 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 a PurchaseOrder, specify the Vendor, TotalAmt, and at least one Line Item. The following shows an example of inserting multiple PurchaseOrders, each with a single line. To insert a PurchaseOrder with multiple lines, see the example on the PurchaseOrders table.
INSERT INTO PurchaseOrderLineItems#TEMP (VendorRef, Line_Amount, Line_DetailType, Line_ItemBasedExpenseLineDetail_ItemRef, TotalAmt) VALUES ('21', 0.01, 'ItemBasedExpenseLineDetail', '2', 0.03) INSERT INTO PurchaseOrderLineItems#TEMP (VendorRef, Line_Amount, Line_DetailType, Line_ItemBasedExpenseLineDetail_ItemRef, TotalAmt) VALUES ('21', 0.02, 'ItemBasedExpenseLineDetail', '3', 0.03) INSERT INTO PurchaseOrderLineItems (VendorRef, Line_Amount, Line_DetailType, Line_ItemBasedExpenseLineDetail_ItemRef, TotalAmt) SELECT VendorRef, Line_Amount, Line_DetailType, Line_ItemBasedExpenseLineDetail_ItemRef, TotalAmt FROM PurchaseOrderLineItems#TEMP
Columns
Name | Type | ReadOnly | References | Filterable | Sortable | Description |
LineId [KEY] | String | True | False | True |
The Id of the line item of the purchase order. | |
PurchaseOrderId [KEY] | String | False | True | False |
The Id of the purchase order. | |
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. | |
DocNumber | String | False | True | True |
The reference number for the transaction. | |
TxnDate | Date | False | True | True |
The date when this transaction occurred. | |
PrivateNote | String | False | False | False |
A private note about the transaction. This note will not appear on the transaction records by default. | |
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_Description | String | False | False | False |
A description of the line item that appears in the printed record. | |
Line_Amount | Decimal | False | False | False |
The amount of the line item. It represents the discount amount, charge amount, tax amount, or subtotal amount based on the value of the DetailType field. | |
Line_DetailType | String | False | False | False |
The type of line in the transaction. | |
Line_ItemBasedExpenseLineDetail_ItemRef | String | False |
Items.Id | False | False |
The Id of the item of the line item. When a line lacks an ItemRef it is treated as documentation and the Line_Amount field is ignored. |
Line_ItemBasedExpenseLineDetail_ItemRef_Name | String | True |
Items.Name | False | False |
The name of the item of the line item. When a line lacks an ItemRef it is treated as documentation and the Line_Amount field is ignored. |
Line_ItemBasedExpenseLineDetail_ClassRef | String | False |
Class.Id | False | False |
The Id of the class for the line item. |
Line_ItemBasedExpenseLineDetail_ClassRef_Name | String | True |
Class.FullyQualifiedName | False | False |
The name of the class for the line item. |
Line_ItemBasedExpenseLineDetail_UnitPrice | Decimal | False | False | False |
The price of the referenced item. | |
Line_ItemBasedExpenseLineDetail_Qty | Double | False | False | False |
The number of items for the line. | |
Line_ItemBasedExpenseLineDetail_TaxCodeRef | String | False |
TaxCodes.Id | False | False |
The sales tax code for this item. |
Line_ItemBasedExpenseLineDetail_CustomerRef | String | False |
Customers.Id | False | False |
The Id of the customer associated with the expense. |
Line_ItemBasedExpenseLineDetail_CustomerRef_Name | String | True |
Customers.DisplayName | False | False |
The name of the customer associated with the expense. |
Line_ItemBasedExpenseLineDetail_BillableStatus | String | False | False | False |
The billable status of the expense. The allowed values are Billable, NotBillable, HasBeenBilled. | |
Line_AccountBasedExpenseLineDetail_ClassRef | String | False |
Class.Id | False | False |
The Id of the class entity of the expense. |
Line_AccountBasedExpenseLineDetail_ClassRef_Name | String | True |
Class.FullyQualifiedName | False | False |
The name of the class entity of the expense. |
Line_AccountBasedExpenseLineDetail_CustomerRef | String | False |
Customers.Id | False | False |
The customer Id for the expense. |
Line_AccountBasedExpenseLineDetail_CustomerRef_Name | String | True |
Customers.DisplayName | False | False |
The customer name for the expense. |
Line_AccountBasedExpenseLineDetail_AccountRef | String | False |
Accounts.Id | False | False |
The Id of the expense account of the expense. |
Line_AccountBasedExpenseLineDetail_AccountRef_Name | String | True |
Accounts.Name | False | False |
The name of the expense account of the expense. |
Line_AccountBasedExpenseLineDetail_TaxCodeRef | String | False |
TaxCodes.Id | False | False |
The sales tax code for the expense. |
Line_AccountBasedExpenseLineDetail_BillableStatus | String | False | False | False |
The billable status of the expense. The allowed values are Billable, NotBillable, HasBeenBilled. | |
Line_AccountBasedExpenseLineDetail_MarkupInfo_Value | Double | False | False | False |
Markup value. | |
Line_AccountBasedExpenseLineDetail_MarkupInfo_Percent | Double | False | False | False |
Markup amount expressed as a percent of charges already entered in the current transaction. To enter a rate of 10% use 10.0, not 0.01. | |
VendorRef | String | False |
Vendors.Id | False | False |
The Id of the vendor for this transaction. |
VendorRef_Name | String | True |
Vendors.DisplayName | False | False |
The name of the vendor for this transaction. |
APAccountRef | String | False |
Accounts.Id | True | True |
The accounts-payable account the bill is credited to. Many/most small businesses have a single accounts-payable account, so the account can be implied. When specified, the account must be a Liability account, and further, the subtype must be of type Payables. |
APAccountRef_Name | String | True |
Accounts.Name | False | False |
The accounts-payable account to which the bill is credited. Many/most small businesses have a single accounts-payable account, so the account can be implied. When specified, the account must be a Liability account, and further, the subtype must be of type Payables. |
TotalAmt | Decimal | True | True | True |
The total amount due, determined by the sum of the line item amounts. This includes all charges, allowances, taxes, and discounts. | |
VendorAddr_Id | String | True | False | False |
The Id of the entity for the vendor address, mainly used for modifying the address. This field is assigned by the data service. | |
VendorAddr_Line1 | String | True | False | False |
First line of the vendor address. | |
VendorAddr_Line2 | String | True | False | False |
Second line of the vendor address. | |
VendorAddr_Line3 | String | True | False | False |
Third line of the vendor address. | |
VendorAddr_Line4 | String | True | False | False |
Fourth line of the vendor address. | |
VendorAddr_Line5 | String | True | False | False |
Fifth line of the vendor address. | |
VendorAddr_City | String | True | False | False |
City name. | |
VendorAddr_Country | String | True | False | False |
Country name. | |
VendorAddr_CountrySubDivisionCode | String | True | False | False |
Region within a country. For example, the state name for the USA and the province name for Canada. | |
VendorAddr_PostalCode | String | True | False | False |
Postal code. For example the zip code for the USA and Canada. | |
VendorAddr_Note | String | True | False | False |
Note for the customer. | |
VendorAddr_Lat | String | True | False | False |
The latitude coordinate of the geocoded vendor address. | |
VendorAddr_Long | String | True | False | False |
The longitude coordinate of the geocoded vendor address. | |
ShipAddr_Id | String | False | False | False |
The Id of the Intuit entity for the 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 shipping address. | |
ShipAddr_Line2 | String | False | False | False |
Second line of the shipping address. | |
ShipAddr_Line3 | String | False | False | False |
Third line of the shipping address. | |
ShipAddr_Line4 | String | False | False | False |
Fourth line of the shipping address. | |
ShipAddr_Line5 | String | False | False | False |
Fifth line of the shipping 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, state name for the USA, province name for Canada. | |
ShipAddr_PostalCode | String | False | False | False |
Postal code. For example, 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. | |
ShipMethodRef | String | False | False | False |
The Id of the entity for the shipping method. This entity is a reference type of all Ids that are taken as input or output. | |
ShipMethodRef_Name | String | True | False | False |
The name of the entity for the shipping method. This entity is a reference type of all Ids that are taken as input or output. | |
POStatus | String | False | False | False |
Enumeration of status for purchase order. The allowed values are Open, Closed. | |
TxnTaxDetail_TxnTaxCodeRef | String | False |
TaxCodes.Id | False | False |
The transaction tax code. |
TxnTaxDetail_TotalTax | String | False | False | False |
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. | |
TaxCodeRef | String | False |
TaxCodes.Id | False | False |
The tax code for the purchase. This field is valid in only the UK, AU, IN, and CA editions. |
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. This field is 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 the UK, AU, IN, and CA editions. | |
GlobalTaxCalculation | String | False | False | False |
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. |