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.

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:

  • Current status can = New, Received Full, Received Partial, Canceled, or Submitted.
  • When status = 'Received Full' or 'Received Partial', PurchaseOrder update is limited to the following fields:

vendorInvoiceNumber
externalPONumber
paymentTerm
taxRegionID
showTaxCategory
showEachTaxInGroup
generalMemo
purchaseForCompanyID

  • status cannot be updated to ‘New’ or ‘Received in Full/Part’
  • status cannot be updated from 'New' to 'Submitted' unless Purchase Order Items have been created for the Purchase Order.
  • status can be updated to Canceled when current status = 'Submitted', but cannot be updated to 'Canceled' when the current status = ‘ReceivedFull, or ReceivedPartial’.
  • On update, the API will allow PurchaseOrderItem.Quantity to be updated when the status of the associated PurchaseOrder is ReceivedPartial or ReceivedFull. For additional details refer to Conditions and Requirements for PurchaseOrderItems.

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:

  • If there are still received PurchaseOrderItem units associated with the PurchaseOrder, the status changes to 'Received Partial'.
  • If there are no received units associated with the PurchaseOrder after PurchaseOrderItem(s) are debited, the status changes to 'Submitted'. The PurchaseOrder status 'Submitted' can be changed to 'Canceled'.

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:

  • If there are still received PurchaseOrderItem units associated with the PurchaseOrder after the PurchaseOrderItem.Quantity is debited, the status remains 'Received Partial'.
  • If there are no received units remaining after PurchaseOrderItem.Quantity is debited, the status changes to 'Submitted'. The status 'Submitted' can be changed to 'Canceled'.
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
  • During update, this field will act as read-only if any items on the purchase order have been received.

  • During query, this field will return the vendor invoice number associated directly with the purchase order, if one exists. Otherwise, the field will return the vendor invoice number associated with receipt of the first item on the purchase order.

  • When filtering, this field will do so on both the vendorInvoiceNumber and the additionalVendorInvoiceNumbers fields.

    • For example, a filter for vendorInvoiceNumber equal to "VIN1" will return any POs where the vendorInvoiceNumber or any additionalVendorInvoiceNumber values are "VIN1."

    • A filter for vendorInvoiceNumber not equal to "VIN1" will return any POs where the vendorInvoiceNumber and any additionalVendorInvoiceNumbers are not "VIN1."

Field definitions

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)        

Additional resources