DELETE /api/v2/orders/{orderIdentifier}
This endpoint is used to delete an order.
Accepts
An order identifier, which can be the order number, tray number, or purchase order number
This order can be retrieved using
72544
,337178
, orExample
Tray numbers can only be used to look up active orders
If lookup is done by po number then you must be using unique values in this field
A reason for deletion. This is required if the system setting
Orders1:Enter reason code when deleting order
is checked, and ignored if it is unchecked
Success
On a successful request the order will be flagged for deletion, and an HTTP 200 code will be returned with a the last known state of the order. This will match the structure returned by Fetch a Single Order.
Error
If the order is not found, an HTTP 404 code will be returned with an error
{ "error": "No record found", "details": [ "Provided: 9999999" ] }
If the job tracker module is not installed, an HTTP 400 code will be returned with an error
{ "error": "Job Tracker module required for cancel method", "details": [] }
If the order is already marked for cancellation an HTTP 400 code will be returned with an error
{ "error": "Order already completed", "details": [] }
If the system requires a delete reason and none have been configured, an HTTP 400 code will be returned with an error
{ "error": "The delete reasons file is empty", "details": [] }
If the system requires a delete reason and no valid reason was provided, an HTTP 400 code will be returned with an error
{ "error": "Delete reason code does not exist", "details": [ "Provided: 9999" ] }
If the order has been through a station that prevents it from being cancelled, an HTTP 400 code will be returned with an error
{ "error": "Order has been through a non-cancel station", "details": [] }