Skip to main content

 

 

Coupa Success Portal

Purchase Orders API

The Coupa API allows you to do the use the Purchase Order API, for Purchase Order revisions information PO Revision API.

The URL to access purchase orders is: https://<instance>/api/purchase_orders

Actions

Purchase Orders API allows you to:

Verb Path Action Description
GET|POST|PATCH /api/purchase_orders(/:action(/:id))   {:index=>"Query purchase orders", :create=>"Create purchase order", :show=>"Show purchase order", :update=>"Update purchase order", :destroy=>"Delete purchase order", :release_from_buyer_hold=>"Release purchase order on buyer hold", :issue=>"IssueWithSend", :issue_without_send=>"IssueWithoutSend", :ignore_window_and_issue=>"IgnoreWindowsAndIssue", :cancel=>"Cancel", :close=>"Close"}
PUT /api/purchase_orders/:id/cancel cancel Cancel
PUT /api/purchase_orders/:id/close close Close
POST /api/purchase_orders create Create purchase order
PUT /api/purchase_orders/:id/ignore_window_and_issue ignore_window_and_issue IgnoreWindowsAndIssue
GET /api/purchase_orders index Query purchase orders
PUT /api/purchase_orders/:id/issue issue IssueWithSend
PUT /api/purchase_orders/:id/issue_without_send issue_without_send IssueWithoutSend
PUT /api/purchase_orders/:id/release_from_buyer_hold release_from_buyer_hold Release purchase order on buyer hold
GET /api/purchase_orders/:id show Show purchase order
PATCH /api/purchase_orders/:id update Update purchase order
PUT /api/purchase_orders/:id update Update purchase order

Elements

Element Description Type API In API Out Required Allowable Values
acknowledged-at acknowledged_at datetime   yes    
acknowledged-flag Has PO been acknowledged by Supplier? boolean yes yes    
attachments attachments Attachment  yes yes    
created-at Date record was created in Coupa. datetime   yes    
created-by Coupa ID of User who created Invoice User    yes    
currency Currency of transaction Currency  yes      
current-integration-history-records Current integration history records IntegrationHistoryRecord    yes    
exported Indicates if transaction has been exported boolean   yes    
id Coupa's internal ID integer   yes    
internal-revision Internal Revision Number - Increases each time a change is made to a PO whether that change is internal or causes the PO to be resent to the supplier. integer   yes    
last-exported-at Date and time transaction was last exported in the format YYYY-MM-DDTHH:MM:SS+HH:MMZ datetime   yes    
order-lines order_lines OrderLine  yes yes yes  
payment-method payment_method string(255) yes yes    
payment-term Payment Terms PaymentTerm  yes yes    
pcard pcard Pcard  yes yes    
po-number PO Number string(20) yes yes yes  
price-hidden Hide Price from supplier. True or False boolean   yes    
requester Requesting Account's login User  yes      
requisition-header Requisition Header RequisitionHeader    yes    
ship-to-address ship_to_address Address yes yes yes  
ship-to-attention Ship to attention string(255) yes      
ship-to-user ship_to_user User  yes yes yes  
shipping-term Payment Terms ShippingTerm  yes yes    
status PO Status string(50)   yes    
supplier Supplier Coupa internal ID number Supplier yes yes yes  
supplier-site Supplier Site SupplierSite yes yes    
transmission-status Transmission Status string   yes   created, deferred, deferred_processing, pending_manual, pending_manual_cancel, awaiting_online_purchase, scheduled_for_email, sent_via_email, scheduled_for_cxml, scheduled_for_xml, sent_via_cxml, sent_via_xml, sent_manually, purchased_online, transmission_failure
type Specifies whether the Purchase Order is an external (external system generated) or a Coupa generated Purchase Order. string(255) yes     ExternalOrderHeader
updated-at Last Updated at Date datetime   yes    
updated-by Coupa ID of User who created Invoice User    yes    
version PO Supplier Version Number - Increase each time a PO is changed and triggers a resend to the supplier. integer yes yes    

Notes 

  • There are dependent fields that become queryable based the value from the source field.  For example, if you query against po-method=email, then po-email can be added as an additional query criteria.  Please see fields with Yes*.
  • For large data set and for performance optimization, you should always limit your result with some GET criteria.
  • PO changes do not always increment the version number. See Fields that Cause a Purchase Order Revision for more info..  The updated-at field can always be used to determine whether any changes have been made.

Example Code

Payload to delete an order line via PUT.


<order-lines>
    <order-line>
       <id>COUPA_LINE_ID</id>
       <_delete>true</_delete>
     <order-line>
 </order-lines>
</order-header> 
  • Was this article helpful?