Versions Compared

Key

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

...

  • 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

  • An 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 printed to the requested printer. An HTTP 201 code will be returned 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 order is waiting to be assigned a tray, an HTTP 400 code will be returned with an error

Code Block
languagejson
{
  "error": "Printing request rejected",
  "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 a stock order, an HTTP 400 code will be returned with an error

Code Block
languagejson
{
  "error": "Printing request rejected",
  "details": [
    "Order is a stock order and there is no work ticket"
  ]
}
  • If no work ticket template has been selected, an HTTP 500 code will be returned with an error

Code Block
languagejson
{
  "error": "Printing request rejected",
  "details": [
    "No XML template is selected in system settings"
  ]
}
  • If a work ticket template has been selected but no longer exists, an HTTP 500 code will be returned with an error

Code Block
languagejson
{
  "error": "Printing request rejected",
  "details": [
    "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": [
    "No printer defined for workstation 00"
  ]
}
  • If the requested order has been marked for cancellation an HTTP 200 error code will be returned with the standard error body.

    Code Block
    languagejson
    {
      "error": "Order marked for cancelation",
      "details": []
    }