---
title: "Label Printing API for shipping and warehouse workflows"
description: "Send carrier-generated PDF or RAW labels in ZPL, TSPL or CPCL from ecommerce, WMS or ERP software to the correct local printer and track the final status."
---
<nav class="docs-breadcrumb" aria-label="Breadcrumb"><a href="/docs/">CloudPrint Documentation</a><span aria-hidden="true">/</span><span>Printing workflows</span></nav>

# Label Printing API for shipping and warehouse workflows

<p class="docs-lead">CloudPrint prints a shipping label that your carrier, marketplace or shipping system has already generated. It does not buy postage, choose a carrier or create tracking numbers; its job is to deliver the final PDF or compatible RAW label data to the correct local printer and report the result.</p>

## Generate the label before sending it to CloudPrint

First create or purchase the shipment through the carrier or shipping API and obtain the final label. Then send its PDF, public HTTPS download URL or RAW payload in ZPL, TSPL or CPCL. Carrier rates, tracking and label generation remain with the carrier or shipping platform; CloudPrint handles printing.

## Choose PDF or a RAW label language

PDF is portable and easy to preview, but the target queue needs system printing or a supported renderer. RAW preserves device-level control: set `document_format=raw`, use the exact `document_raw_language` (`zpl`, `tspl` or `cpcl`) and select only a printer that advertises that language with RAW passthrough.

## Route each packing station

During warehouse setup, assign a stable `printer_id` to each packing station or shipping workflow. Display the queue name for people, but route by ID. If that printer is offline, stop and show a clear fallback choice rather than silently sending a customer label to another location.

## Match media and barcode quality

Set the document page to the real label dimensions and, when needed, request matching `media_width_mm`, `media_height_mm` and `dpi`. Calibrate gap or mark sensing, darkness and speed on the physical printer. A successful API status cannot compensate for a clipped or unreadable barcode, so scan production samples before rollout.

## Call the API from the backend

Discover the packing-station printer, upload the PDF or RAW document, create a print job and follow its status. Use `POST /api/v1/documents` plus `POST /api/v1/print-jobs`, or one of the URL/Base64 shortcuts when its input constraints fit. Never put the OAuth client secret in warehouse browser code.

## Make retries and reprints auditable

Build the `Idempotency-Key` from shipment ID, label type and operation version. A timeout retry keeps that key. A deliberate second copy gets a new key and records the operator and reason. Test agent shutdown, an offline printer, empty media and workstation restart before enabling unattended printing.

## Next steps

<div class="docs-card-grid"><a class="docs-card" href="/docs/guides/label-printing/"><strong>Print barcode labels through an API</strong><span>Send print-ready barcode, product and warehouse labels as PDF, ZPL, TSPL or CPCL to a compatible local printer.</span></a>
<a class="docs-card" href="/docs/guides/print-formats/"><strong>PDF and RAW printer languages</strong><span>Choose PDF or an explicit RAW language—ZPL, TSPL, CPCL or ESC/POS—and route each job only to a compatible printer.</span></a>
<a class="docs-card" href="/docs/api/print-jobs/"><strong>Create and track CloudPrint print jobs</strong><span>Create idempotent print jobs, validate printer options and follow each job safely until it is printed or fails.</span></a></div>

<nav class="docs-resource-links" aria-label="Next steps"><a href="https://cloudprint.me/status/">Service status</a><a href="/docs/api/v1/explorer/">OpenAPI</a><a href="https://developer.cloudprint.me">Developer Portal</a><a href="https://my.cloudprint.me">Open account</a><a href="/docs/legal/privacy/">Privacy Policy</a><a href="/docs/legal/terms/">Terms</a><a href="/docs/legal/data-processing/">DPA</a><a href="/docs/legal/service-level-agreement/">Service Level Agreement</a></nav>