n4.cuwo.messages.PrintDocumentOperation

The PrintDocumentOperation message is used to trigger the printing of a document.

The message has the following structure:

{
  "@type": "n4.cuwo.messages.PrintDocumentOperation",
  "id": "...",
  "documentDownloadURL": "...",
  "documentData": "...",
  "printerType": {
    "@type": "n4.cuwo.messages.PrinterType",
    "value": "..."
  }
}

The various member provide the information necessary for the operation:

  • id - The ID of the operation. Will be used as part of the acknowledgement and result messages
  • documentDownloadURL - The URL from which the document binary can be downloaded. Must be using https:// protocol
  • documentData - The base64 encoded data of the document to print as a string. The string must use the “base64” encoding defined in RFC 4648 Section 4.
  • printerType.value - The type of printer to print the document on. One of "RECEIPT", "LABEL", or "DOCUMENT"

Note that the “documentData” is available for the POC/MVP only and will be removed later. For now, only one of “documentDownloadURL” and “documentData” must be present. If both are present, the container will not be able to parse the message.