PurchaseOrders
Stores header-level purchase order information, including vendor, order date, expected delivery, and total value, supporting procurement and vendor management.
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 |
Specifies the unique identifier (Id) of the purchase order. This Id is used to retrieve, update, or reconcile this purchase order in QuickBooks Online. | |
| SyncToken | String | True | False | False |
The version number of the object that is used to lock the object for use by one application at a time. As soon as an application modifies an object, its sync token is incremented. Attempts to modify an object specifying an older sync token fail. Only the latest version of the object is maintained by QuickBooks Online. | |
| MetaData_CreateTime | Datetime | True | True | True |
The date and time when the purchase order record was created in QuickBooks Online. | |
| MetaData_LastUpdatedTime | Datetime | True | True | True |
The date and time when the purchase order record was last updated in QuickBooks Online. This information is useful for synchronizing or auditing changes. | |
| DocNumber | String | False | True | True |
Specifies the reference number for the purchase-order transaction. This is often used by businesses to match purchase orders to vendor invoices. | |
| TxnDate | Date | False | True | True |
The date entered by the user when this purchase-order transaction occurred. This date is used for reporting, approvals, and audit tracking. | |
| PrivateNote | String | False | False | False |
A private internal note about the purchase-order transaction. This note does not appear on vendor-facing documents. | |
| LinkedTxnAggregate | String | False | False | False |
An XML aggregate containing all transactions that are linked to this purchase order, such as bills or payments. This collection enables QuickBooks Online to show the full lifecycle of a purchase order. | |
| LineAggregate | String | False | False | False |
An XML aggregate containing all line items included in this purchase order. This allows the full details of the order to be stored in a structured format for reporting or integration. | |
| CustomFieldAggregate | String | False | False | False |
An XML aggregate containing custom field information that is defined by the company for this purchase order. This collection can be used for tracking additional attributes like internal codes, job numbers, or custom classifications. | |
| VendorRef | String | False |
Vendors.Id | False | False |
Specifies the unique Id of the vendor that is associated with the purchase order. This Id ties the purchase order back to a specific vendor record in QuickBooks Online. |
| VendorRef_Name | String | True |
Vendors.DisplayName | False | False |
Specifies the name of the vendor that is associated with the purchase order. This name is a human-readable reference to the vendor Id. |
| APAccountRef | String | False |
Accounts.Id | False | False |
Specifies the unique Id of the accounts-payable account to which the vendor's bill for this purchase order is credited. This account is implied when a company has a single accounts-payable account. When this column is specified, the account must be a Liability account and the subtype must be of type Payables. |
| APAccountRef_Name | String | True |
Accounts.Name | False | False |
Specifies the name of the accounts-payable account to which the vendor's bill for this purchase order 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 |
Specifies the total amount due on the purchase order, determined by summing the amounts of all line items. This total includes all charges, allowances, taxes, and discounts. | |
| VendorAddr_Id | String | True | False | False |
Specifies the Id of the Intuit entity for the vendor address. This Id is mainly used for modifying the address and is assigned by the data service. | |
| VendorAddr_Line1 | String | True | False | False |
The first line of the vendor address, typically containing a street address or P.O. box. | |
| VendorAddr_Line2 | String | True | False | False |
The second line of the vendor address, typically used for additional street information or suite numbers. | |
| VendorAddr_Line3 | String | True | False | False |
The third line of the vendor address, often used for secondary address details. | |
| VendorAddr_Line4 | String | True | False | False |
The fourth line of the vendor address, available for further detail if needed. | |
| VendorAddr_Line5 | String | True | False | False |
The fifth line of the vendor address, available for further detail if needed. | |
| VendorAddr_City | String | True | False | False |
Specifies the city name of the vendor address. | |
| VendorAddr_Country | String | True | False | False |
Specifies the country name of the vendor address. | |
| VendorAddr_CountrySubDivisionCode | String | True | False | False |
Specifies the region within the country of the vendor address. For example, this value is the state name for the USA or the province name for Canada. | |
| VendorAddr_PostalCode | String | True | False | False |
Specifies the postal code of the vendor address. For example, this value is the ZIP code for the USA or the postal code for Canada. | |
| VendorAddr_Lat | String | True | False | False |
The latitude coordinate of the geocoded vendor address for location mapping. | |
| VendorAddr_Long | String | True | False | False |
The longitude coordinate of the geocoded vendor address for location mapping. | |
| ShipAddr_Id | String | False | False | False |
Specifies the Id of the Intuit entity for the shipping address. This Id is mainly used for modifying the address and is assigned by the data service. | |
| ShipAddr_Line1 | String | False | False | False |
The first line of the shipping address, typically containing a street address or P.O. box. | |
| ShipAddr_Line2 | String | False | False | False |
The second line of the shipping address, typically used for additional street information or suite numbers. | |
| ShipAddr_Line3 | String | False | False | False |
The third line of the shipping address, often used for secondary address details. | |
| ShipAddr_Line4 | String | False | False | False |
The fourth line of the shipping address, available for further detail if needed. | |
| ShipAddr_Line5 | String | False | False | False |
The fifth line of the shipping address, available for further detail if needed. | |
| ShipAddr_City | String | False | False | False |
Specifies the city name of the shipping address. | |
| ShipAddr_Country | String | False | False | False |
Specifies the country name of the shipping address. | |
| ShipAddr_CountrySubDivisionCode | String | False | False | False |
Specifies the region within the country of the shipping address. For example, this value is the state name for the USA or the province name for Canada. | |
| ShipAddr_PostalCode | String | False | False | False |
Specifies the postal code of the shipping address. For example, this value is the ZIP code for the USA or the postal code for Canada. | |
| ShipAddr_Lat | String | False | False | False |
The latitude coordinate of the geocoded shipping address for location mapping. This can be used for routing, logistics, or verification. | |
| ShipAddr_Long | String | False | False | False |
The longitude coordinate of the geocoded shipping address for location mapping. This can be used for routing, logistics, or verification. | |
| ShipMethodRef | String | False | False | False |
Specifies the unique Id of the shipping method that is associated with the purchase order. This field references a list of all shipping methods that are available as input or output. | |
| ShipMethodRef_Name | String | True | False | False |
Specifies the name of the shipping method that is associated with the purchase order. This field references a list of all shipping methods that are available as input or output. | |
| POStatus | String | False | False | False |
Indicates the current status of the purchase order as an enumerated value (for example, Open, Closed, Pending). This status helps track the purchase order lifecycle. The allowed values are Open, Closed. | |
| POEmail_Address | String | False | False | False |
Specifies the e-mail address that is associated with the purchase order for vendor communication. This is the destination address where purchase order notifications are sent. The allowed values are Open, Closed. | |
| TxnTaxDetail_TxnTaxCodeRef | String | False |
TaxCodes.Id | False | False |
Specifies the tax code that is applied to the purchase-order transaction. This determines which tax rates are used when calculating the total tax. |
| TxnTaxDetail_TotalTax | String | False | False | False |
Specifies the total tax calculated for the purchase-order transaction. This amount excludes any tax lines that are manually inserted into the transaction line list. | |
| TxnTaxDetail_TaxLineAggregate | String | False | False | False |
An XML aggregate containing all individual tax line items associated with the purchase order. This provides a structured breakdown of applied taxes. | |
| CurrencyRef | String | False | False | False |
Specifies the unique Id of the currency used in the purchase-order transaction. This field supports multicurrency operations in QuickBooks Online. | |
| CurrencyRef_Name | String | True | False | False |
Specifies the name of the currency used in the purchase-order transaction. This is a human-readable reference to the CurrencyRef field. | |
| ExchangeRate | Decimal | False | False | False |
Specifies the currency exchange rate used for the purchase-order transaction. This field is valid only when 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, and CA editions. | |
| GlobalTaxCalculation | String | False | False | False |
Specifies the method used to apply taxes to the purchase-order transaction (for example, TaxInclusive, TaxExclusive). This field is valid in the UK, AU, and CA editions. The allowed values are TaxExcluded, TaxInclusive, NotApplicable. | |
| TransactionLocationType | String | False | False | False |
Specifies the account location used for reporting and tax purposes. This field is valid only in the FR editions of QuickBooks Online. The allowed values are WithinFrance, FranceOverseas, OutsideFranceWithEU, OutsideEU. | |
| EmailStatus | String | False | False | False |
Indicates the current e-mail status of the purchase order (for example, NotSent, Sent, Viewed). This is used to track whether the purchase order has been communicated to the vendor. The allowed values are NotSet, NeedToSend, EmailSent. | |
| POEmailAddress | String | False | False | False |
Specifies the vendor's e-mail address where the purchase order request is sent. This ensures that the purchase order is delivered to the correct recipient for processing. |