Use case
Shipping labels: what goes on them and how they print
A shipping label tells people and machines where one parcel is going and which parcel it is. This page covers what is on it, which barcodes it typically carries and why, the data it needs and how it reaches the printer. It describes shipping labels in general: whoever receives or carries the parcel sets the exact layout, and you take that from them.
The label at a glance
The numbers in the drawing match the list. Sample data is made up.
- SenderWho sent the parcel and where it goes back to. Small text, usually at the top.
- RecipientName, street, city, postal code and country as text. The largest text on the label, so it reads at a glance.
- Routing textA postal or sorting code, repeated in large type so it is easy to find.
- 2D symbol (optional)More data in a small area, when the receiver asks for it.
- Linear barcodeA tracking or reference number as bars, with the same number in readable text under it.
- References and countAn order or purchase-order reference, and a count such as "1 of 3" for an order that ships in several parcels.
Which barcodes, and why
A shipping label has to be read by people and by scanners. People read the address. Scanners read the barcodes, so the barcodes carry whatever the receiving system looks up: a tracking number, a reference, sometimes more.
| Barcode | Why it is on the label | Edition |
|---|---|---|
| Code 128 | A linear barcode for a tracking number or a reference. Code 128 holds letters and digits in one line of bars (see the ^BC page), and the site's symbology table pairs it with data that has no GS1 structure. | Basic |
| Data Matrix, QR Code or PDF417 | A 2D symbol holds more data in a small area and carries error correction. PDF417 is several linear rows stacked up. Add one when the receiver asks for it. | Ultimate |
| SSCC-18 in GS1-128 | When the parcel is a logistic unit that your partner identifies with an SSCC. The glossary says an SSCC identifies one logistic unit, such as a pallet or a carton. GS 2.2.1 See pallet labels. | Basic |
Which symbology is required is the receiver's choice, not a BarcoderX setting. Take it from their label specification, then name it in the template. Whatever you choose, the barcode needs blank margins and bars wide enough to scan: BarcoderX enforces quiet zones, snaps the module width to whole dots and reports the effective size. Symbol options
The data it needs
Everything on the label is a value bound into a template. The sample values below are made up.
| Field | Sample value | Where it goes |
|---|---|---|
| Sender name and address | Central warehouse, 100 Dock Road, Springfield | Text, element 1 |
| Recipient name and address | Example Logistics Inc., 123 Example Street, Panama City | Text, element 2. Accented letters need the right font and character set. |
| Routing or postal code | 123456 | Large text, element 3. It can also go into a barcode if the receiver asks. |
| Tracking or reference number | 48213 0003 | The linear barcode, element 5, and the same digits as readable text under it. |
| Order reference | PO-48213 | Text, element 6. |
| Parcel number and count | 1 of 3 | Text, element 6. |
The values come from your own data: objects, a DataTable, CSV, JSON or XML. Counters, masks and more than 100 built-in functions produce the values that change on every label. If a number carries a check digit, BarcoderX computes it, validates it or leaves it out, as you choose. Templates and data Fonts and accents Check digit calculator
How it reaches the printer
The printer commands are the same on both routes, and both run on infrastructure you operate.
- Direct, from your application. The SDK packages send the printer commands from your own .NET process over TCP port 9100, serial, the Windows spooler, CUPS or USB. No API server and no agent is in the path.
- Through your API server. Your application queues a print job through the REST API on your API server. A print agent on the printer's network collects it and writes it to the printer beside it. The agent only dials out, so the printer network needs no inbound port.
Shipping labels are usually printed by a program. An order is packed or a parcel gets its tracking number, and a service builds the label and sends it to a printer: no one is signed in, no browser is open and no print dialog appears. That is server-side printing, and the guide linked below compares the architectures.
Delivery to the agent is at-least-once and the agent de-duplicates by job id, so a reconnect does not print a label twice. Print jobs also honor an idempotency key, so a retried request does not queue a second label. When a job has many labels, static content is stored on the printer once and recalled for each label.
The browser never calls a port on your machine. If the print button is in a web app, the job goes to the server and the agent delivers it. Print thermal labels from a web app
A job queued on your API server moves through states you can see:
- Queued
- Dispatched
- Received
- Spooled
- Printed
- Failed
- Canceled
- Expired
Which edition covers it
EditionsBasic covers the linear (1D) and postal symbologies, including every GS1 DataBar variant; Ultimate adds the PDF417 family, other multi-row symbologies, every matrix (2D) symbology and GS1 composites, as set out on the pricing page.
For a shipping label, that means a Code 128 tracking barcode is in Basic. A Data Matrix, QR Code or PDF417 symbol needs Ultimate.
The ZPL behind it
If you read the printer commands, these are the ones a shipping label uses. Each page explains one command in our own words from the programming guide.
Keep reading
Pallet labels Returns labels: RMA codes and return labels on demand Automotive supplier labels: the Global Transport Label GS1-128 and SSCC-18: what goes on a pallet label ZPL linear barcodes: Code 128, Code 39, EAN, UPC ZPL 2D codes: QR Code, Data Matrix, PDF417 Server-side label printing for .NET Barcodes: the symbology registry Fonts and accents Templates and data Pricing: what each edition coversNew to the printer language? Read the ZPL guides and command reference.
Sources What this page says about BarcoderX comes from its published barcodes, printing, platform, FAQ and server-side printing pages. The SSCC statement is GS1 General Specifications section 2.2.1, as quoted in the glossary. The description of a shipping label is general and ours: it is not a carrier or GS1 specification, and no carrier is named on purpose.
Written by BarcoderX in its own words.
ZPL and ZPL II are trademarks of Zebra Technologies Corporation. BarcoderX is an independent product and is not affiliated with, endorsed by or sponsored by Zebra Technologies.