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.

Endpoints

MethodPathScopeDescription
POST/api/v1/qrAny valid key but an MCP keyOne QR code returned inline (a PNG data URI, or SVG); or, with an inputs array of up to 100 items, a data URI for each (nothing is stored)
POST/api/v1/qr/batchstorage:uploadUp to 100 QR codes stored as private files with time-limited, read-only links, optionally zipped, failures reported per item. See Batch QR Generation

Generate a QR code

POST /api/v1/qr

Scope: none: any valid API key may call it.

Request body

Single mode takes one item, checked by the same rules as a batch item; only the fields below are used.

FieldTypeRequiredDescription
entityTypestringYesEntity type for the QR target (see below)
entityIdstringFor PROPERTY, BOOKING, PAYMENT1 to 128 letters, digits, _, . or -; not . or ..
accessCodestringNoPRINCIPAL only: added to the link as ?code=. 1 to 128 characters
baseUrlstringNoThe site the code points to: an http(s) URL of at most 512 characters
formatstringNodataUri (a PNG data URI, the default) or svg
options.sizestring or integerNodisplay (128 px), print (256 px), flyer (400 px), or an integer from 64 to 1024
options.errorCorrectionstringNoL, M, Q or H. Default H
options.marginintegerNoQuiet zone in modules, 0 to 10. Default 2
options.darkColor / options.lightColorstringNo#RRGGBB or #RRGGBBAA
options.utmParamsobjectNosource, medium, campaign (at most 100 characters each), added to the link as utm_*

Inline batch mode: send { "inputs": [ ... ] } (at most 100 items of the same shape) instead. Each input is generated as sent; one that fails is left out of results.

Entity types

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

Response

{
  "success": true,
  "data": {
    "qr": "data:image/png;base64,iVBORw0KGgoAAAANSU...",
    "format": "dataUri"
  }
}
FieldTypeDescription
qrstringA PNG data URI, or the SVG markup when format is svg
formatstringdataUri or svg

Inline batch mode answers { "results": { "<entityId or entityType>": "<data URI>", ... } }.

Processor configuration

The QR processor controls default generation settings. See Service Processors for the full API pattern. POST /api/v1/qr/batch honours enabled (a disabled processor answers 403 SERVICE_DISABLED), maxBatchSize, defaultFormat and defaultSize.

SettingDefaultDescription
defaultSize300Default QR code size in pixels
defaultFormat"png"Default output format: png or svg
maxBatchSize100Maximum items per POST /api/v1/qr/batch request (1 to 100)

Examples

Generate a property QR code

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": "flyer",
      "errorCorrection": "H",
      "utmParams": { "source": "flyer", "campaign": "q2-2026" }
    }
  }'

Generate with custom colours, as SVG

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": "AGENT",
    "entityId": "agt_456",
    "format": "svg",
    "options": { "darkColor": "#102A4A", "lightColor": "#FFFFFF", "size": 512 }
  }'

Error responses

StatusCodeDescription
400VALIDATION_ERRORInvalid JSON or a body that is not an object; an unknown entityType; a missing entityId (property, booking, payment) or a bad one; a bad accessCode, baseUrl, format or option; more than 100 inputs. The message names the rule
401UNAUTHORIZEDMissing or invalid API key
403FORBIDDENThe key's organisation is inactive (/api/v1/qr itself needs no scope)
429RATE_LIMITEDOver the key's budget; wait for Retry-After
500INTERNAL_ERRORAnything unexpected (a fixed message; details are never returned)