Skip to main content

 

 

Coupa Success Portal

Purchase Orders API

Overview 

When working with the Purchase Orders API, you've got a few resource endpoints you can work from:

Resource Path Description
PO headers /api/purchase_orders Full purchase orders that contain PO lines, payment terms, addresses and more. See Actions and Elements below for details
PO lines /api/purchase_order_lines Detailed information about PO lines like item info and accounting details. See Purchase Order Lines API and Order Line Allocations API for details.
PO revisions /api/purchase_order_revisions Provides access to to PO Change History, including both internal-only changes, and changes that were sent to the supplier. See Purchase Order Revisions API for details.

Purchase Order API Objects

This is the full list of order objects available via the UI. However, not all objects listed here have endpoints–some are only referenced by objects, and can't be updated directly.

Actions

Purchase Orders API allows you to:

Verb Path Action Description
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 Ignore Windows And Issue
GET /api/purchase_orders index Query purchase orders
PUT /api/purchase_orders/:id/issue issue Issue With Send
PUT /api/purchase_orders/:id/issue_without_send issue_without_send Issue Without Send
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 Req'd Unique Allowable Value In Out Data Type
acknowledged-at acknowledged_at         yes datetime
acknowledged-flag Has PO been acknowledged by Supplier?       yes yes boolean
attachments attachments       yes yes Attachment 
coupa-accelerate-status Status indicating whether the invoice has discount payment terms via Coupa Accelerate accelerated   yes string(255)
created-at Date record was created in Coupa.         yes datetime
created-by Coupa ID of User who created Invoice         yes User
currency Currency of transaction       yes   Currency 
current-integration-history-records Current integration history records         yes Integration History Record 
exported Indicates if transaction has been exported         yes boolean
id Coupa's internal ID         yes integer
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.   yes integer
invoice-stop Invoice Stop flag         yes boolean
last-exported-at Date and time transaction was last exported in the format YYYY-MM-DDTHH:MM:SS+HH:MMZ   yes datetime
order-lines order_lines yes     yes yes Order Line 
payment-method payment_method       yes yes string(255)
payment-term Payment Terms       yes yes Payment Term 
pcard pcard       yes yes Pcard 
po-number PO Number yes yes   yes yes string(20)
price-hidden Hide Price from supplier. True or False         yes boolean
requester Requesting Account's login       yes   User
requisition-header Requisition Header         yes Requisition Header 
ship-to-address ship_to_address yes     yes yes Address 
ship-to-attention Ship to attention       yes yes string(255)
ship-to-user ship_to_user yes     yes yes User
shipping-term Payment Terms       yes yes ShippingTerm 
status PO Status         yes string(50)
supplier Supplier Coupa internal ID number yes     yes yes Supplier 
supplier-site Supplier Site       yes yes Supplier Site 
transmission-status Transmission Status 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   yes string
type Type of Order     ExternalOrderHeader yes   string(255)
updated-at Last Updated at Date         yes datetime
updated-by Coupa ID of User who created Invoice         yes User 
version PO Supplier Version Number - Increase each time a PO is changed and triggers a resend to the supplier. yes yes integer

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?