Developer's API

Create and manage QR codes with ease using our API. Generate static QR codes for fixed URLs or manage dynamic QR codes with full create, manage, and delete functionality, allowing you to update destinations and track usage.

Get an API Key

Sign up for an account to get your API key, available in your dashboard.

Static QR Code Generation

Generate static QR codes with a simple GET request. These codes are fixed and redirect to a pre-defined URL, and the default output format is SVG which means the image can be resized without becoming pixellated or blurry.

Endpoint

GET https://www.DynamicQRCodes.co.uk/api/v1/api.php?API_KEY=myApiKey&qrData=www.DynamicQRCodes.co.uk

Parameters

Parameter Description Required Default
API_KEY Your API key for authentication
(Be careful not to embed this value directly into HTML, say, to avoid your API Key being used without your consent.)
Yes N/A
qrData Data to encode (e.g., a URL) Yes N/A
outputType Output format (e.g., svg, png) No svg
fgCol Foreground color (hex) No #FFFFFF
bgCol Background color (hex) No #000000
size Size in pixels No 300
padding Padding (pixels for PNG, elements for SVG) No 5
shape Element shape (square, round) No square

Examples

Default QR Code
Default QR Code

https://www.DynamicQRCodes.co.uk
/api/v1/api.php?
API_KEY=myApiKey
&qrData=www.DynamicQRCodes.co.uk

Round Elements QR Code
Round Elements

https://www.DynamicQRCodes.co.uk
/api/v1/api.php?
API_KEY=myApiKey
&qrData=www.DynamicQRCodes.co.uk
&shape=round

Colored QR Code
Custom Colors

https://www.DynamicQRCodes.co.uk
/api/v1/api.php?
API_KEY=myApiKey
&qrData=www.DynamicQRCodes.co.uk
&fgCol=4c6fe5&bgCol=eeeeee

Dynamic QR Code Management

Manage dynamic QR codes with full CRUD functionality. Update destinations, parameters, or tags without changing the QR code itself. Supports multiple QR code types, including HTTP redirects, vCards, and more.

Endpoint

https://www.DynamicQRCodes.co.uk/api/v1/qrcode.php

Authentication

Include your API key in the 'Authorization' header: Authorization: Bearer YOUR_API_KEY

Supported QR Code Types

Dynamic QR codes can be of different types, specified by the entity_type field. Each type has specific fields in the entity_data object. Use the Supported QR Code Types endpoint to see available types and their parameters.

Currently Supported Types:

Type Code Description
HTTP Redirect http Redirects to a URL with optional parameters.
vCard vcard Contact card with personal and social media details.
Wi-Fi wifi Wi-Fi network connection details (coming soon).

Operations

List All Dynamic QR Codes

Method: GET

URL: /api/v1/qrcode.php

Example:

GET https://DynamicQRCodes.co.uk/api/v1/qrcode.php
Authorization: Bearer YOUR_API_KEY

Response:

[
  {
    "qr_code_id": 123,
    "account_id": 456,
    "qr_id": "HWTDGU",
    "title": "Website Link",
    "type_name": "http",
    "entity_data": {
      "destination_url": "https://example.com",
      "parameters": "{\"utm_source\":\"qrcode\"}"
    },
    "tags": "marketing",
    "created_date": "2025-04-28 12:34:56",
    "updated_at": "2025-04-28 12:34:56",
    "last_scan_date": null,
    "scan_count": 0
  },
  {
    "qr_code_id": 124,
    "account_id": 456,
    "qr_id": "XYZ123",
    "title": "John Doe",
    "type_name": "vcard",
    "entity_data": {
      "given_name": "John",
      "family_name": "Doe",
      "email_work": "[email protected]",
      "social_links": {
        "1": {"url": "https://facebook.com/johndoe", "platform_name": "facebook"}
      }
    },
    "tags": "contact",
    "created_date": "2025-04-28 12:35:00",
    "updated_at": "2025-04-28 12:35:00",
    "last_scan_date": null,
    "scan_count": 0
  }
]
Create a Dynamic QR Code

Method: POST

URL: /api/v1/qrcode.php

Body:

{
  "title": "Website Link",
  "entity_type": "http",
  "entity_data": {
    "destination_url": "https://example.com",
    "parameters": {"utm_source": "qrcode"}
  },
  "tags": "marketing"
}

