Generate Property Brochures

Generate branded PDF brochures for property listings and list available themes.

Generate professional PDF brochures for property listings with customizable themes, colors, and layout options.

Generate a Brochure

POST /properties/:id/brochure

Authentication: Required (API key or JWT)

Generates a PDF brochure for the specified property and returns it as a file download.

Path Parameters

| Parameter | Type | Description | |-----------|------|-------------| | id | UUID | Property ID |

Request Body

All fields are optional.

| Field | Type | Default | Description | |-------|------|---------|-------------| | themeName | string | "default" | Theme name. One of: default, nature, elegant-luxury, modern-minimal, mono | | darkMode | boolean | false | Use the theme's dark color scheme | | accentColorOverride | string | — | Override the theme's accent color (hex code, e.g., "#FF5733") | | pageSize | string | "A4" | Page size: A4 or Letter | | includeQrCode | boolean | — | Include a QR code on the brochure | | qrCodeUrl | string | — | URL the QR code links to |

Example

curl -X POST https://api.leadhql.com/properties/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/brochure \
  -H "Authorization: Bearer leadhql_pk_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "themeName": "elegant-luxury",
    "darkMode": false,
    "pageSize": "A4",
    "includeQrCode": true,
    "qrCodeUrl": "https://example.com/property/12345"
  }' \
  --output brochure.pdf

Response

The response is a PDF file stream with the following headers:

Content-Type: application/pdf Content-Disposition: attachment; filename="property-brochure-<id>.pdf"

Save the response body directly to a file.

Custom Theme Example

curl -X POST https://api.leadhql.com/properties/a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d/brochure \
  -H "Authorization: Bearer leadhql_pk_abc123" \
  -H "Content-Type: application/json" \
  -d '{
    "themeName": "modern-minimal",
    "accentColorOverride": "#1A5F7A",
    "pageSize": "Letter"
  }' \
  --output brochure.pdf

List Available Themes

GET /properties/themes

Authentication: Required (API key or JWT)

Returns the list of available brochure themes with preview colors.

Example

curl https://api.leadhql.com/properties/themes \
  -H "Authorization: Bearer leadhql_pk_abc123"

Response

[
  {
    "name": "default",
    "preview": {
      "light": {
        "primary": "#1a1a1a",
        "background": "#ffffff",
        "foreground": "#1a1a1a"
      },
      "dark": {
        "primary": "#ffffff",
        "background": "#1a1a1a",
        "foreground": "#ffffff"
      }
    },
    "fontFamily": "Inter"
  },
  {
    "name": "elegant-luxury",
    "preview": {
      "light": { "primary": "...", "background": "...", "foreground": "..." },
      "dark": { "primary": "...", "background": "...", "foreground": "..." }
    },
    "fontFamily": "Playfair Display"
  },
  ...
]

Each theme includes:

| Field | Type | Description | |-------|------|-------------| | name | string | Theme identifier to use in brochure generation | | preview.light | object | Light mode colors (primary, background, foreground) | | preview.dark | object | Dark mode colors | | fontFamily | string | Primary font used by the theme |

LeadHQL Help

Docs & support

Hi there, how can we help?

Browse popular articles or ask a question below.

Popular articles

Or ask a question