Purchase Order

The Purchase Order API is used to create new purchase orders, or to update, cancel, approve or to get information about already created purchase orders. A purchase order will create one or more fulfillment orders.

Important note: By default, if a PO you submit has errors, it will be placed on hold, and a fulfillment order will not be created until the PO is corrected with an update (PUT). To avoid this default behavior, add “doNotPersistOnWarnings”:1 under the root level in the request JSON (ie, directly beneath “purchaseOrderNo” is a good spot). To determine whether a specific post to the PO API was successful, check the JSON response to see that resource.total = 1. If it is 0, then the PO was not created. In that case, v4Errors and/or v4Warnings will contain the issues with the PO that need to be resolved before attempting posting again. Note that resource.total may be 1 and there may be some v4Warnings. An example would be invalid address, which will not prevent the PO from posting.

Note: By default, a PO will go into a “needs approval” status, so that you can build a workflow to either approve or cancel POs. The majority of customers choose to bypass this flow and post POs as already approved by passing “isApproved”:1 under “options”.