PurchaseOrders
This entity describes an Autotask Inventory module Purchase Order. Purchase orders allow users to track one or more products ordered and received from Vendor type accounts. Purchase orders must be submitted (Status = Submitted ) before items can be received. Autotask users create and manage purchase orders from the Inventory module.
The PurchaseOrders entity works together with the PurchaseOrderItem and PurchaseOrderReceive entities to track products ordered and received. PurchaseOrderItems describes an item ordered on the associated PurchaseOrder. PurchaseOrderReceive describes the transaction where the quantity of PurchaseOrderItems received (PurchaseOrderItem.quantityNowReceiving) is debited from PurchaseOrderItem.Quantity, and added to the quantityOnHand value of the associated InventoryItem entity. For more transaction details, refer to PurchaseOrderItemReceiving.
NOTE You can refer to the Online Help to find root and child access URLs of the entity you wish to query. Refer to Finding resource and child access URLs of REST API entities for more information.
Entity details
Entity Name: | PurchaseOrders |
Entity Path: |
/atservicesrest/v1.0/PurchaseOrders |
Can Create: | |
Can Update: | |
Can Query: | |
Can Delete: | |
Can Have UDFs: |
IMPORTANT Requests to this entity require special handling. Refer to the Entity URLs and relationships section of this article for details.
- If this entity has a Parent relationship, you must perform all Create, Update, and Delete actions on the parent entity.
- If this entity is a child of a parent, you can leverage our Swagger instance to find the URLs you should use in your API calls. For more information, refer to Finding resource and child access URLs of REST API entities.
- To learn how to access Swagger, refer to Using Swagger UI to explore REST API requests.
Parent | None |
Children | PurchaseOrderItems |
URLs | PurchaseOrders/query (GET, POST) PurchaseOrders/{id} (GET) PurchaseOrders/query/count (GET, POST) PurchaseOrders (PUT, POST, PATCH) PurchaseOrders/entityInformation (GET) PurchaseOrders/entityInformation/fields (GET) PurchaseOrders/entityInformation/userDefinedFields (GET) |
Conditions and requirements
General
- To create or update, you must have View and Create permission and Inventory access (site installed module access and security level feature or section access)
- To query, you must have View permission and Inventory access (site installed module access and security level feature or section access)
- A Purchase Order search conducted through the Autotask UI will not recognize Purchase Orders that do not have an associated Purchase Order Item. When working in the Autotask UI, a purchase order item must be associated with a purchase order at the time the purchase order is created. When working with the API, a PurchaseOrders entity is created before any PurchaseOrderItems entities are associated with it. These Purchase Orders, however, are not recognized in the UI as valid Purchase Orders until they are associated with one or more Purchase Order Items.
- You may associate up to 300 items with any one Purchase Order.
Special field attributes
Field | Conditions and Requirements |
---|---|
freight | In multi-currency databases, the provided value is assumed to be in the vendor's currency. |
purchaseOrderTemplateID |
If purchaseOrderTemplateID is null in the database, during query, the field will return the associated vendor account's (VendorID) purchaseOrderTemplateID, if it exists. If no VendorID is associated, or if the VendorID is not associated with a purchaseOrderTemplateID, then the system default purchase order template ID will return during query. |
showTaxCategory | showTaxCategory defaults to false. |
status |
On create, status = New On update:
When the current PurchaseOrder status is 'Received Full', and the PurchaseOrderItem.Quantity value for one or more associated PurchaseOrderItems is debited, the PurchaseOrder status is updated as follows:
When the current PurchaseOrder status is 'Received Partial', and the PurchaseOrderItem.Quantity value for one or more associated PurchaseOrderItems is debited, the PurchaseOrder status is updated as follows:
|
taxRegionID | In Autotask, Tax Regions have replaced Tax Groups. To preserve existing API code, PurchaseOrder.taxRegionID passes the taxRegionID. |
useItemDescriptionsFrom | If no value is provided for useItemDescriptionsFrom, the API will use the default value specified in the Autotask Inventory system setting "Default Description to use for purchase order items." |
vendorID | vendorID must reference an active Company of companyType = Vendor |
vendorInvoiceNumber |
|
Field definitions
The following table describes the standard Autotask fields for this entity. Refer to the following articles for more information about working with these fields:
- The entityInformation REST API call
- Making basic query calls to the REST API
- Advanced query features of the REST API
To learn how to query picklist endpoints, refer to Understanding picklists.
Notes
- For string datatypes, the number in parentheses ( ) indicates the maximum number of characters allowed.
- LT indicates Local Term.
- If this entity has child collections, they will appear in a Child collection access URLs or an Entity URLs and relationships drop-down in the Entity details section of this article.
- You can call the /query/count/ endpoint of a resource to determine how many records a collection holds.
Field Name | Datatype | Read-Only | Is Required | Reference Name | Picklist |
---|---|---|---|---|---|
additionalVendorInvoiceNumbers | string (8000) | ||||
cancelDateTime | datetime | ||||
createDateTime | datetime | ||||
creatorResourceID | integer | Resources | |||
externalPONumber | string (50) | ||||
fax | string (25) | ||||
freight | decimal | ||||
generalMemo | string (4000) | ||||
id | long | ||||
impersonatorCreatorResourceID | integer | Resources |
|
||
internalCurrencyFreight | decimal | ||||
latestEstimatedArrivalDate | datetime | ||||
paymentTerm | integer | ||||
phone | string (25) | ||||
purchaseForCompanyID | integer | Companies | |||
purchaseOrderNumber |
string (50) |
|
|
|
|
purchaseOrderTemplateID |
integer |
|
|
|
|
shippingDate | datetime | ||||
shippingType | integer | ShippingTypes | |||
shipToAddress1 | string (128) | ||||
shipToAddress2 | string (128) | ||||
shipToCity | string (30) | ||||
shipToName | string (100) | ||||
shipToPostalCode | string (10) | ||||
shipToState | string (25) | ||||
showEachTaxInGroup | boolean | ||||
showTaxCategory | boolean | ||||
status | integer | ||||
submitDateTime | datetime | ||||
taxRegionID | integer | ||||
useItemDescriptionsFrom | integer | ||||
vendorID | integer | Companies | |||
vendorInvoiceNumber | string (50) |