Batch QR Generation
API reference for generating and storing many QR codes in one request, with an optional zip.
Generate up to 100 QR codes in one call. Each code is stored as a private file of your organisation (PNG or SVG) and returned with a time-limited, read-only link; you can also ask for one zip of them all. An item that fails is reported in the answer and never fails the whole batch.
Endpoint
POST /api/v1/qr/batch
| Scope | storage:upload (the batch writes files into your organisation) |
| Rate limit | 120 requests/hr per API key, on top of the key's overall budget. For a pxk_dev_ developer sandbox key a batch counts one of the 50 daily storage:upload writes per item, plus one for the zip, checked before any code is generated: a batch that does not fit is refused with 429 SANDBOX_QUOTA_EXCEEDED and counts nothing more (see Authentication) |
| Idempotency | Optional x-idempotency-key header. A retry with the same key returns the stored answer instead of storing every code again. While the first request is still running a retry gets 409 CONFLICT: call again with the same key after about 30 seconds. An answer in which no code was generated is never stored, so a retry with the same key runs the batch again. A partial batch is stored: re-send its failed items in a new request under a new idempotency key (the same key would replay the stored answer) |
| Processor | Your organisation's QR processor applies: enabled: false refuses the batch (403 SERVICE_DISABLED), maxBatchSize caps the items (1 to 100, default 100), and defaultFormat / defaultSize fill in what the request leaves out. See QR Code Generation |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
items | array | Yes | 1 to maxBatchSize items (see below) |
format | string | No | png or svg, for every item. Default: the processor's defaultFormat, else png |
zip | boolean | No | Also store one zip of every generated image. Default false. A zip that cannot be built or stored never fails the request: the answer's zip is then null |
urlTtlSeconds | integer | No | How long the links stay valid, 60 to 604800 (7 days). Default 86400 (24 h) |
Each item:
| Field | Type | Required | Description |
|---|---|---|---|
entityType | string | Yes | AGENT, PARTNER, PRINCIPAL, PROPERTY, BOOKING or PAYMENT (see entity types) |
entityId | string | For PROPERTY, BOOKING, PAYMENT | 1 to 128 letters, digits, _, . or -; not . or .. |
accessCode | string | No | PRINCIPAL only: added to the link as ?code=. 1 to 128 characters |
baseUrl | string | No | The site the code points to: an http(s) URL of at most 512 characters. Default https://calderasuite.com |
options.size | string or integer | No | display (128 px), print (256 px), flyer (400 px), or an integer from 64 to 1024. Default: the processor's defaultSize (300 px unless you change it) |
options.errorCorrection | string | No | L, M, Q or H. Default H |
options.margin | integer | No | Quiet zone in modules, 0 to 10. Default 2 |
options.darkColor / options.lightColor | string | No | #RRGGBB or #RRGGBBAA |
options.utmParams | object | No | source, medium, campaign (at most 100 characters each), added to the link as utm_*. Default: source=qr, medium=registration (agent, partner, principal) or content (property, booking, payment), campaign = the entity type |
The link encoded in a code may be at most 1024 characters.
Response
{
"success": true,
"data": {
"items": [
{
"index": 0,
"status": "generated",
"entityType": "PROPERTY",
"entityId": "prop_001",
"targetUrl": "https://calderasuite.com/properties/prop_001?utm_source=qr&utm_medium=content&utm_campaign=property",
"format": "png",
"fileId": "f_ck9a1b2c3d4e5f6g7h8i9j0k",
"signedUrl": "https://files.example.com/generated/org_123/qr-batch/.../0-PROPERTY-prop_001.png?se=2026-11-21T14%3A30%3A00Z&sp=r&sig=...",
"expiresAt": "2026-11-21T14:30:00.000Z",
"size": 3812
},
{
"index": 1,
"status": "failed",
"entityType": "PROPERTY",
"entityId": null,
"error": { "code": "VALIDATION_ERROR", "message": "entityId is required for PROPERTY" }
}
],
"totalGenerated": 1,
"totalFailed": 1,
"zip": {
"fileId": "f_ck9z1y2x3w4v5u6t7s8r9q0p",
"signedUrl": "https://files.example.com/generated/org_123/qr-batch/.../qr-batch-....zip?se=...&sp=r&sig=...",
"expiresAt": "2026-11-21T14:30:00.000Z",
"size": 4021,
"entries": 1
},
"generatedAt": "2026-11-20T14:30:00.000Z"
}
}
| Field | Type | Description |
|---|---|---|
items | array | One entry per requested item, in request order (index is its position) |
items[].status | string | generated or failed |
items[].entityType / entityId | string | null | As sent, any string (a failed item's is cut to 128 characters); null when not sent as a string |
items[].targetUrl | string | The link encoded in the code (generated only) |
items[].format | string | png or svg (generated only) |
items[].fileId / signedUrl / expiresAt / size | The stored image: its file id, a time-limited, read-only link, when the link stops working, and its size in bytes (generated only) | |
items[].error | object | { code, message } (failed only). code is VALIDATION_ERROR (the item broke a rule above) or STORAGE_FAILED (it could not be stored; retry later) |
totalGenerated / totalFailed | number | Counts |
zip | object | null | The stored zip: fileId, signedUrl, expiresAt, size, entries. null when zip was not asked for, when nothing was generated, or when the zip could not be built or stored (the images are stored either way). Check zip before using it |
generatedAt | string | ISO 8601 time of generation |
Zip entries are named {index}-{entityType}-{entityId}.{png|svg} (the entity type in lower case stands in for a missing entityId) and stored uncompressed. Stored files stay in your organisation's private storage until you delete them (DELETE /api/v1/storage/media/files/{fileId}, scope storage:upload), and count toward your stored-bytes usage. Generation is metered as one qr.render per generated code.
Examples
curl
curl -X POST https://api.platformxe.com/api/v1/qr/batch \
-H "Content-Type: application/json" \
-H "x-api-key: pxk_live_your_api_key_here" \
-H "x-idempotency-key: flyer-batch-2026-11" \
-d '{
"items": [
{ "entityType": "PROPERTY", "entityId": "prop_001" },
{ "entityType": "PROPERTY", "entityId": "prop_002" },
{
"entityType": "PRINCIPAL",
"accessCode": "A1B2",
"baseUrl": "https://lettings.example.com",
"options": { "size": "print", "errorCorrection": "M", "utmParams": { "source": "qr", "medium": "flyer", "campaign": "nov" } }
}
],
"format": "png",
"zip": true
}'
TypeScript SDK
import { PlatformXeClient } from '@caldera/platformxe-sdk';
const px = new PlatformXeClient({ apiKey: 'pxk_live_your_api_key_here' });
const batch = await px.qr.generateBatch(
{
items: [
{ entityType: 'PROPERTY', entityId: 'prop_001' },
{ entityType: 'PROPERTY', entityId: 'prop_002', options: { size: 'flyer' } },
],
format: 'svg',
zip: true,
},
{ idempotencyKey: 'flyer-batch-2026-11' },
);
for (const item of batch.items) {
if (item.status === 'generated') console.log(item.entityId, item.signedUrl);
else console.warn(item.index, item.error.code, item.error.message);
}
if (batch.zip) console.log(batch.zip.signedUrl); // null when it could not be stored
Python SDK
batch = px.qr.generate_batch(
[
{"entityType": "PROPERTY", "entityId": "prop_001"},
{"entityType": "PROPERTY", "entityId": "prop_002"},
],
format="png",
zip=True,
idempotency_key="flyer-batch-2026-11",
)
print(f"Generated {batch['totalGenerated']}, failed {batch['totalFailed']}")
Go SDK
batch, err := client.Qr.GenerateBatchItems(platformxe.QrBatchInput{
Items: []platformxe.QrBatchItem{
{EntityType: "PROPERTY", EntityID: "prop_001"},
{EntityType: "PROPERTY", EntityID: "prop_002"},
},
Format: "png",
Zip: true,
}, &platformxe.QrBatchCallOptions{IdempotencyKey: "flyer-batch-2026-11"})
if err != nil {
log.Fatal(err)
}
fmt.Println(batch.TotalGenerated, batch.TotalFailed)
Error responses
A failing item is reported in items[].error; these are the errors of the request as a whole.
| Status | Code | Description |
|---|---|---|
| 400 | VALIDATION_ERROR | Invalid JSON; items missing, empty, not an array or over maxBatchSize; a bad format, zip or urlTtlSeconds |
| 401 | UNAUTHORIZED | Missing or invalid API key |
| 403 | FORBIDDEN | The key lacks storage:upload, or its organisation is inactive |
| 403 | SERVICE_DISABLED | Your organisation's QR processor is disabled |
| 409 | CONFLICT | A request with the same x-idempotency-key is still running. Call again with the same key after about 30 seconds |
| 429 | RATE_LIMITED | Over the 120/hr tier or the key's budget; wait for Retry-After |
| 429 | SANDBOX_QUOTA_EXCEEDED | The batch (one write per item, plus one for the zip) does not fit in a pxk_dev_ key's remaining storage:upload writes for today |
| 503 | STORAGE_UNAVAILABLE | File storage is unavailable (checked before any code is generated) |
| 500 | INTERNAL_ERROR | Anything else (a fixed message; details are never returned) |