API Documentation

OpenAPI 3.0 Last updated: July 2, 2026

API Overview

The QR Igniter REST API provides programmatic access to all platform features. The API follows RESTful conventions and uses JSON for request/response bodies.

Property Value
Base URL https://api.qrigniter.com/api/v1
Format JSON
Authentication Bearer Token (Laravel Sanctum 4.3)
Rate Limiting 1000 requests/minute
API Version v1

Response Format

All API responses follow a consistent format:

{
    "data": { ... },
    "message": "Success message",
    "meta": {
        "current_page": 1,
        "per_page": 15,
        "total": 100
    }
}

Error Responses

{
    "message": "The given data was invalid.",
    "errors": {
        "gtin": [
            "The gtin must be 14 characters.",
            "The gtin check digit is invalid."
        ]
    }
}

Authentication

The API uses Laravel Sanctum 4.3 for token-based authentication. All API requests (except login) require a valid bearer token.

Obtaining a Token

curl -X POST https://api.qrigniter.com/api/v1/auth/token \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "your-password"
  }'

Response:

{
    "data": {
        "token": "1|abc123xyz...",
        "token_type": "Bearer",
        "expires_at": "2025-12-20T00:00:00Z"
    }
}

Using the Token

curl -X GET https://api.qrigniter.com/api/v1/qr-codes \
  -H "Authorization: Bearer 1|abc123xyz..." \
  -H "Accept: application/json"

Token Abilities (Scopes)

Scope Description
clients:read Read client information
clients:write Create/update clients
qr-codes:read Read QR code information
qr-codes:write Create/update/delete QR codes
analytics:read Access analytics data
batch:write Perform batch operations

API Endpoints

Clients

Method Endpoint Description
GET /clients List all clients
POST /clients Create a new client
GET /clients/{id} Get a specific client
PUT /clients/{id} Update a client
DELETE /clients/{id} Delete a client

Brands

Method Endpoint Description
GET /brands List all brands
POST /brands Create a new brand
GET /brands/{id} Get a specific brand
PUT /brands/{id} Update a brand
DELETE /brands/{id} Delete a brand

QR Codes

Method Endpoint Description
GET /qr-codes List all QR codes
POST /qr-codes Create a new QR code
GET /qr-codes/{id} Get a specific QR code
PUT /qr-codes/{id} Update a QR code
DELETE /qr-codes/{id} Delete a QR code
GET /qr-codes/{id}/image Download QR code image

Analytics

Method Endpoint Description
GET /analytics/dashboard Overview metrics
GET /analytics/time-series Scan trends over time
GET /analytics/geographic Geographic distribution
GET /analytics/devices Device breakdown
GET /analytics/top-qr-codes Most scanned QR codes

Batch Operations

Method Endpoint Description
POST /batch/qr-codes Create multiple QR codes
POST /batch/qr-codes/generate Generate batch images
GET /batch/jobs/{id} Check batch job status
GET /batch/jobs/{id}/download Download batch results

QR Code Styling Fields (v1.9)

New in v1.9 — QR Styling Studio

The fields below are accepted on POST /qr-codes and PUT /qr-codes/{id}, and are returned in the QR code resource. All are optional — omitting them reproduces the classic black-on-white square QR code.

Shape & Colour

Field Type Allowed Values Description
module_shape string square | dots | rounded | extra-rounded | classy Shape of the QR data modules
eye_frame_shape string square | rounded | extra-rounded | circle Shape of the finder-pattern (eye) frames
eye_dot_shape string square | rounded | extra-rounded | circle Shape of the finder-pattern centre dots
eye_color string Hex colour, e.g. #D8481A Colour of the eyes (defaults to foreground colour)
gradient_type string none | vertical | horizontal | diagonal | radial Gradient applied to the QR foreground
gradient_end_color string Hex colour, e.g. #F7931E End colour of the gradient (start is foreground_color)
transparent_background boolean true | false Render with a transparent background
quiet_zone integer 0–10 Quiet-zone margin in modules
output_format string png | svg | eps | pdf Default output format for the generated image

