curl --request POST \
--url https://management.scanova.io/analytics/qr/export/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"q": [
"Q07afe81aa0034c01"
],
"filter_by": "qrid"
}
'import requests
url = "https://management.scanova.io/analytics/qr/export/"
payload = {
"q": ["Q07afe81aa0034c01"],
"filter_by": "qrid"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({q: ['Q07afe81aa0034c01'], filter_by: 'qrid'})
};
fetch('https://management.scanova.io/analytics/qr/export/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://management.scanova.io/analytics/qr/export/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'q' => [
'Q07afe81aa0034c01'
],
'filter_by' => 'qrid'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://management.scanova.io/analytics/qr/export/"
payload := strings.NewReader("{\n \"q\": [\n \"Q07afe81aa0034c01\"\n ],\n \"filter_by\": \"qrid\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://management.scanova.io/analytics/qr/export/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"q\": [\n \"Q07afe81aa0034c01\"\n ],\n \"filter_by\": \"qrid\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://management.scanova.io/analytics/qr/export/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"q\": [\n \"Q07afe81aa0034c01\"\n ],\n \"filter_by\": \"qrid\"\n}"
response = http.request(request)
puts response.read_bodyExport Analytics Data
Export QR Code analytics as downloadable reports in Excel (XLS/XLSX) or PDF format. Ideal for detailed performance reviews, audits, and external analysis in tools like Excel, Google Sheets, or BI dashboards. Authentication required.
curl --request POST \
--url https://management.scanova.io/analytics/qr/export/ \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"q": [
"Q07afe81aa0034c01"
],
"filter_by": "qrid"
}
'import requests
url = "https://management.scanova.io/analytics/qr/export/"
payload = {
"q": ["Q07afe81aa0034c01"],
"filter_by": "qrid"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({q: ['Q07afe81aa0034c01'], filter_by: 'qrid'})
};
fetch('https://management.scanova.io/analytics/qr/export/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://management.scanova.io/analytics/qr/export/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'q' => [
'Q07afe81aa0034c01'
],
'filter_by' => 'qrid'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://management.scanova.io/analytics/qr/export/"
payload := strings.NewReader("{\n \"q\": [\n \"Q07afe81aa0034c01\"\n ],\n \"filter_by\": \"qrid\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://management.scanova.io/analytics/qr/export/")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"q\": [\n \"Q07afe81aa0034c01\"\n ],\n \"filter_by\": \"qrid\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://management.scanova.io/analytics/qr/export/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"q\": [\n \"Q07afe81aa0034c01\"\n ],\n \"filter_by\": \"qrid\"\n}"
response = http.request(request)
puts response.read_bodyDescription
This endpoint allows you to export comprehensive analytics data for one or more QR codes over a specific date range.The export includes scan details, device and OS data, and geographic insights โ formatted for spreadsheet analysis. You can choose between:
.pdffor easy sharing and presentation-ready reports.xls**/ **.xlsxfor advanced Excel-based reportingPurpose
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
from | string (YYYY-MM-DD) | โ Yes | Start date for analytics data (inclusive). |
to | string (YYYY-MM-DD) | โ Yes | End date for analytics data (inclusive). Defaults to current date. |
file_format | string | โ Yes | Desired export format โ must be one of: xls, xlsx, pdf. |
exclude_bot_scan | boolean | No | When true, bot scans are excluded from all exported analytics. Excel exports gain an additional Bot Scans sheet with the bot summary. Defaults to false. |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
filter_by | string | โ Yes | Specify filter type โ either qrid or tags. |
q | array | โ Yes | Array of QR Code IDs or tags for which analytics will be exported. |
Examples
Export Single QR Code (Excel)
curl -X POST "https://management.scanova.io/analytics/qr/export/?from=2025-02-01&to=2025-02-25&file_format=xlsx" \
-H "Authorization: YOUR_API_KEY" \
-F "filter_by=qrid" \
-F "q=Qf94b25d768294148"
Export Multiple QR Codes (PDF)
curl -X POST "https://management.scanova.io/analytics/qr/export/?from=2025-02-01&to=2025-02-25&file_format=pdf" \
-H "Authorization: YOUR_API_KEY" \
-F "filter_by=qrid" \
-F "q=Qf94b25d768294148" \
-F "q=Qf94b25d768294149" \
-F "q=Qf94b25d768294150"
Export with Date Range
curl -X POST "https://management.scanova.io/analytics/qr/export/?from=2025-01-01&to=2025-01-31&file_format=xlsx" \
-H "Authorization: YOUR_API_KEY" \
-F "filter_by=qrid" \
-F "q=Qf94b25d768294148"
Export by Tags
curl -X POST "https://management.scanova.io/analytics/qr/export/?from=2025-02-01&to=2025-02-25&file_format=xlsx" \
-H "Authorization: YOUR_API_KEY" \
-F "filter_by=tags" \
-F "q=marketing" \
-F "q=campaign"
Export with Bot Scans Excluded
curl -X POST "https://management.scanova.io/analytics/qr/export/?from=2025-02-01&to=2025-02-25&file_format=xlsx&exclude_bot_scan=true" \
-H "Authorization: YOUR_API_KEY" \
-F "filter_by=qrid" \
-F "q=Qf94b25d768294148"
exclude_bot_scan=true, Excel exports include an additional Bot Scans sheet summarising total bot hits, unique bots, top bot types, and bot activity per QR code. PDF exports include the same data as a separate section.Response
Success Response (200 OK)
The response returns a file download with the analytics data in the requested format.Excel File (.xlsx/.xls)
- Content-Type:
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet(xlsx) orapplication/vnd.ms-excel(xls) - Content: Multi-sheet Excel file with comprehensive analytics data
- Sheets: Multiple sheets with different analytics views
PDF File (.pdf)
- Content-Type:
application/pdf - Content: PDF document containing formatted analytics data
- Structure: Single file with all analytics data
Integration Examples
JavaScript - Export Analytics
async function exportAnalytics(filterBy, qrCodes, fromDate, toDate, format = 'xlsx') {
try {
const formData = new FormData();
// Add filter_by
formData.append('filter_by', filterBy);
// Add QR code IDs or tags
qrCodes.forEach(qrId => {
formData.append('q', qrId);
});
const response = await fetch(
`https://management.scanova.io/analytics/qr/export/?from=${fromDate}&to=${toDate}&file_format=${format}`,
{
method: 'POST',
headers: {
'Authorization': 'YOUR_API_KEY'
},
body: formData
}
);
if (response.ok) {
// Get the file blob
const blob = await response.blob();
// Create download link
const url = window.URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = `analytics_${fromDate}_to_${toDate}.${format}`;
document.body.appendChild(a);
a.click();
window.URL.revokeObjectURL(url);
document.body.removeChild(a);
console.log('Analytics exported successfully');
return true;
} else {
throw new Error('Failed to export analytics');
}
} catch (error) {
console.error('Error exporting analytics:', error);
return false;
}
}
// Usage - Export by QR IDs
const qrCodes = ['Qf94b25d768294148', 'Qf94b25d768294149'];
exportAnalytics('qrid', qrCodes, '2025-02-01', '2025-02-25', 'xlsx');
// Usage - Export by tags
const tags = ['marketing', 'campaign'];
exportAnalytics('tags', tags, '2025-02-01', '2025-02-25', 'pdf');
Python - Export Analytics
import requests
from datetime import datetime, timedelta
def export_analytics(filter_by, qr_codes, from_date, to_date, file_format='xlsx'):
url = "https://management.scanova.io/analytics/qr/export/"
headers = {"Authorization": "YOUR_API_KEY"}
# Prepare form data - use list of tuples for multiple values with same key
data = [('filter_by', filter_by)]
for qr_id in qr_codes:
data.append(('q', qr_id))
# Prepare query parameters
params = {
'from': from_date,
'to': to_date,
'file_format': file_format
}
try:
response = requests.post(url, headers=headers, data=data, params=params)
response.raise_for_status()
# Save the file
filename = f"analytics_{from_date}_to_{to_date}.{file_format}"
with open(filename, 'wb') as f:
f.write(response.content)
print(f"Analytics exported successfully to {filename}")
return filename
except requests.exceptions.RequestException as e:
print(f"Error exporting analytics: {e}")
return None
def export_monthly_analytics(filter_by, qr_codes, year, month):
"""Export analytics for a specific month"""
from_date = f"{year}-{month:02d}-01"
# Calculate last day of month
if month == 12:
next_month = datetime(year + 1, 1, 1)
else:
next_month = datetime(year, month + 1, 1)
to_date = (next_month - timedelta(days=1)).strftime('%Y-%m-%d')
return export_analytics(filter_by, qr_codes, from_date, to_date, 'xlsx')
# Usage - Export by QR IDs
qr_codes = ['Qf94b25d768294148', 'Qf94b25d768294149']
export_analytics('qrid', qr_codes, '2025-02-01', '2025-02-25', 'xlsx')
# Usage - Export by tags
tags = ['marketing', 'campaign']
export_analytics('tags', tags, '2025-02-01', '2025-02-25', 'pdf')
# Export monthly data
export_monthly_analytics('qrid', qr_codes, 2025, 2)
PHP - Export Analytics
<?php
function exportAnalytics($filterBy, $qrCodes, $fromDate, $toDate, $fileFormat = 'xlsx') {
$url = "https://management.scanova.io/analytics/qr/export/";
$headers = [
"Authorization: YOUR_API_KEY"
];
// Prepare form data
$data = [
['name' => 'filter_by', 'contents' => $filterBy]
];
foreach ($qrCodes as $qrId) {
$data[] = ['name' => 'q', 'contents' => $qrId];
}
// Prepare query parameters
$params = http_build_query([
'from' => $fromDate,
'to' => $toDate,
'file_format' => $fileFormat
]);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url . '?' . $params);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($httpCode === 200) {
$filename = "analytics_{$fromDate}_to_{$toDate}.{$fileFormat}";
file_put_contents($filename, $response);
echo "Analytics exported successfully to {$filename}";
return $filename;
} else {
echo "Error exporting analytics: " . $response;
return null;
}
}
// Usage - Export by QR IDs
$qrCodes = ['Qf94b25d768294148', 'Qf94b25d768294149'];
$filename = exportAnalytics('qrid', $qrCodes, '2025-02-01', '2025-02-25', 'xlsx');
// Usage - Export by tags
$tags = ['marketing', 'campaign'];
$filename = exportAnalytics('tags', $tags, '2025-02-01', '2025-02-25', 'pdf');
?>
Notes
- โ Supports bulk analytics export for multiple QR codes at once.
- โ๏ธ Recommended file format:
.xlsxfor visualization/reporting.pdffor presentation, sharing, or archival purposes
- ๐ Data range can span multiple months, depending on account plan limits.
- โฑ๏ธ Large exports may take a few seconds to generate โ consider background processing for high-volume requests.
Example Use Cases
- ๐ Generate weekly or monthly QR scan reports
- ๐งพ Export data for BI tools such as Power BI or Tableau
- ๐ Analyze trends by device, OS, or location in Excel
- ๐ Audit campaign performance across multiple QR codes
Authorizations
Send your Management API key as the raw value of the Authorization header โ no "Bearer " or "Token " prefix, and no other characters. Example: Authorization: 401f7ac837da42b97f613d789819ff93537bee6a. A header containing more than one space-separated part is rejected outright. Requests also require the request's Host header to be the management API host (e.g. management.scanova.io) โ the same key sent to the regular API host will not authenticate.
Query Parameters
csv, xls, xlsx, pdf Body
Response
Binary file download โ application/zip for csv, spreadsheet mimetype for xls/xlsx, application/pdf for pdf.
Was this page helpful?