PurchaseOrders
Create, update, delete, and query QuickBooks Purchase Orders.
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.
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 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 PurchaseOrders. For example:
INSERT INTO PurchaseOrders (VendorRef, TotalAmt, LineAggregate) VALUES ('21', '0.03', ' <Line><Amount>0.01</Amount><DetailType>ItemBasedExpenseLineDetail</DetailType><ItemBasedExpenseLineDetail><ItemRef>2</ItemRef></ItemBasedExpenseLineDetail></Line> <Line><Amount>0.02</Amount><DetailType>ItemBasedExpenseLineDetail</DetailType><ItemBasedExpenseLineDetail><ItemRef>3</ItemRef></ItemBasedExpenseLineDetail></Line> ')
Columns
Name | Type | ReadOnly | References | Filterable | Sortable | Description |
Id [KEY] | String | True | True | True |
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 entered by the user 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. | |
LineAggregate | String | False | False | False |
An XML aggregate of line items in the transaction. | |
VendorRef | String | False |
Vendors.Id | False | False |
The Id of the vendor. |
VendorRef_Name | String | True |
Vendors.DisplayName | False | False |
The name of the vendor. |
APAccountRef | String | False |
Accounts.Id | True | True |
The Id of the accounts-payable account to which the bill is credited. This account is implied when a company has a single accounts-payable account. When specified, the account must be a Liability account and the subtype must be of type Payables. |
APAccountRef_Name | String | True |
Accounts.Name | False | False |
The name of the accounts-payable account to which the bill is credited. This account is implied when a company has a single accounts-payable account. When specified, the account must be a Liability account and 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 |
Id of the Intuit 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 address. | |
VendorAddr_Line2 | String | True | False | False |
Second line of the address. | |
VendorAddr_Line3 | String | True | False | False |
Third line of the address. | |
VendorAddr_Line4 | String | True | False | False |
Fourth line of the address. | |
VendorAddr_Line5 | String | True | False | False |
Fifth line of the 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 |
Latitude coordinate of the geocoded vendor address. | |
VendorAddr_Long | String | True | False | False |
Longitude coordinate of the geocoded vendor address. | |
ShipAddr_Id | String | False | False | False |
Id of the Intuit entity for the shipping address, mainly used for modifying the address. Read-only; 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, state name for USA, province name for Canada. | |
ShipAddr_PostalCode | String | False | False | False |
Postal code. For example, zip code for USA and Canada. | |
ShipAddr_Note | String | False | False | False |
Note for the customer. | |
ShipAddr_Lat | String | False | False | False |
Latitude coordinate of the Geocode (Geospacial Entity Object Code). | |
ShipAddr_Long | String | False | False | False |
Longitude coordinate of the Geocode (Geospacial Entity Object Code). | |
ShipMethodRef | String | False | False | False |
Reference type of all Ids that are taken as input or output. | |
ShipMethodRef_Name | String | True | False | False |
Reference type of all Ids that are taken as input or output. | |
POStatus | String | False | False | False |
Enumeration of the purchase order status. The allowed values are Open, Closed. | |
POEmail_Address | String | False | False | False |
Enumeration of the purchase order status. The allowed values are Open, Closed. | |
TxnTaxDetail_TxnTaxCodeRef | String | False |
TaxCodes.Id | False | False |
The tax code of the transaction. |
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 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 |
Currency exchange rate. This field is valid only if the company file is set up to use the 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 |
The method used to apply the tax. This field is valid in the UK, AU, IN, and CA editions. The allowed values are TaxExcluded, TaxInclusive, NotApplicable. |