# Recipes for common jobs

> Learn how to build the template and the request for jobs such as social cards, product banners, certificates, invoices, shipping labels, and tickets.

Canonical: https://bannerify.co/docs/essentials/automation-blueprints

Each recipe lists the layers to add to a template and the request that fills them. The steps are the same every time:

1. Add the layers in the table and give each one its name, as in [Name your layers](https://bannerify.co/docs/essentials/template-editor#name-your-layers).
2. Save the template and copy its id with **Copy Template ID** on its card.
3. Send the request. Replace `YOUR_API_KEY` with a key from the **API Keys** page, and replace the template id with yours.

## Social card

A social card shows a headline and an author on a picture of a fixed size. It suits blog posts and link previews. For the canvas, choose **Open Graph** (1200 by 630 pixels) under the social presets.

| Layer name | Layer | Request field |
| --- | --- | --- |
| `title` | Text | `text` |
| `author` | Text | `text` |
| `avatar` | Image | `src` |

```bash
curl --request POST \
  --url https://api.bannerify.co/v1/templates/createImage \
  --header 'Content-Type: application/json' \
  --output card.jpg \
  --data '{
    "apiKey": "YOUR_API_KEY",
    "templateId": "tpl_social_card",
    "format": "jpeg",
    "quality": 85,
    "modifications": [
      { "name": "title", "text": "How we cut render time in half" },
      { "name": "author", "text": "An Nguyen" },
      { "name": "avatar", "src": "https://example.com/an.png" }
    ]
  }'
```

Titles vary in length, so make the `title` box tall enough for the longest one. Set **Max lines** in the **Text fit** section if you want a hard limit. To use the card in an Open Graph tag, build a [signed URL](https://bannerify.co/docs/essentials/signed-urls) for the same template and modifications.

## Product banner

A product banner shows a photo, a name, and a price, and it can show a sale badge. For the canvas, choose **Square** (1080 by 1080 pixels).

| Layer name | Layer | Request field |
| --- | --- | --- |
| `product-photo` | Image | `src` |
| `product-name` | Text | `text` |
| `price` | Text | `text` |
| `sale-badge` | Text | `visible` |

Write `Sale` in the `sale-badge` layer, add a background to it in the **Background** section so that it looks like a badge, and hide the layer with its eye in the **Layers** list. The request below shows the badge. For a product without a sale, leave `sale-badge` out of the request or set `"visible": false`.

```bash
curl --request POST \
  --url https://api.bannerify.co/v1/templates/createStoredImage \
  --header 'Content-Type: application/json' \
  --data '{
    "apiKey": "YOUR_API_KEY",
    "templateId": "tpl_product_banner",
    "modifications": [
      { "name": "product-photo", "src": "https://example.com/shoes.png" },
      { "name": "product-name", "text": "Trail runner" },
      { "name": "price", "text": "$89" },
      { "name": "sale-badge", "visible": true }
    ]
  }'
```

The response holds the address of the saved file:

```json
{
  "url": "https://images.bannerify.co/files/0b3c1c1e-5d6f-4c52-9e0a-8f6a4c0f2a11.png"
}
```

Keep the `url` with the product so that you do not render the banner again. For a whole catalog, send one request for each product. [Quota and limits](https://bannerify.co/docs/account/quota#rate-limits) lists how many requests a key can send.

## Certificate

A certificate is a PDF with the name of a recipient, a course, a signer, and a QR code that links to a page where someone can check it. A PDF page has the size of the canvas in points, so set **Size** to 842 by 595 for an A4 page that is wider than it is tall.

| Layer name | Layer | Request field |
| --- | --- | --- |
| `recipient` | Text | `text` |
| `course` | Text | `text` |
| `signature` | Signature | `text`, `title`, `date` |
| `verify` | QR Code | `qrcode` |

```bash
curl --request POST \
  --url https://api.bannerify.co/v1/templates/createPdf \
  --header 'Content-Type: application/json' \
  --output certificate.pdf \
  --data '{
    "apiKey": "YOUR_API_KEY",
    "templateId": "tpl_certificate",
    "modifications": [
      { "name": "recipient", "text": "Mai Tran" },
      { "name": "course", "text": "Advanced image automation" },
      { "name": "signature", "text": "An Nguyen", "title": "Director", "date": "2026-02-02" },
      { "name": "verify", "qrcode": "https://example.com/certificates/1042" }
    ]
  }'
```

## Invoice

An invoice is a PDF with a number, a customer, a table of line items, totals, and a payment note. Set **Size** to 595 by 842 for an A4 portrait page.

| Layer name | Layer | Request field |
| --- | --- | --- |
| `invoice-number` | Text | `text` |
| `customer` | Text | `text` |
| `line-items` | Table | `columns`, `rows` |
| `totals` | Key Value | `rows` |
| `payment-note` | Alert | `title`, `text` |

```bash
curl --request POST \
  --url https://api.bannerify.co/v1/templates/createPdf \
  --header 'Content-Type: application/json' \
  --output invoice.pdf \
  --data '{
    "apiKey": "YOUR_API_KEY",
    "templateId": "tpl_invoice",
    "modifications": [
      { "name": "invoice-number", "text": "INV-1042" },
      { "name": "customer", "text": "Acme Studio" },
      {
        "name": "line-items",
        "columns": ["Item", "Qty", "Total"],
        "rows": [
          { "Item": "Automate plan", "Qty": 1, "Total": "$29.00" },
          { "Item": "Extra seat", "Qty": 2, "Total": "$10.00" }
        ]
      },
      {
        "name": "totals",
        "rows": [
          { "key": "Subtotal", "value": "$39.00" },
          { "key": "Tax", "value": "$3.90" },
          { "key": "Total", "value": "$42.90" }
        ]
      },
      { "name": "payment-note", "title": "Payment terms", "text": "Pay before 31 Jan 2026." }
    ]
  }'
```

A table cuts the rows that run past the bottom of its box, and a PDF has one page. Make the table tall enough for the longest invoice you expect.

## Shipping label

A shipping label shows an address, a service, and a barcode of the tracking number. A 4 by 6 inch label at 300 dpi is 1200 by 1800 pixels, so set **Size** to that and print the PNG at 300 dpi.

| Layer name | Layer | Request field |
| --- | --- | --- |
| `ship-to` | Text | `text` |
| `service` | Text | `text` |
| `tracking-barcode` | Barcode | `barcode` |

```bash
curl --request POST \
  --url https://api.bannerify.co/v1/templates/createImage \
  --header 'Content-Type: application/json' \
  --output label.png \
  --data '{
    "apiKey": "YOUR_API_KEY",
    "templateId": "tpl_shipping_label",
    "modifications": [
      { "name": "ship-to", "text": "Mai Tran\n12 Pine Street\nHanoi 100000" },
      { "name": "service", "text": "Express" },
      { "name": "tracking-barcode", "barcode": "1Z999AA10123456784" }
    ]
  }'
```

A new line in `text` starts a new line on the label, so `ship-to` can hold the whole address. The barcode prints its value under the bars, so the label needs no separate text layer for the number.

## Ticket

A ticket shows an attendee, an event, and a QR code that a door scanner reads. Send the address or the code that your scanner expects as the QR code content.

| Layer name | Layer | Request field |
| --- | --- | --- |
| `attendee` | Text | `text` |
| `event` | Text | `text` |
| `ticket-qr` | QR Code | `qrcode` |

```bash
curl --request POST \
  --url https://api.bannerify.co/v1/templates/createStoredImage \
  --header 'Content-Type: application/json' \
  --data '{
    "apiKey": "YOUR_API_KEY",
    "templateId": "tpl_ticket",
    "modifications": [
      { "name": "attendee", "text": "Mai Tran" },
      { "name": "event", "text": "Image automation meetup" },
      { "name": "ticket-qr", "qrcode": "https://example.com/tickets/8f3a1c" }
    ]
  }'
```

The response holds the `url` of the saved image, which you can put in an email.

## Related pages

- [Modifications](https://bannerify.co/docs/essentials/modifications) lists every field that a request can set.
- [Generate images](https://bannerify.co/docs/essentials/generate-images) and [Generate PDFs](https://bannerify.co/docs/essentials/generate-pdfs) explain the options of each request.
- [Layer types](https://bannerify.co/docs/essentials/elements) describes the layers used here.

## Related

- [Previous: Signed URLs](https://bannerify.co/docs/essentials/signed-urls)
- [Next: Connect Bannerify to your tools](https://bannerify.co/docs/integrations/overview)
- [Documentation index](https://bannerify.co/docs/llms.txt)
