How to print outbound shipping labels directly on a Zebra printer while generating return labels as PDF files which will be saved into a folder.
This can be achieved using Shipment Server together with DropZone.
The accompanying Postman collection demonstrates both the classic Shipment Server API and the Shipment Server REST API, as well as the configuration required in DropZone.
https://nshiftship.helpcenter.nshift.com/hc/en-us/article_attachments/28207250192156
Environment Variables
The Postman collection uses the following environment variables:
| Variable | Purpose |
|---|---|
| ActorID | Shipment Server Actor ID |
| KEY | Shipment Server API key |
| Username | Shipment Server username |
| Password | Shipment Server password |
| TicketUserName | DropZone user receiving print jobs |
| WorkstationID | DropZone workstation installation ID |
| DropZoneLabelPrinterKey | DropZone printer key used for routing return labels |
| SSAPIBaseURL | Base URL for Ship API (v1) |
| SSRESTAPIBaseURL | Base URL for Ship REST API (v2) |
Difference Between the Two Shipment Server APIs
The collection demonstrates two different ways of creating shipments.
Classic Shipment Server API
Endpoint:
POST https://demo.shipmentserver.com/ship
Characteristics:
- Uses multipart/form-data.
- Authentication is provided through the request parameters.
- A command parameter specifies the action:
"command": "SubmitShipment"
- Shipment data and options are sent as JSON strings.
Shipment Server REST API
Endpoint:
POST https://demo.shipmentserver.com:8080/shipServer/{ActorID}/shipmentsCharacteristics:
- Uses application/json.
- Uses Basic Authentication or OAuth.
- Actor ID is part of the URL.
- Data and options are sent as native JSON objects.
Functional Difference
From a business perspective, both APIs perform the same operation:
- Create a shipment.
- Generate labels.
- Route labels through DropZone.
The difference is only the API style, authentication mechanism, payload format.
DropZone Configuration
Before the API requests can be used, DropZone must be installed and configured on the workstation that will receive the print jobs.
1. Login to DropZone
Log in using the same account specified in the API requests.
Example:
"TicketUserName": "first.last.company.owner"
The workstation installation ID displayed in DropZone must match the value used in the API requests.
Example:
"WorkstationID": "014AFB70-1234-1234-1234-9CB1A646C6D0"
2. Configure the Zebra Printer
Navigate to:
Printers → New
Select the Zebra printer that will print outbound shipment labels.
Example:
Printer Name: ZDesigner GK420d
Printer Type: GK240
Default Label Printer: True
This printer will receive labels generated in Zebra format.
3. Configure a PDF Printer for Return Labels
Create a File Printer in DropZone.
Example:
Printer Name: ZDesigner GK420d
Output Folder: C:\Data\PrintToFile
Printer Type: PDF Label
Default Label Printer: False
Import Key: return-labels
The Import Key is important because it is referenced directly from the API request.
Example:
"DropZoneLabelPrinterKey": "return-labels"
When Shipment Server receives this value, DropZone routes the generated PDF label to this printer configuration.
4. Activate Cloud Print
Open the Cloud Print tab in DropZone and enable the service.
Without Cloud Print enabled, Shipment Server cannot deliver labels to the DropZone client.
Scenario 1 – Outbound Shipment Printed on Zebra Printer
For outbound shipments, the API request specifies:
{
"Labels": "ZPLGK",
"TicketUserName": "first.last.customer.owner",
"WorkstationID": "014AFB70-1234-1234-1234-9CB1A646C6D0"
}Process Flow
- Shipment Server creates the shipment.
- A Zebra (ZPL) label is generated.
- The label is sent through Cloud Print.
- DropZone receives the print job.
- The Zebra printer prints the shipping label automatically.
Result
The warehouse operator receives a physical label immediately and can attach it to the parcel.
Scenario 2 – Return Shipment Generated as PDF
For return shipments, the API request specifies:
{
"Labels": "PDF",
"TicketUserName": "first.last.customer.owner",
"WorkstationID": "014AFB70-1234-1234-1234-9CB1A646C6D0",
"DropZoneLabelPrinterKey": "return-labels"
}Process Flow
- Shipment Server creates the return shipment.
- A PDF label is generated.
- The PDF is sent through Cloud Print.
- DropZone routes the document to the printer configuration with the key
return-labels. - The PDF is saved to the configured folder.
Result
The customer service team can retrieve the PDF and attach it to an email sent to the end customer.
Diagram
flowchart TD
A[Customer system / Postman collection] --> B{Shipment type}
B -->|Normal outbound shipment| C[Submit shipment request]
C --> C1[Options: Labels = ZPLGK]
C1 --> C2[TicketUserName identifies DropZone user]
C2 --> C3[WorkstationID identifies DropZone installation]
C3 --> D[Shipment Server creates shipment]
D --> E[Shipment Server generates Zebra ZPL label]
E --> F[Cloud Print sends label to DropZone]
F --> G[DropZone routes job to Zebra printer]
G --> H[Physical label is printed]
B -->|Return shipment| I[Submit return shipment request]
I --> I1[Options: Labels = PDF]
I1 --> I2[DropZoneLabelPrinterKey = return-labels]
I2 --> I3[TicketUserName identifies DropZone user]
I3 --> I4[WorkstationID identifies DropZone installation]
I4 --> J[Shipment Server creates return shipment]
J --> K[Shipment Server generates PDF label]
K --> L[Cloud Print sends PDF to DropZone]
L --> M[DropZone routes PDF to ReturnLabels printer]
M --> N[PDF is saved to configured folder]
N --> O[PDF can be attached to customer email]