Required: entity_type , entity_data (with type-specific required fields)
Optional: title (auto-generated for vCard as given_name + family_name , required for other types), tags

Type-Specific Parameters:

  • HTTP Redirect (entity_type: "http")
  • Field Description Required
    destination_url The URL to redirect to (e.g., "https://example.com") Yes
    parameters Key-value pairs for URL parameters (e.g., {"utm_source": "qrcode"}) No
  • vCard (entity_type: "vcard")
  • Field Description Required
    given_name First name (e.g., "John") Yes
    family_name Last name (e.g., "Doe") No
    email_work Work email (e.g., "[email protected]") No
    email_personal Personal email (e.g., "[email protected]") No
    phone_work Work phone number (e.g., "1234567890") No
    phone_home Home phone number (e.g., "0987654321") No
    website_personal Personal website URL (e.g., "http://johndoe.com") No
    street Street name (e.g., "Main St") No
    street_number Street number (e.g., "123") No
    postal_code Postal code (e.g., "62704") No
    city City (e.g., "Springfield") No
    state State or province (e.g., "IL") No
    country Country (e.g., "USA") No
    org Organization name (e.g., "Acme Corp") No
    title_job Job title (e.g., "Software Engineer") No
    note Summary or notes (e.g., "A brief summary about yourself") No
    social_links Object mapping social_platform_row_id to URL (e.g., {"1": "https://facebook.com/johndoe"})
    See Social Media Platforms for available social_platform_row_id values.
    No
  • Wi-Fi (entity_type: "wifi") (Coming Soon)
  • Field Description Required
    ssid Wi-Fi network name (e.g., "MyWiFi") Yes
    password Wi-Fi password (e.g., "MyPass123") No
    encryption Encryption type (e.g., "WPA", "WEP") No
    hidden Whether the network is hidden (e.g., true) No

Examples:

Create an HTTP Redirect QR Code (requires title ):

POST https://DynamicQRCodes.co.uk/api/v1/qrcode.php
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Body: {
  "title": "Website Link",
  "entity_type": "http",
  "entity_data": {
    "destination_url": "https://example.com",
    "parameters": {"utm_source": "qrcode"}
  },
  "tags": "marketing"
}

Create a vCard QR Code ( title auto-generated as given_name + family_name ):

POST https://DynamicQRCodes.co.uk/api/v1/qrcode.php
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Body: {
  "entity_type": "vcard",
  "entity_data": {
    "given_name": "John",
    "family_name": "Doe",
    "email_work": "[email protected]",
    "social_links": {
      "1": "https://facebook.com/johndoe",
      "8": "https://x.com/johndoe"
    }
  },
  "tags": "contact"
}

Response (title will be "John Doe"):

{
  "qr_code_id": 123,
  "account_id": 456,
  "qr_id": "HWTDGU",
  "title": "John Doe",
  "type_name": "vcard",
  "entity_data": {
    "given_name": "John",
    "family_name": "Doe",
    "email_work": "[email protected]",
    "social_links": {
      "1": {"url": "https://facebook.com/johndoe", "platform_name": "facebook"},
      "8": {"url": "https://x.com/johndoe", "platform_name": "twitter"}
    }
  },
  "tags": "contact",
  "created_date": "2025-04-28 12:34:56",
  "updated_at": "2025-04-28 12:34:56",
  "last_scan_date": null,
  "scan_count": 0
}
Read a Dynamic QR Code

Method: GET

URL: /api/v1/qrcode.php/{qrid}

Example:

GET https://DynamicQRCodes.co.uk/api/v1/qrcode.php/HWTDGU
Authorization: Bearer YOUR_API_KEY

Response:

{
  "qr_code_id": 123,
  "account_id": 456,
  "qr_id": "HWTDGU",
  "title": "Website Link",
  "type_name": "http",
  "entity_data": {
    "destination_url": "https://example.com",
    "parameters": "{\"utm_source\":\"qrcode\"}"
  },
  "tags": "marketing",
  "created_date": "2025-04-28 12:34:56",
  "updated_at": "2025-04-28 12:34:56",
  "last_scan_date": null,
  "scan_count": 0
}
Update a Dynamic QR Code (Full Update)

Method: PUT

URL: /api/v1/qrcode.php/{qrid}

Body:

{
  "entity_type": "vcard",
  "entity_data": {
    "given_name": "John",
    "family_name": "Smith",
    "email_work": "[email protected]"
  },
  "tags": "contact, updated"
}

