Complete an Order
POST /api/v2/orders/{orderIdentifier}/complete
This endpoint is used to set the status of an order to complete. The Job Tracker must be running.
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
Success
On a successful request the order will be flagged for completion, an HTTP 201 code will be returned with a success message. The order will not actually be completed until the Job Tracker processes it,
{
"orderNumber": "33719",
"message": "Successful"
}
Error
If the order number does not exist in Rx-Universe an HTTP 404 code will be returned with an error
{ "error": "Could not complete order", "details": [ "Error Code: 01", "Error Message: Order not found" ]
If the order is found but is flagged for deletion an HTTP 400 code will be returned with an error
{ "error": "Could not complete order", "details": [ "Error Code: 02", "Error Message: Order deleted" ]
If the order is found but is unvalid an HTTP 400 code will be returned with an error
{ "error": "Could not complete order", "details": [ "Error Code: 03", "Error Message: Order unvalid" ]
If the order is found but is already complete an HTTP 400 code will be returned with an error
{ "error": "Could not complete order", "details": [ "Error Code: 04", "Error Message: Order already completed" ]
If the order is found but is on hold an HTTP 400 code will be returned with an error
{ "error": "Could not complete order", "details": [ "Error Code: 05", "Error Message: Order on hold" ]
If the order is found but there is a job tracker flow verification error an HTTP 400 code will be returned with an error (there are a wide variety of possible error messages based on the job flows that may be required)
{ "error": "Could not complete order", "details": [ "Error Code: 20", "Error Message: Needs Backside Coat!" ]