Frame

Field Type Allowed Values Description
frame_style string none | border | scan_me Decorative frame around the QR code
frame_text string Max 24 characters Call-to-action text (used by scan_me style)
frame_color string Hex colour, e.g. #081422 Frame colour
frame_thickness integer 1–12 Frame thickness in module units

Logo Embedding

Field Type Allowed Values Description
embed_logo boolean true | false Embed a logo in the QR code centre
custom_logo_path string Max 255 characters Path to a custom logo (falls back to the brand logo)
logo_size_percent integer 10–35 Logo size as a percentage of the QR code
logo_punchout boolean true | false Clear the modules behind the logo (white rounded box) so larger logos stay scannable

Interim Selector & Resolver Links

Field Type Allowed Values Description
interim_selector_enabled boolean true | false Show the interim selector page on scan (multiple destinations)
icon_type string heroicon | emoji Resolver-link icon type (per interim selector link)
icon string Heroicon name or emoji glyph Resolver-link icon (per interim selector link)
Admin-panel-only fields

Interim selector links (including icon_type / icon) and the interim_theme branding JSON (brand → campaign → QR code cascade) are managed via the admin panel — they are not accepted by the QR code create/update endpoints. The resolver's JSON response exposes the resolved links (with icon_type) and theme at scan time.

Interactive API Documentation

OpenAPI Specification — Planned

A published OpenAPI (Swagger) specification is planned. Until then, this page is the authoritative API reference.

Code Examples

PHP (Laravel)

<?php

use Illuminate\Support\Facades\Http;

// Get API token
$response = Http::post('https://api.qrigniter.com/api/v1/auth/token', [
    'email' => 'user@example.com',
    'password' => 'password',
]);

$token = $response->json('data.token');

// Create a QR code
$response = Http::withToken($token)
    ->post('https://api.qrigniter.com/api/v1/qr-codes', [
        'campaign_id' => 1,
        'gtin' => '09506000134352',
        'batch_number' => 'BATCH001',
        'destination_url' => 'https://example.com/product',
    ]);

$qrCode = $response->json('data');

JavaScript (Fetch)

// Get API token
const authResponse = await fetch('https://api.qrigniter.com/api/v1/auth/token', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
    },
    body: JSON.stringify({
        email: 'user@example.com',
        password: 'password',
    }),
});

const { data: { token } } = await authResponse.json();

// Create a QR code
const qrResponse = await fetch('https://api.qrigniter.com/api/v1/qr-codes', {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        'Authorization': `Bearer ${token}`,
    },
    body: JSON.stringify({
        campaign_id: 1,
        gtin: '09506000134352',
        batch_number: 'BATCH001',
        destination_url: 'https://example.com/product',
    }),
});

const qrCode = await qrResponse.json();

Python (Requests)

import requests

BASE_URL = 'https://api.qrigniter.com/api/v1'

# Get API token
auth_response = requests.post(f'{BASE_URL}/auth/token', json={
    'email': 'user@example.com',
    'password': 'password',
})

token = auth_response.json()['data']['token']

# Create a QR code
headers = {'Authorization': f'Bearer {token}'}
qr_response = requests.post(f'{BASE_URL}/qr-codes', json={
    'campaign_id': 1,
    'gtin': '09506000134352',
    'batch_number': 'BATCH001',
    'destination_url': 'https://example.com/product',
}, headers=headers)

qr_code = qr_response.json()['data']

cURL

# Get API token
TOKEN=$(curl -s -X POST https://api.qrigniter.com/api/v1/auth/token \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com", "password": "password"}' \
  | jq -r '.data.token')

# Create a QR code
curl -X POST https://api.qrigniter.com/api/v1/qr-codes \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "campaign_id": 1,
    "gtin": "09506000134352",
    "batch_number": "BATCH001",
    "destination_url": "https://example.com/product"
  }'