Table Generation API
Tables from JSON, laid out for you.
Price lists, invoices, leaderboards, and reports. Send rows as JSON and get a clean table inside your image or PDF.
{
"columns": ["Region", "Orders", "Revenue"],
"rows": [
{
"Region": "North America",
"Orders": 120,
"Revenue": "$45k"
},
{ "Region": "EMEA", "Orders": 96, "Revenue": "$38k" },
{ "Region": "APAC", "Orders": 142, "Revenue": "$51k" },
{ "Region": "LATAM", "Orders": 58, "Revenue": "$19k" }
]
}| Region | Orders | Revenue |
|---|---|---|
| North America | 120 | $45k |
| EMEA | 96 | $38k |
| APAC | 142 | $51k |
| LATAM | 58 | $19k |
| Total | 416 | $153k |
How it works.
- 01
Add a table layer
Drop a table into your template and style the header, stripes, row size, and footer.
- 02
Send columns and rows
Pass an array of records whose keys match the columns. Send as many rows as the layout fits.
- 03
Render the file
Get back an image or a PDF with your rows laid out in the table you designed.
Features
Data in, table out.
No HTML tables, no layout math, no screenshots of spreadsheets.
Your design, your data
Variant, stripes, row size, and footer stay as you set them. Only the content changes.
Images and PDFs
Use the same table in a social image, an invoice PDF, or a printable price list.
Plain JSON
Columns are an array of names. Rows are records keyed by those names. Nothing else to learn.
Learn more about Plain JSON
Developers
One more field in your request.
The table is just another modification. Send it next to your text and image overrides.
curl -X POST https://api.bannerify.co/v1/templates/createImage \
-H "Content-Type: application/json" \
-d '{
"apiKey": "bnfy_xxx",
"templateId": "tpl_catalog",
"modifications": [
{
"name": "sales-table",
"columns": ["Region", "Orders", "Revenue"],
"rows": [
{
"Region": "North America",
"Orders": 120,
"Revenue": "$45k"
},
{ "Region": "EMEA", "Orders": 96, "Revenue": "$38k" },
{ "Region": "APAC", "Orders": 142, "Revenue": "$51k" },
{ "Region": "LATAM", "Orders": 58, "Revenue": "$19k" }
]
}
]
}' --output banner.pngimport { Bannerify } from "bannerify-js"
const bannerify = new Bannerify("bnfy_xxx")
const { result, error } = await bannerify.createImage("tpl_catalog", {
modifications: [
{
name: "sales-table",
columns: ["Region", "Orders", "Revenue"],
rows: [
{
Region: "North America",
Orders: 120,
Revenue: "$45k"
},
{ Region: "EMEA", Orders: 96, Revenue: "$38k" },
{ Region: "APAC", Orders: 142, Revenue: "$51k" },
{ Region: "LATAM", Orders: 58, Revenue: "$19k" }
]
}
],
})from bannerify import BannerifyClient
client = BannerifyClient("bnfy_xxx")
result = client.create_image(
"tpl_catalog",
modifications=[
{
"name": "sales-table",
"columns": ["Region", "Orders", "Revenue"],
"rows": [
{
"Region": "North America",
"Orders": 120,
"Revenue": "$45k"
},
{ "Region": "EMEA", "Orders": 96, "Revenue": "$38k" },
{ "Region": "APAC", "Orders": 142, "Revenue": "$51k" },
{ "Region": "LATAM", "Orders": 58, "Revenue": "$19k" }
]
}
],
)<?php
use Bannerify\Bannerify\BannerifyClient;
$client = new BannerifyClient('bnfy_xxx');
$result = $client->createImage('tpl_catalog', [
'modifications' => [
[
'name' => "sales-table",
'columns' => ["Region", "Orders", "Revenue"],
'rows' => [
[
'Region' => "North America",
'Orders' => 120,
'Revenue' => "$45k"
],
[ 'Region' => "EMEA", 'Orders' => 96, 'Revenue' => "$38k" ],
[ 'Region' => "APAC", 'Orders' => 142, 'Revenue' => "$51k" ],
[ 'Region' => "LATAM", 'Orders' => 58, 'Revenue' => "$19k" ]
]
]
],
]);Questions, answered.
Can't find what you need? Email an@bannerify.co and you'll hear back from the founder.
What data format does the table expect?
Send columns as an array of names in display order, and rows as an array of records whose keys match those columns.
Does the styling change when I send new rows?
No. The variant, stripes, row size, and footer stay as you set them in the editor. Only the data changes.
Can I put a table in a PDF?
Yes. Table layers work in images and PDFs, so the same template can render a price list image or an invoice PDF.
Stop building tables by hand.
Add a table layer to any template and fill it from your data.