Introduction
The Label API generates various labels that are used on the production floor. This API was created to generate labels that the Salt Lake City facility needed for their workflow. The current list of these labels are Fab Label, QC Label, Pack Label, and Incomplete Box Sheet. The Label API is currently only used by SLC, but new labels can be added for other facilities as well. Initially, Jaspersoft was utilized to generate these labels, but this generated images to send to the printer which caused significant performance issues. V2 endpoints have been created to generate ZPL versions of these labels that are much more performant. The Incomplete Box Sheet is the only label that isn't generated in ZPL format as it has image thumbnails on it. HTML with links to the image thumbnails is generated for the Incomplete Box Sheet.
The Label API is the first step in the process to send a label to a printer. The Label API calls Prism Services API to gather all the data that needs to be displayed on the label. It then generates the ZPL or HTML format of the label. The ZPL or HTML is then sent to the Print API which verifies the printer/facility specified to print to are valid and sends the label to a RabbitMQ queue. Each facility has a Print Proxy Server set up that has printers set up as shared printers. This server hosts a Print Proxy Service that receives messages from the RabbitMQ queue, and sends the print jobs to the physical printer specified. A flowchart diagram of these steps can be found here: Label API and Print API Flowchart.
Requirements
To call this API, one of three types of OAuth tokens is required:
- Cognito client token
- Cognito auth token
- DRI client token
Endpoint Descriptions
- PrintFabLabel
- POST /fabLabel/print/v2
- Generates a ZPL format of a single Fab Label
- Requires the JobItemId for the job you want a Fab Label printed for
- POST /fabLabel/print/v2
- PrintFabLabels
- POST /fabLabels/print/v2
- Generates a ZPL format of a multiple Fab Labels
- Requires a layout id and will generate a Fab Label for each job item in the layout
- POST /fabLabels/print/v2
- PrintIncompleteBoxSheet
- POST /incompleteBoxSheet/print/v2
- Generates an HTML format of an Incomplete Box Sheet
- Requires one or more job order ids and will generate an Incomplet Box Sheet for each order specified
- POST /incompleteBoxSheet/print/v2
- PrintPackLabel
- POST /packLabel/print/v2
- Generates a ZPL format of a Pack Label
- Requires one or more job item package ids and will generate a Pack Label for each job item package id specified
- POST /packLabel/print/v2
- PrintQCLabel
- POST /qcLabel/print/v2
- Generates a ZPL format of a QC Label
- Requires one or more job item package ids and will generate a QC Label for each job item package id specified
- Option can included DelayedJobItemAccessories
- If supplied, these accessories will be included in the QR code on the label to tell the users who scans it with the Mobile App in SLC that accessories were not included at the QC station and will need to be added at the packing station.
- POST /qcLabel/print/v2
For all of these endpoints:
- PrinterGUID and Facility are required in the request body to indicate where the print job will be sent.
- RegistrationToken and PrintJobName are optional properties that should be included if you want to receive a Firebase Cloud Messaging notification of the print status.
- SaveAsPDF should be set to false if sending a print job. If you just want to test the generation of the label, you can set this to true and a PDF of the label will be returned from the API.