Texify

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.

Return label PDF preview

JSON schema

Fields this template expects.

FieldTypeRequiredDescription
ship_fromobjectYesOrigin name and address.
ship_toobjectYesDestination name and address.
carrierstringYesCarrier or service label.
tracking_numberstringYesTracking number printed as text.
barcodestringYesBarcode-ready payload rendered as monospaced text.

API examples

POST LaTeX and JSON. Receive PDF bytes.

curl
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.pdf
Python
import 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)
Node fetch
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"].

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.

Sample 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"
}

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.