Label PDF (thermal printer) API

Thermal printer labels as PDF: shipping labels with COD, Code 128 and QR, price tags with EAN-13, Vietnamese import stickers, custom; batch to multi-page.

POSThttps://apibox.io.vn/v1/label-pdf

Choose a template and a size (100x150, 100x100, 76x130, 75x50, 50x30, a6 or any WIDTHxHEIGHT in mm) and send one label as fields or many as labels (one page each, copies per label, up to 500 pages). Templates: shipping (self-delivery waybill: shop / carrier, date, order code as Code 128, receiver in large type, sender, COD amount with the amount in Vietnamese words, weight, contents, note and a QR code), price (product name, price in VND, optional crossed-out old price and unit, EAN-13 when the barcode has 12–13 digits, else Code 128), aux (Vietnamese auxiliary label of imported goods from the same fields as vn-label-rules, with missing mandatory fields reported in x-warnings) and custom (title, lines, barcode, QR).

Text is set in Be Vietnam Pro (full Vietnamese, embedded as a subset) and shrinks to fit the label; barcodes and QR codes are vector shapes, so they print sharp at 203 or 300 dpi. The EAN-13 check digit is verified (12 digits: it is added). The response is application/pdf, or JSON with the PDF in base64 with format=json. Print at 100 % scale (no "fit to page") on the matching label stock.

Parameters

NameInTypeRequiredDefault
templatebodystringnoshippingshipping, price, aux or custom (also per label).
sizebodystringno100x150100x150, 100x100, 76x130, 75x50, 50x30, a6 or WIDTHxHEIGHT in mm.
labelsbodyarraynoLabels (one page each). Shipping: sender, receiver {name, phone, address}, order_code, cod, weight (g), items / content, note, shop, date, qr. Price: name, price, old_price, unit, barcode. Aux: group + label fields of vn-label-rules. Custom: title, lines, barcode, qr. copies per label.
rotatebodybooleannofalseSwap width and height (landscape).
formatbodystringnopdfpdf or json (base64).

Example

curl -X POST "https://apibox.io.vn/v1/label-pdf" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"template":"shipping","size":"100x150","labels":[{"shop":"Shop Hoa Mai","date":"11/11/2026","order_code":"DH20261111-001","sender":{"name":"Shop Hoa Mai","phone":"0901234567","address":"12 Nguyễn Huệ, Phường Sài Gòn, TP. Hồ Chí Minh"},"receiver":{"name":"Nguyễn Thị Lan","phone":"0912345678","address":"Số 5 ngõ 12 Phố Huế, Phường Hai Bà Trưng, Hà Nội"},"cod":350000,"weight":1200,"items":[{"name":"Áo thun","quantity":2}],"note":"Cho xem hàng"}]}' \
  -o output

Response

binary application/pdf

Use cases

  • Print waybills for orders a shop delivers itself
  • Make shelf price tags with barcodes for a small store
  • Print Vietnamese stickers for imported goods
  • Batch-print warehouse location labels with QR codes

FAQ

Which printers work?

Any printer that prints PDF on label stock: thermal printers (Xprinter, HPRT, Zebra…) at 203 or 300 dpi, or A4 label sheets when you choose a custom size. Print at 100 % scale.

Can I print many labels at once?

Yes: send "labels" as an array (up to 500 pages, "copies" per label). Each label is one page of the PDF.

Which barcodes are supported?

Code 128 (order codes, SKUs) and EAN-13 (product barcodes, check digit verified), plus QR codes.

Related APIs

Start with 1,000 free requests every month. Get free API key →