Bulk Import/Export
QR Igniter supports bulk operations for creating and managing large numbers of QR codes via CSV files and batch API endpoints.
CSV Import
CSV Format
The CSV file should include the following columns:
gtin,batch_lot,serial_number,expiry_date,destination_url
09506000134352,BATCH001,SERIAL001,251231,https://example.com/product1
09506000134353,BATCH001,SERIAL002,251231,https://example.com/product2
09506000134354,BATCH002,SERIAL003,260115,https://example.com/product3
Required Columns
| Column | Required | Format | Description |
|---|---|---|---|
| gtin | Yes | 8-14 digits | Product GTIN |
| batch_lot | No | Alphanumeric | Batch or lot number |
| serial_number | No | Alphanumeric | Unique serial |
| expiry_date | No | YYMMDD | Expiry date |
| destination_url | Yes | Valid URL | Redirect destination |
Importing via Admin Panel
- Navigate to QR Codes
- Click Import CSV
- Select the campaign for imported QR codes
- Upload your CSV file
- Review validation results
- Confirm import
Validation
The system validates all GTINs and URLs before import. Invalid rows will be rejected with detailed error messages.
API Batch Operations
Create from Array
POST /api/v1/batch/qr-codes
{
"campaign_id": 1,
"qr_codes": [
{
"gtin": "09506000134352",
"batch_lot": "BATCH001",
"serial_number": "SERIAL001",
"destination_url": "https://example.com/p1"
},
{
"gtin": "09506000134353",
"batch_lot": "BATCH001",
"serial_number": "SERIAL002",
"destination_url": "https://example.com/p2"
}
]
}
Validate CSV
POST /api/v1/batch/qr-codes/validate-csv
Content-Type: multipart/form-data
file: [CSV file]
Generate Batch Images
POST /api/v1/batch/qr-codes/generate
{
"qr_code_ids": [1, 2, 3, 4, 5],
"format": "png",
"size": "medium"
}
Download ZIP Archive
GET /api/v1/batch/qr-codes/{batch_id}/download
Batch Response Format
{
"success": true,
"batch_id": "batch_abc123",
"total": 100,
"created": 98,
"failed": 2,
"errors": [
{"row": 45, "error": "Invalid GTIN format"},
{"row": 67, "error": "Duplicate serial number"}
]
}
Export Options
Export QR Codes
Export QR code data to CSV:
GET /api/v1/qr-codes/export?campaign_id=1&format=csv
Export Analytics
Export scan data to CSV:
GET /api/v1/analytics/export?start_date=2025-01-01&end_date=2025-12-31
Best Practices
- Validate First: Always use the validation endpoint before bulk import
- Batch Size: Keep batches under 1,000 items for optimal performance
- Serial Numbers: Ensure serial numbers are unique within a campaign
- GTIN Format: Always use 14-digit GTINs (pad shorter ones with leading zeros)
- Test Import: Test with a small sample before importing large datasets
Next Steps
- Creating QR Codes - Individual QR code creation
- Analytics Dashboard - Track bulk import performance