Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

POST /api/v2/orders/{orderIdentifier}/print_ticket

This endpoint is used to delete print a workticket for an order. The order will be printed using the settings for workstation 00.

...

Accepts

  • An order identifier, which can be the order number, tray number, or purchase order number

    • This order can be retrieved using 72544, 337178, or Example

    • 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 uncheckedAn LPT port to print to. This refers to the LPT settings for workstation 00.

    • If not provided, this will be LPT1

Success

On a successful request the workticket for the order will be flagged for deletion, and an HTTP 200 printed to the requested printer. An HTTP 201 code will be returned with a the last known state of the order. This will match the structure returned by Fetch a Single Order.along with an informational message.

Code Block
languagejson
{
  "orderNumber": "123456",
  "trayNumber": "31776",
  "poNumber": "SP40KGTA",
  "message": "Printing in process"
}

Error

  • If the order is not found, an HTTP 404 code will be returned with an error

Code Block
languagejson
{
  "error": "No record found",
  "details": [
    "Provided: 9999999"
  ]
}
  • If the job tracker module is not installedorder is waiting to be assigned a tray, an HTTP 400 code will be returned with an error

Code Block
languagejson
{
  "error": "Printing request rejected",
  "Job Tracker module required for cancel method"details": [
    "Order waiting for tray"
  ]
}
  • If the system is not using XML work tickets, an HTTP 500 code will be returned with an error

Code Block
languagejson
{
  "error": "Printing request rejected",
  "details": [
    "Only the XML Work Ticket system setting is supported"
  ]
 }
  • If the order is already marked for cancellation a stock order, an HTTP 400 code will be returned with an error

Code Block
languagejson
{
  "error": "OrderPrinting alreadyrequest completedrejected",
  "details": []

    "Order is a stock order and there is no work ticket"
  ]
}
  • If the system requires a delete reason and none have been configuredno work ticket template has been selected, an HTTP 400 500 code will be returned with an error

Code Block
languagejson
{
  "error": "ThePrinting delete reasons file is emptyrequest rejected",
  "details": [
    "No XML template is selected in system settings"
  ]
}
  • If the system requires a delete reason and no valid reason was provideda work ticket template has been selected but no longer exists, an HTTP 400 500 code will be returned with an error

Code Block
languagejson
{
  "error": "Printing request rejected",
  "details": "Delete reason code[
    "The XML template set in system settings does not exist",
    "Set: bad_xml_ticket_name.xml"
  ]
}
  • If no printer has been defined for the requested LPT on workstation 00 an HTPP 500 code will be returned with an error

Code Block
languagejson
{
  "error": "Printing request rejected",
  "details": [
    "Provided: 9999No printer defined for workstation 00"
  ]
}
  • If the requested order has been through a station that prevents it from being cancelled, an HTTP 400 marked for cancellation an HTTP 200 error code will be returned with an the standard error body.

    Code Block
    languagejson
    {
      "error": "Order 

...

  • marked 

...

  • for cancelation",
      "details": []
    }