Cancel and change orders
Learn how to return order changes and cancellations.
You can return order changes and cancellations using the getPurchaseOrders
operation.
Prerequisites
To complete this tutorial, you need:
- Authorization from the selling partner for whom you are making calls. For more information, refer to Authorizing Selling Partner API Applications.
- The Vendor Retail Procurement Orders role assigned to your developer profile.
Order changes
Amazon may change purchase orders after creation when requirements change. You can use the getPurchaseOrders
operation to get updated orders. If Amazon changes a purchase order, the order contains a purchaseOrderChangedDate
field that is the timestamp when Amazon updated the order. If this field does not exist, the order has not changed since creation.
You can use the changedAfter
and changedBefore
query parameters to retrieve a list of orders that have changed in a date range. The response returns the orders that Amazon changed within the specified date range, and you must fulfill the updated purchase order. Alternatively, you can filter using isPOChanged=true
to get all changed purchase orders.
You can make separate API calls with a modified date range to get the changed orders for that day. For example, call the get purchase orders operation four times a day to get the orders changed in the last six hours.
The following is a list of changes that can contribute to order changes. For these changes, you must pull the changed order and ship the correct purchase order:
- Ship or delivery window change
- Purchase order item updates such as quantity change, item cancellation, or item cost change
- New item added to purchase order
- Purchase order canceled/uncanceled
- Purchase order type change
- Purchase order delivery destination (fulfillment center) change
- Purchase order freight information change
Item cancellation
You can use the Vendor Orders API with poItemState=Canceled
to find orders with canceled items. This returns all orders that have had one or more items canceled by Amazon after purchase order creation. This helps you get only the orders that have canceled items (ordered quantity is zero) and helps ensure that you don't ship the canceled items.
Note
Item cancellation is an order change. Include canceled items when you return the list of changed orders.
Purchase order state and vendor code
The purchase order schema includes the current purchase order state and state update time. You can use the filter purchaseOrderState
to filter orders based on the current state.
For example, you can get all purchase orders that you have not acknowledged or fulfilled using purchaseOrderState=New
.
You can also get purchase orders for a specific vendor code by providing one of the authorized vendor codes in filter orderingVendorCode
. This filter returns only purchase orders for the vendor code included with the filter.
For all available filters, refer to the Vendor Orders API Reference.
Updated about 22 hours ago