Shipping labels
Return label PDF API
Return merchandise label with RMA, customer address, warehouse destination, and barcode-ready payload text. Useful for ecommerce returns and support flows. Send this LaTeX template and JSON data to Texify in one /render request.
JSON schema
Fields this template expects.
| Field | Type | Required | Description |
|---|---|---|---|
| ship_from | object | Yes | Origin name and address. |
| ship_to | object | Yes | Destination name and address. |
| carrier | string | Yes | Carrier or service label. |
| tracking_number | string | Yes | Tracking number printed as text. |
| barcode | string | Yes | Barcode-ready payload rendered as monospaced text. |
API examples
POST LaTeX and JSON. Receive PDF bytes.
cat > return-label-payload.json <<'JSON'
{
"entrypoint": "main.tex",
"resources": {
"main.tex": "\\documentclass[10pt]{article}\n\\usepackage[paperwidth=4in,paperheight=6in,margin=0.18in]{geometry}\n\\usepackage{array}\n\\pagestyle{empty}\n\\begin{document}\\sffamily\n{\\Large\\bfseries [[ .carrier ]]}\\hfill [[ with .weight_oz ]][[ . ]] oz[[ end ]]\\\\\n\\rule{\\linewidth}{1pt}\n\\vspace{0.08in}\n\\noindent\\textbf{SHIP TO}\\\\\n{\\LARGE\\bfseries [[ .ship_to.name ]]}\\\\[4pt]\n{\\Large [[ .ship_to.address ]]}\\\\[0.25in]\n\\noindent\\textbf{FROM}\\\\\n[[ .ship_from.name ]]\\\\\n[[ .ship_from.address ]]\\\\[0.2in]\n[[ with .rma ]]\\noindent\\textbf{RMA:} [[ . ]]\\\\[0.12in][[ end ]]\n\\noindent\\textbf{TRACKING}\\\\\n{\\large\\texttt{[[ .tracking_number ]]}}\\\\[0.25in]\n\\fbox{\\begin{minipage}{0.92\\linewidth}\\centering\\vspace{0.25in}\n{\\Large\\texttt{[[ .barcode ]]}}\\\\[4pt]\n\\small Barcode-ready payload; render real bars via graphics when needed.\n\\vspace{0.25in}\\end{minipage}}\n\\end{document}"
},
"data": {
"ship_from": {
"name": "Nora Kim",
"address": "77 Lake Ave, Chicago, IL"
},
"ship_to": {
"name": "Returns Dept",
"address": "500 Warehouse Loop, Reno, NV"
},
"carrier": "USPS Return",
"tracking_number": "9400111202555012345678",
"barcode": "9400111202555012345678",
"weight_oz": null,
"rma": "RMA-2026-5512"
}
}
JSON
curl -sS -X POST https://api.texify.dev/render \
-H "Content-Type: application/json" \
--data @return-label-payload.json \
--output return-label.pdfimport json
import requests
payload = json.loads(r'''{
"entrypoint": "main.tex",
"resources": {
"main.tex": "\\documentclass[10pt]{article}\n\\usepackage[paperwidth=4in,paperheight=6in,margin=0.18in]{geometry}\n\\usepackage{array}\n\\pagestyle{empty}\n\\begin{document}\\sffamily\n{\\Large\\bfseries [[ .carrier ]]}\\hfill [[ with .weight_oz ]][[ . ]] oz[[ end ]]\\\\\n\\rule{\\linewidth}{1pt}\n\\vspace{0.08in}\n\\noindent\\textbf{SHIP TO}\\\\\n{\\LARGE\\bfseries [[ .ship_to.name ]]}\\\\[4pt]\n{\\Large [[ .ship_to.address ]]}\\\\[0.25in]\n\\noindent\\textbf{FROM}\\\\\n[[ .ship_from.name ]]\\\\\n[[ .ship_from.address ]]\\\\[0.2in]\n[[ with .rma ]]\\noindent\\textbf{RMA:} [[ . ]]\\\\[0.12in][[ end ]]\n\\noindent\\textbf{TRACKING}\\\\\n{\\large\\texttt{[[ .tracking_number ]]}}\\\\[0.25in]\n\\fbox{\\begin{minipage}{0.92\\linewidth}\\centering\\vspace{0.25in}\n{\\Large\\texttt{[[ .barcode ]]}}\\\\[4pt]\n\\small Barcode-ready payload; render real bars via graphics when needed.\n\\vspace{0.25in}\\end{minipage}}\n\\end{document}"
},
"data": {
"ship_from": {
"name": "Nora Kim",
"address": "77 Lake Ave, Chicago, IL"
},
"ship_to": {
"name": "Returns Dept",
"address": "500 Warehouse Loop, Reno, NV"
},
"carrier": "USPS Return",
"tracking_number": "9400111202555012345678",
"barcode": "9400111202555012345678",
"weight_oz": null,
"rma": "RMA-2026-5512"
}
}''')
response = requests.post(
"https://api.texify.dev/render",
json=payload,
timeout=90,
)
response.raise_for_status()
with open("return-label.pdf", "wb") as pdf:
pdf.write(response.content)import { writeFile } from "node:fs/promises";
const payload = {
"entrypoint": "main.tex",
"resources": {
"main.tex": "\\documentclass[10pt]{article}\n\\usepackage[paperwidth=4in,paperheight=6in,margin=0.18in]{geometry}\n\\usepackage{array}\n\\pagestyle{empty}\n\\begin{document}\\sffamily\n{\\Large\\bfseries [[ .carrier ]]}\\hfill [[ with .weight_oz ]][[ . ]] oz[[ end ]]\\\\\n\\rule{\\linewidth}{1pt}\n\\vspace{0.08in}\n\\noindent\\textbf{SHIP TO}\\\\\n{\\LARGE\\bfseries [[ .ship_to.name ]]}\\\\[4pt]\n{\\Large [[ .ship_to.address ]]}\\\\[0.25in]\n\\noindent\\textbf{FROM}\\\\\n[[ .ship_from.name ]]\\\\\n[[ .ship_from.address ]]\\\\[0.2in]\n[[ with .rma ]]\\noindent\\textbf{RMA:} [[ . ]]\\\\[0.12in][[ end ]]\n\\noindent\\textbf{TRACKING}\\\\\n{\\large\\texttt{[[ .tracking_number ]]}}\\\\[0.25in]\n\\fbox{\\begin{minipage}{0.92\\linewidth}\\centering\\vspace{0.25in}\n{\\Large\\texttt{[[ .barcode ]]}}\\\\[4pt]\n\\small Barcode-ready payload; render real bars via graphics when needed.\n\\vspace{0.25in}\\end{minipage}}\n\\end{document}"
},
"data": {
"ship_from": {
"name": "Nora Kim",
"address": "77 Lake Ave, Chicago, IL"
},
"ship_to": {
"name": "Returns Dept",
"address": "500 Warehouse Loop, Reno, NV"
},
"carrier": "USPS Return",
"tracking_number": "9400111202555012345678",
"barcode": "9400111202555012345678",
"weight_oz": null,
"rma": "RMA-2026-5512"
}
};
const response = await fetch("https://api.texify.dev/render", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
signal: AbortSignal.timeout(90_000),
});
if (!response.ok) throw new Error(await response.text());
const pdf = Buffer.from(await response.arrayBuffer());
await writeFile("return-label.pdf", pdf);The template
LaTeX source sent as resources["main.tex"].
\documentclass[10pt]{article}
\usepackage[paperwidth=4in,paperheight=6in,margin=0.18in]{geometry}
\usepackage{array}
\pagestyle{empty}
\begin{document}\sffamily
{\Large\bfseries [[ .carrier ]]}\hfill [[ with .weight_oz ]][[ . ]] oz[[ end ]]\\
\rule{\linewidth}{1pt}
\vspace{0.08in}
\noindent\textbf{SHIP TO}\\
{\LARGE\bfseries [[ .ship_to.name ]]}\\[4pt]
{\Large [[ .ship_to.address ]]}\\[0.25in]
\noindent\textbf{FROM}\\
[[ .ship_from.name ]]\\
[[ .ship_from.address ]]\\[0.2in]
[[ with .rma ]]\noindent\textbf{RMA:} [[ . ]]\\[0.12in][[ end ]]
\noindent\textbf{TRACKING}\\
{\large\texttt{[[ .tracking_number ]]}}\\[0.25in]
\fbox{\begin{minipage}{0.92\linewidth}\centering\vspace{0.25in}
{\Large\texttt{[[ .barcode ]]}}\\[4pt]
\small Barcode-ready payload; render real bars via graphics when needed.
\vspace{0.25in}\end{minipage}}
\end{document}Live render
Try sample data now.
Posts this LaTeX template and sample JSON to /render, then opens the returned PDF bytes.
{
"ship_from": {
"name": "Nora Kim",
"address": "77 Lake Ave, Chicago, IL"
},
"ship_to": {
"name": "Returns Dept",
"address": "500 Warehouse Loop, Reno, NV"
},
"carrier": "USPS Return",
"tracking_number": "9400111202555012345678",
"barcode": "9400111202555012345678",
"weight_oz": null,
"rma": "RMA-2026-5512"
}FAQ
FAQ
Can I use Return label as a return label PDF API?
Yes. Copy the LaTeX template, send it in resources with your data to /render, and Texify returns PDF bytes.
Can I change colors, copy, or field names?
Yes. Edit the LaTeX source and JSON placeholders to match your data model and brand before posting to /render.
Does this render real PDF text?
Yes. Texify compiles LaTeX to PDF, so text remains selectable, searchable, and stable across environments.
Related templates
More LaTeX PDF templates.
Shipping labels
Shipping label 4×6
Standard 4×6 shipping label with large destination block, service level, tracking number, and barcode-ready text field. Built for warehouse apps and commerce backends.
Packing lists
Packing list
Warehouse packing list with order details, destination, package counts, weights, and item rows. Built for ecommerce and fulfillment APIs.
Packing lists
Packing list with barcodes
Packing list that includes SKU barcode-ready payload text for scan-and-pack workflows. Keeps warehouse rows legible when orders span multiple pages.