Add label image data code subtype

Skylar Ittner 2025-01-27 20:05:05 -07:00
parent 3c476e43e3
commit 01ddea095b

17
Home.md

@ -121,6 +121,23 @@ Position | Meaning
2 | URL, starting with `http://` or `https://`
### Subtype `l` (L): Print-ready 4x6 inch (100x150mm) shipping label data
This type contains a base64-encoded 1200x1800 PNG image for printing, and optionally an associated tracking number. Due to the data size, it is recommended to use this as the reply to a `u` type request, and not encode in a barcode directly.
Position | Meaning
---------|--------
0 | Format header (`QSv1`)
1 | Subtype header (`l`)
2 | 1200x1800 PNG file, Base64 encoded. Keep in mind that the image will be downscaled to 800x1200 if printed on a 200dpi label printer.
3 | Tracking number for the shipping label represented in the image. May be left empty if not applicable.
4 | Destination postal code. May be empty.
5 | Destination city. May be empty.
6 | Destination state/province/etc. May be empty.
7 | Shipping carrier name for display. May be empty. /[a-zA-Z0-9 ]+/ if not empty (alphanumeric and spaces only).
8 | Shipping service name for display. May be empty. /[a-zA-Z0-9 ]+/ if not empty (alphanumeric and spaces only).
### Subtype `e`: Error response to URL request
This type allows for a server to respond with an error message if a code with type `u` is requested but the request cannot be fulfilled.