PlatformXeDocs
Get API Key

QR Code Generation

API reference for generating QR codes linked to platform entities.

Generate QR codes linked to platform entities -- properties, bookings, payments, agents, partners, and principals. Each QR code encodes a URL that resolves to the appropriate entity page in your application.

Generate a QR code

POST /api/v1/qr

Scope: storage:upload

Request body

FieldTypeRequiredDescription
entityTypestringYesEntity type for the QR target (see below)
entityIdstringYesID of the entity
options.sizestringNoQR size: small, medium, or large. Default from processor config (300px)
options.errorCorrectionstringNoError correction level: L, M, Q, or H. Default: M
options.foregroundstringNoForeground color (hex, e.g. #000000)
options.backgroundstringNoBackground color (hex, e.g. #FFFFFF)
options.includeUtmbooleanNoWhether to append UTM parameters to the target URL
options.utmSourcestringNoUTM source parameter
options.utmMediumstringNoUTM medium parameter
options.utmCampaignstringNoUTM campaign parameter

Entity types

TypeDescription
PROPERTYProperty listing
BOOKINGBooking record
PAYMENTPayment transaction
AGENTAgent profile
PARTNERPartner profile
PRINCIPALPrincipal (landlord) profile

Response

{
  "success": true,
  "data": {
    "qrDataUrl": "data:image/png;base64,iVBORw0KGgoAAAANSU...",
    "targetUrl": "https://app.example.com/properties/prop_123",
    "entityType": "PROPERTY",
    "entityId": "prop_123"
  }
}
FieldTypeDescription
qrDataUrlstringBase64-encoded QR code image (PNG or SVG based on processor config)
targetUrlstringThe URL encoded in the QR code
entityTypestringThe entity type
entityIdstringThe entity ID

Processor configuration

The QR processor controls default generation settings. See Service Processors for the full API pattern.

SettingDefaultDescription
defaultSize300Default QR code size in pixels
defaultFormat"png"Default output format: png or svg
maxBatchSize100Maximum items per batch request

Examples

Generate a property QR code

curl

curl -X POST https://api.platformxe.com/api/v1/qr \
  -H "Content-Type: application/json" \
  -H "x-api-key: pxk_live_your_api_key_here" \
  -d '{
    "entityType": "PROPERTY",
    "entityId": "prop_123",
    "options": {
      "size": "large",
      "errorCorrection": "H",
      "includeUtm": true,
      "utmSource": "flyer",
      "utmCampaign": "q2-2026"
    }
  }'

TypeScript SDK

import { PlatformXe } from '@caldera/platformxe-sdk';

const px = new PlatformXe({ apiKey: 'pxk_live_your_api_key_here' });

const qr = await px.qr.generate({
  entityType: 'PROPERTY',
  entityId: 'prop_123',
  options: {
    size: 'large',
    errorCorrection: 'H',
    includeUtm: true,
    utmSource: 'flyer',
    utmCampaign: 'q2-2026',
  },
});

console.log(qr.targetUrl);
// "https://app.example.com/properties/prop_123?utm_source=flyer&utm_campaign=q2-2026"

Python SDK

from platformxe import PlatformXe

px = PlatformXe(api_key="pxk_live_your_api_key_here")

qr = px.qr.generate({
    "entityType": "PROPERTY",
    "entityId": "prop_123",
    "options": {
        "size": "large",
        "errorCorrection": "H",
        "includeUtm": True,
        "utmSource": "flyer",
        "utmCampaign": "q2-2026"
    }
})

print(qr["targetUrl"])

Generate with custom colors

const qr = await px.qr.generate({
  entityType: 'AGENT',
  entityId: 'agt_456',
  options: {
    foreground: '#102a4a',
    background: '#FFFFFF',
    size: 'medium',
  },
});

Error responses

CodeDescription
BAD_REQUESTInvalid entity type, missing entity ID, or invalid options
FORBIDDENAPI key does not have the storage:upload scope
SERVICE_DISABLEDQR processor is disabled for this organization
RATE_LIMITEDRate limit exceeded