Skip to content
Preview of the Product sale banner (image) template

1200 × 628 px

Social media images

Product sale banner (image)

A 1200 × 628 sale banner for ads and newsletters: product photo on a colour panel, a discount starburst, product name that shrinks to fit, old and new price, a stock progress bar, a call-to-action button and the discount code.

PNG1200 × 628 pxLocale en-GBCanvas

Opens Dynamic Document API with this template preloaded in a free workspace, in the canvas editor.

Features

  • Progress bar
  • Text that fits its box

How image templates are built is described in the canvas editor guide.

Dynamic properties

10 properties a render can set, sent flat in data. A property you leave out keeps its designed value.

KeyTypeExample
eyebrow.textLabelstring"AUTUMN SALE · 3 DAYS ONLY"
product_name.textProduct name · up to 60 characters, longer text is shortenedstring"Aurora Wireless Headphones"
old_price.textOld pricestring"€149"
price.textSale pricestring"€104"
badge_text.textDiscount · up to 6 charactersstring"−30%"
stock_label.textStock notestring"72 % claimed"
stock.valueClaimed (%)number72
cta_text.textButton text · up to 20 charactersstring"Shop now →"
code.textCode and deadlinestring"Code AUTUMN30 · ends 5 Oct"
product.srcProduct image · https:// or data: URL, transparent PNG works beststringdesigned value

Render it with the API

After adding the template to your workspace, render it by ID and pass your data.

curl -X POST https://api-eu.dynamicdocumentapi.com/v1/renders \
  -H "Authorization: Bearer $DYNAMIC_DOCUMENT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "type": "template",
    "template_id": "tpl_01J9ZK3M7Q8V5W2X4Y6Z8A0B1C"
  },
  "data": {
    "eyebrow.text": "AUTUMN SALE · 3 DAYS ONLY",
    "product_name.text": "Aurora Wireless Headphones",
    "old_price.text": "€149",
    "price.text": "€104",
    "badge_text.text": "−30%",
    "stock_label.text": "72 % claimed",
    "stock.value": 72,
    "cta_text.text": "Shop now →",
    "code.text": "Code AUTUMN30 · ends 5 Oct"
  },
  "output": {
    "format": "png",
    "filename": "product-sale-banner-image.png"
  }
}'