MintRender
All docs pages

Tables with rows from your data

A table layer draws one row for each item of a list in your data. When the rows do not fit, the page is copied with the rest of the rows.

Rows from data

Add a table in the editor (Add a layer, Table) and turn on "Changeable". Then send its rows as a list of objects. The invoice and receipt templates in the gallery work this way:

curl

curl -X POST "https://mintrender.com/v1/render" \  -H "Authorization: Bearer $MINTRENDER_KEY" \  -H "Content-Type: application/json" \  -d '{"template":"YOUR_INVOICE_TEMPLATE_ID","format":"pdf","data":{"items":[{"description":"Website design","qty":1,"unit_price":2400,"amount":2400},{"description":"Photo editing","qty":12,"unit_price":35,"amount":420}]}}'

JavaScript

const res = await fetch("https://mintrender.com/v1/render", {  method: "POST",  headers: {    Authorization: `Bearer ${process.env.MINTRENDER_KEY}`,    "Content-Type": "application/json",  },  body: JSON.stringify({    template: "YOUR_INVOICE_TEMPLATE_ID",    format: "pdf",    data: {      items: [        {          description: "Website design",          qty: 1,          unit_price: 2400,          amount: 2400,        },        {          description: "Photo editing",          qty: 12,          unit_price: 35,          amount: 420,        },      ],    },  }),});const body = await res.json();if (!res.ok) throw new Error(`${body.error.code}: ${body.error.message} (${body.error.request_id})`);console.log(body);

Python

import os import requests res = requests.post(    "https://mintrender.com/v1/render",    headers={"Authorization": f"Bearer {os.environ['MINTRENDER_KEY']}"},    json={        "template": "YOUR_INVOICE_TEMPLATE_ID",        "format": "pdf",        "data": {            "items": [                {                    "description": "Website design",                    "qty": 1,                    "unit_price": 2400,                    "amount": 2400,                },                {                    "description": "Photo editing",                    "qty": 12,                    "unit_price": 35,                    "amount": 420,                },            ],        },    },    timeout=120,)body = res.json()if not res.ok:    raise RuntimeError(f"{body['error']['code']}: {body['error']['message']} ({body['error']['request_id']})")print(body)
  • Each object is one row. A column shows the field with its key; a key with a dot, like price.unit_amount, reads inside an object.
  • Missing fields are empty cells. Other fields are ignored, so you can send a Shopify order's line_items or a Stripe invoice's lines.data as they are.
  • A row as tall as its tallest cell: text wraps, in every language.

Columns

FormatA value of 1234.5 shows as (en-GB)
text1234.5
number1,234.5, or with decimals 2: 1,234.50
money£1,234.50 with currency GBP; with minorUnits, 123450 is £1,234.50
dateA date like 2026-11-08, or seconds since 1970: 8 Nov 2026 (medium)

More pages

  • The table's box is the room it has on its page. Rows that do not fit go to a copy of the page, with the header again (turn off "Repeat it on each page" to stop that).
  • Each other layer shows on every page, the first page only, or the last page only.
  • A layer set to "Move down with a table" (totals, notes, a signature) moves with the table's last row on the last page. If it no longer fits, one more page is added for it.
  • A PDF has at most 100 pages. An image shows the first page.

All fields

Every field of the table layer, with its default and limits, is in Templates and JSON.

Seen MintRender used for content that breaks our terms? Report it. Questions about the API: support@mintrender.com, with the request id.