Bulk Create QR Codes
Create up to 50 QR codes in a single request.
POST /api/v1/qrcodes/bulkRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
qrcodes | array | Yes | Array of QR code objects (1–50 items) |
Each item in the qrcodes array has the same fields as the single create endpoint:
| Field | Type | Required |
|---|---|---|
type | string | Yes |
content | object | Yes |
name | string | No |
is_dynamic | boolean | No |
folder_id | string | No |
style | object | No |
Example Request
bash
curl -X POST https://api.qbar-scanner.com/api/v1/qrcodes/bulk \
-H "Content-Type: application/json" \
-H "X-API-Key: qbar_your_key_here" \
-d '{
"qrcodes": [
{
"type": "url",
"content": { "url": "https://example.com/page-1" },
"name": "Page 1",
"is_dynamic": true
},
{
"type": "url",
"content": { "url": "https://example.com/page-2" },
"name": "Page 2"
},
{
"type": "wifi",
"content": {
"ssid": "GuestNetwork",
"password": "welcome123",
"encryption": "WPA"
},
"name": "Office WiFi"
}
]
}'Response 201 Created
json
{
"created": [
{
"id": "uuid-1",
"type": "url",
"name": "Page 1",
"content_string": "https://example.com/page-1",
"is_dynamic": true,
"short_code": "aB3cD4eF",
"dynamic_url": "https://qbar-scanner.com/r/aB3cD4eF",
"image_url": "https://api.qbar-scanner.com/api/v1/qrcodes/uuid-1/image",
"created_at": "2025-01-15T10:30:00.000Z"
},
{
"id": "uuid-2",
"type": "url",
"name": "Page 2",
"content_string": "https://example.com/page-2",
"is_dynamic": false,
"image_url": "https://api.qbar-scanner.com/api/v1/qrcodes/uuid-2/image",
"created_at": "2025-01-15T10:30:00.000Z"
},
{
"id": "uuid-3",
"type": "wifi",
"name": "Office WiFi",
"content_string": "WIFI:T:WPA;S:GuestNetwork;P:welcome123;;",
"is_dynamic": false,
"image_url": "https://api.qbar-scanner.com/api/v1/qrcodes/uuid-3/image",
"created_at": "2025-01-15T10:30:00.000Z"
}
],
"errors": [],
"summary": {
"total_submitted": 3,
"total_created": 3,
"total_failed": 0,
"dynamic_created": 1,
"static_created": 2
},
"request_id": "..."
}Partial Success
If some items fail validation, the valid items are still created:
json
{
"created": [ /* valid items */ ],
"errors": [
{
"index": 2,
"errors": [
{ "field": "url", "message": "URL is required" }
]
}
],
"summary": {
"total_submitted": 5,
"total_created": 4,
"total_failed": 1,
"dynamic_created": 2,
"static_created": 2
},
"request_id": "..."
}The index is the 0-based position in your submitted array.
Limits
- Maximum 50 items per request
- All items share a single API rate limit deduction
- The entire batch is inserted in a single database transaction for efficiency