Stannp | Direct Mail Marketing Platform

Tools

Utility endpoints for generating QR codes, merging PDFs, and listing templates.

Generate a QR Code

Creates a QR code image. You must use a PUBLIC KEY for this request. The data parameter accepts any content — typically a URL. To create personalised QR codes for each recipient, use template variables in the data field (e.g., {{url}}) which will be replaced per recipient during mail merge. QR code foreground and background colours are configured via the template editor in the platform. For more information, see our QR code guide.

GET / POST

Parameters

ParameterDetailsDescription
size
int optional
The requested size in pixels of the QR code. The actual image dimensions may differ as the QR code is sized to the nearest module boundary. Returns a JPEG image.
data
str required
The content you wish the QR code to contain.
color
str optional
The foreground colour of the QR code as a hex value. Defaults to #000000.
background
str optional
The background colour of the QR code as a hex value. Defaults to #ffffff.

Request Example

curl "https://api-eu1.stannp.com/v1/qrcode/create" \
-u {API_KEY}: \
-d "size=300" \
-d "data=hello+world"

Response Example

"<img src=\"/assets/images/qr_example.jpg\" alt=\"QR Code Example\">"

Merge PDF files

Merge multiple PDF files into a single file.

POST

Parameters

ParameterDetailsDescription
files
array required
An array of URLs for the PDF files to merge. Example: files[]=https://file1.pdf&files[]=https://file2.pdf

Request Example

curl "https://api-eu1.stannp.com/v1/pdf/merge" \
-u {API_KEY}: \
-d "files[0]=https://file1.pdf" \
-d "files[1]=https://file2.pdf"

Response Example

{
  "success": true,
  "data": "https://merged-file.pdf"
}

Get templates

Get the templates created on your account.

GET / POST

Request Example

curl "https://api-eu1.stannp.com/v1/templates/list" \
-u {API_KEY}:

Response Example

{
  "success": true,
  "data": [
    {
      "id": "0",
      "account_id": "0",
      "template_name": "Template name 1",
      "image": "",
      "created": "2023-09-06 12:37:21",
      "updated": "2023-11-01 09:53:20",
      "size": "US-letter",
      "page_count": "1",
      "duplex": "1",
      "back_image": null,
      "template": "",
      "is_public": "1",
      "is_template": "1",
      "version": "3",
      "is_hidden": "1",
      "shared": "0",
      "user_id": "0",
      "tags": "",
      "versions": "3"
    },
    {
      "id": "0",
      "account_id": "0",
      "template_name": "Template name 2",
      "image": "",
      "created": "2023-09-06 11:44:37",
      "updated": "2023-11-01 09:52:50",
      "size": "4X6",
      "page_count": "1",
      "duplex": "1",
      "back_image": null,
      "template": "",
      "is_public": "1",
      "is_template": "1",
      "version": "3",
      "is_hidden": "1",
      "shared": "0",
      "user_id": "0",
      "tags": "",
      "versions": "2"
    }
  ]
}