Bulk render

Render one file per row of `rows` (each row is variable values by name) and pack them into a ZIP — or, with `format: "pdf"` and `output: "pdf"`, merge every row into one PDF. Queued: the response is a job id — poll `GET /api/v1/templates/bulk/{jobId}` for progress and the download URL. Bearer API key with the `template.render` scope; credits for every row are reserved up front.

POST/api/v1/templates/:id/bulk

Query / Path parameters

NameInRequiredDescription
idpathYesTemplate ID

Request body

PropertyTypeRequiredDescription
rowsarrayYesOne object per output: variable values by name. Optional `id` / `name` keys name the file; a reserved `_filename` key sets the file name exactly (no extension, never passed to the template). Reserved `_variation` (a saved variation id or name, or several comma-separated) renders that row with its own variation in place of the run's; `_scene` (still formats, counted from 0) renders that page of the row instead of the first. A dotted key fills part of an object or list variable (`to.name`, `items.0.qty`) and keeps the template's saved values for the rest; a string holding JSON (`{…}` / `[…]`) fills an object or list variable. Max 500.
formatpng | webp | svg | pdf | mp4 | webm | gifNoOutput format for every row. Default png.
pagesallNo`all`: every page of a still template as its own file, per row (`<row>-01-<page>.png`, …), each page costing a still's credits. png, webp or svg only, and not with a row `_scene`.
outputzip | pdfNo`zip` (default): one file per row in a ZIP. `pdf`: every row's pages merged, in row order, into one PDF — only with `format: "pdf"` (VALIDATION otherwise). Rows that fail are left out and listed in `errors`.
dpiintegerNoPDF only: page size = pixels × 72 / dpi. Unset: the template's export default, else 300 on a print size (A4, Letter, business card, 4×6 label…) so the PDF comes out at paper size, else 72 (1 px = 1 pt).
scalenumberNoResolution multiplier. Default 1.
sizestringNoRender every row at another size: a size preset id or WIDTHxHEIGHT (see the single render's `size`). A row may override it with a reserved `_size` field (and `_fit`), e.g. one record as a story and another as a square in the same run.
fitreflow | scaleNoHow the design adapts to `size`. Default reflow.
fpsintegerNoVideo formats only.
qualitylow | medium | highNo—
variationstringNoSaved variation (id, or its name as the editor shows it) to apply to every row — or several, as a JSON array or comma-separated string, stacked in order (at most one per single-select group). A row's `_variation` replaces it.
variantsarrayNoRender every row once per look: N rows × M looks = N × M files (at most 1000). Each entry is a variation id or name, or several to combine in one file (an array, or comma-separated), stacked on top of the row's `_variation` (else the run's `variation`); `""` is the row as it is set. Files are named `<row>-<look name>` (the `""` look keeps `<row>`), each costing a render.
brandstringNoRender every row under another brand of the key's space — a brandId, brand name or website URL. The template keeps its own brand. Another space's brand is BRAND_NOT_FOUND.

Responses

200

JSON { ok, jobId, total, templateId } — poll `GET /api/v1/templates/bulk/{jobId}` with `jobId` for progress and the download.

401

Missing or invalid API key, or the key lacks the template.render scope

402

Not enough credits for the batch

403

The space's plan does not include bulk generation (PLAN_FEATURE_UNAVAILABLE)

404

Template not found in the key's space, or `brand` names no brand of it (BRAND_NOT_FOUND)

409

`brand` matches several brands (BRAND_AMBIGUOUS)

422

Invalid body (VALIDATION), e.g. `output: "pdf"` with a format other than pdf

Request
curl -X POST "https://bannx.com/api/v1/templates/:id/bulk" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{"rows":null,"format":"png","pages":null,"output":"zip","dpi":null}'
Response
// JSON { ok, jobId, total, templateId } — poll `GET /api/v1/templates/bulk/{jobId}` with `jobId` for progress and the download.
{
  "success": true,
  "data": { ... }
}