Required: entity_type , entity_data (with type-specific required fields)
Optional: title (auto-generated for vCard as given_name + family_name , required for other types), tags

Example:

PUT https://DynamicQRCodes.co.uk/api/v1/qrcode.php/HWTDGU
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Body: {
  "entity_type": "vcard",
  "entity_data": {
    "given_name": "John",
    "family_name": "Smith",
    "email_work": "[email protected]"
  },
  "tags": "contact, updated"
}

Response (title will be "John Smith"):

{"success": true}
Update a Dynamic QR Code (Partial Update)

Method: PATCH

URL: /api/v1/qrcode.php/{qrid}

Body:

{
  "entity_data": {
    "email_work": "[email protected]"
  }
}

Required: At least one field in entity_data , tags , or title
Optional: title , entity_data (type-specific fields), tags

Example:

PATCH https://DynamicQRCodes.co.uk/api/v1/qrcode.php/HWTDGU
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Body: {
  "entity_data": {
    "email_work": "[email protected]"
  }
}

Response:

{"success": true}
Delete a Dynamic QR Code

Method: DELETE

URL: /api/v1/qrcode.php/{qrid}

Example:

DELETE https://DynamicQRCodes.co.uk/api/v1/qrcode.php/HWTDGU
Authorization: Bearer YOUR_API_KEY

Response:

{"success": true}
Get Scan History for a Dynamic QR Code

Method: GET

URL: /api/v1/scan_history.php?qrid={qrid}&start_date={start_date}&end_date={end_date}

Parameters:

Parameter Description Required Format/Example
qrid The QR code ID Yes HWTDGU
start_date Start date for the scan history Yes YYYY-MM-DD (e.g., 2025-04-01)
end_date End date for the scan history Yes YYYY-MM-DD (e.g., 2025-04-28)

Example:

GET https://DynamicQRCodes.co.uk/api/v1/scan_history.php?qrid=HWTDGU&start_date=2025-04-01&end_date=2025-04-28
Authorization: Bearer YOUR_API_KEY

Response: A CSV file ('scan_history.csv') is downloaded with the following columns: 'Scan ID', 'QR Code ID', 'Scan Date', 'IP Address', 'User Agent'.

Sample CSV Content:

"QRID","QR Code ID","Scan Date","IP Address","User Agent"
N339SL,"2025-04-15 14:23:45","192.168.1.1","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
N339SL,"2025-04-20 09:12:34","203.0.113.5","Mozilla/5.0 (iPhone; CPU iPhone OS 14_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1.1 Mobile/15E148 Safari/604.1"

Supported QR Code Types

Retrieve a list of supported QR code types and their required/optional fields.

Endpoint

GET https://www.DynamicQRCodes.co.uk/api/v1/types.php

Authentication

Include your API key in the 'Authorization' header: Authorization: Bearer YOUR_API_KEY

Example

GET https://www.DynamicQRCodes.co.uk/api/v1/types.php
Authorization: Bearer YOUR_API_KEY

Response

[
  {
    "type_name": "http",
    "description": "HTTP Redirect QR Code",
    "required_fields": ["destination_url"],
    "optional_fields": ["parameters"]
  },
  {
    "type_name": "vcard",
    "description": "vCard Contact QR Code",
    "required_fields": ["given_name"],
    "optional_fields": ["family_name", "email_work", "email_personal", "phone_work", "phone_home", "website_personal", "street", "street_number", "postal_code", "city", "state", "country", "org", "title_job", "note", "social_links"]
  },
  {
    "type_name": "wifi",
    "description": "Wi-Fi Network QR Code",
    "required_fields": ["ssid"],
    "optional_fields": ["password", "encryption", "hidden"]
  }
]

Social Media Platforms

Retrieve a list of supported social media platforms for vCard QR codes. Use the row_id in the social_links field of a vCard QR code.

Endpoint

GET https://www.DynamicQRCodes.co.uk/api/v1/social_platforms.php

Authentication

Include your API key in the 'Authorization' header: Authorization: Bearer YOUR_API_KEY

Example

GET https://www.DynamicQRCodes.co.uk/api/v1/social_platforms.php
Authorization: Bearer YOUR_API_KEY

Response

[
  {"row_id": 1, "platform_name": "facebook", "display_name": "Facebook"},
  {"row_id": 8, "platform_name": "twitter", "display_name": "X / Twitter"}
]