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.
/api/v1/templates/:id/bulkQuery / Path parameters
| Name | In | Required | Description |
|---|---|---|---|
| id | path | Yes | Template ID |
Request body
| Property | Type | Required | Description |
|---|---|---|---|
| rows | array | Yes | One 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. |
| format | png | webp | svg | pdf | mp4 | webm | gif | No | Output format for every row. Default png. |
| pages | all | No | `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`. |
| output | zip | pdf | No | `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`. |
| dpi | integer | No | PDF 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). |
| scale | number | No | Resolution multiplier. Default 1. |
| size | string | No | Render 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. |
| fit | reflow | scale | No | How the design adapts to `size`. Default reflow. |
| fps | integer | No | Video formats only. |
| quality | low | medium | high | No | — |
| variation | string | No | Saved 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. |
| variants | array | No | Render 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. |
| brand | string | No | Render 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
JSON { ok, jobId, total, templateId } — poll `GET /api/v1/templates/bulk/{jobId}` with `jobId` for progress and the download.
Missing or invalid API key, or the key lacks the template.render scope
Not enough credits for the batch
The space's plan does not include bulk generation (PLAN_FEATURE_UNAVAILABLE)
Template not found in the key's space, or `brand` names no brand of it (BRAND_NOT_FOUND)
`brand` matches several brands (BRAND_AMBIGUOUS)
Invalid body (VALIDATION), e.g. `output: "pdf"` with a format other than pdf
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}'// JSON { ok, jobId, total, templateId } — poll `GET /api/v1/templates/bulk/{jobId}` with `jobId` for progress and the download.
{
"success": true,
"data": { ... }
}