Complete QR Analytics
curl --request GET \
--url https://jmpy.me/api/v1/qranalytics/:qrCodeId/complete \
--header 'Authorization: Bearer <token>'{
"qrCode": {
"id": "<string>",
"name": "<string>",
"contentType": "<string>",
"totalScans": 123,
"lastScannedAt": "<string>",
"createdAt": "<string>",
"trackingEnabled": true
},
"timeline": [
{
"date": "<string>",
"scans": 123,
"uniqueScanners": 123
}
],
"devices": [
{
"type": "<string>",
"scans": 123
}
],
"locations": [
{
"country": "<string>",
"scans": 123
}
],
"recentScans": [
{
"scannedAt": "<string>",
"deviceType": "<string>",
"browser": "<string>",
"country": "<string>",
"city": "<string>"
}
]
}QR Code Analytics
Complete QR Analytics
Get comprehensive analytics for a specific QR code
GET
/
qranalytics
/
:qrCodeId
/
complete
Complete QR Analytics
curl --request GET \
--url https://jmpy.me/api/v1/qranalytics/:qrCodeId/complete \
--header 'Authorization: Bearer <token>'{
"qrCode": {
"id": "<string>",
"name": "<string>",
"contentType": "<string>",
"totalScans": 123,
"lastScannedAt": "<string>",
"createdAt": "<string>",
"trackingEnabled": true
},
"timeline": [
{
"date": "<string>",
"scans": 123,
"uniqueScanners": 123
}
],
"devices": [
{
"type": "<string>",
"scans": 123
}
],
"locations": [
{
"country": "<string>",
"scans": 123
}
],
"recentScans": [
{
"scannedAt": "<string>",
"deviceType": "<string>",
"browser": "<string>",
"country": "<string>",
"city": "<string>"
}
]
}Get comprehensive analytics for a specific QR code including timeline data, device breakdown, location distribution, and recent scan activity all in a single request.
This is the only QR analytics endpoint that requires a QR Code ID path parameter. Use this endpoint when you need detailed analytics for a single QR code rather than user-level aggregates.
Path Parameters
QR Code UUID. You can find this ID by:
- Using the List QR Codes endpoint
- Checking the response when creating a QR code
Query Parameters
Number of days to include in analytics (1-365).
Response
QR code metadata.
Show QR Code Object
Show QR Code Object
QR code UUID.
QR code name.
Content type:
url, text, vcard, wifi, email, sms, phone.Total all-time scans for this QR code.
ISO 8601 timestamp of the most recent scan.
ISO 8601 timestamp when the QR code was created.
Whether scan tracking is enabled.
Request Examples
- cURL
- Node.js
- TypeScript
- Python
- PHP
- Go
- Java
# Get complete analytics for a specific QR code
curl -X GET "https://jmpy.me/api/v1/qranalytics/550e8400-e29b-41d4-a716-446655440000/complete?days=30" \
-H "Authorization: Bearer YOUR_API_KEY"
# Get analytics for last 90 days
curl -X GET "https://jmpy.me/api/v1/qranalytics/550e8400-e29b-41d4-a716-446655440000/complete?days=90" \
-H "Authorization: Bearer YOUR_API_KEY"
const fetch = require('node-fetch');
const qrCodeId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(
`https://jmpy.me/api/v1/qranalytics/${qrCodeId}/complete?days=30`,
{
headers: { 'Authorization': 'Bearer YOUR_API_KEY' }
}
);
const { data } = await response.json();
console.log('QR Code:', data.qrCode.name);
console.log('Total Scans:', data.qrCode.totalScans);
console.log('Timeline Points:', data.timeline.length);
console.log('Top Device:', data.devices[0]?.type);
console.log('Top Country:', data.locations[0]?.country);
import axios from 'axios';
interface CompleteQRAnalytics {
qrCode: {
id: string;
name: string;
contentType: string;
totalScans: number;
lastScannedAt: string | null;
createdAt: string;
trackingEnabled: boolean;
};
timeline: Array<{ date: string; scans: number; uniqueScanners: number }>;
devices: Array<{ type: string; scans: number }>;
locations: Array<{ country: string; scans: number }>;
recentScans: Array<{
scannedAt: string;
deviceType: string;
browser: string;
country: string;
city: string;
}>;
}
const qrCodeId = '550e8400-e29b-41d4-a716-446655440000';
const response = await axios.get<{ success: boolean; data: CompleteQRAnalytics }>(
`https://jmpy.me/api/v1/qranalytics/${qrCodeId}/complete`,
{
headers: { 'Authorization': 'Bearer YOUR_API_KEY' },
params: { days: 30 }
}
);
const analytics = response.data.data;
console.log(`${analytics.qrCode.name}: ${analytics.qrCode.totalScans} total scans`);
import requests
qr_code_id = '550e8400-e29b-41d4-a716-446655440000'
response = requests.get(
f'https://jmpy.me/api/v1/qranalytics/{qr_code_id}/complete',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={'days': 30}
)
data = response.json()['data']
print(f"QR Code: {data['qrCode']['name']}")
print(f"Total Scans: {data['qrCode']['totalScans']}")
print(f"Tracking: {'Enabled' if data['qrCode']['trackingEnabled'] else 'Disabled'}")
print("\nDevice Breakdown:")
for device in data['devices']:
print(f" {device['type']}: {device['scans']} scans")
print("\nTop Countries:")
for location in data['locations'][:5]:
print(f" {location['country']}: {location['scans']} scans")
<?php
$client = new GuzzleHttp\Client();
$qrCodeId = '550e8400-e29b-41d4-a716-446655440000';
$response = $client->request('GET',
"https://jmpy.me/api/v1/qranalytics/{$qrCodeId}/complete", [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY'
],
'query' => [
'days' => 30
]
]);
$data = json_decode($response->getBody(), true)['data'];
echo "QR Code: {$data['qrCode']['name']}\n";
echo "Total Scans: {$data['qrCode']['totalScans']}\n";
echo "\nDevice Breakdown:\n";
foreach ($data['devices'] as $device) {
echo " {$device['type']}: {$device['scans']} scans\n";
}
?>
package main
import (
"fmt"
"net/http"
"net/url"
"io"
)
func main() {
qrCodeId := "550e8400-e29b-41d4-a716-446655440000"
baseURL := fmt.Sprintf(
"https://jmpy.me/api/v1/qranalytics/%s/complete",
qrCodeId,
)
params := url.Values{}
params.Add("days", "30")
req, _ := http.NewRequest("GET", baseURL+"?"+params.Encode(), nil)
req.Header.Add("Authorization", "Bearer YOUR_API_KEY")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.URI;
import java.net.http.HttpResponse;
String qrCodeId = "550e8400-e29b-41d4-a716-446655440000";
String url = String.format(
"https://jmpy.me/api/v1/qranalytics/%s/complete?days=30",
qrCodeId
);
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create(url))
.header("Authorization", "Bearer YOUR_API_KEY")
.GET()
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
Response Examples
- 200 OK
- 404 Not Found
- 403 Access Denied
{
"success": true,
"data": {
"qrCode": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Product Launch Campaign",
"contentType": "url",
"totalScans": 4523,
"lastScannedAt": "2025-01-07T15:30:00Z",
"createdAt": "2024-06-15T10:00:00Z",
"trackingEnabled": true
},
"timeline": [
{ "date": "2025-01-05", "scans": 156, "uniqueScanners": 120 },
{ "date": "2025-01-06", "scans": 189, "uniqueScanners": 145 },
{ "date": "2025-01-07", "scans": 234, "uniqueScanners": 178 }
],
"devices": [
{ "type": "Mobile", "scans": 345 },
{ "type": "Desktop", "scans": 189 },
{ "type": "Tablet", "scans": 45 }
],
"locations": [
{ "country": "United States", "scans": 234 },
{ "country": "United Kingdom", "scans": 156 },
{ "country": "Germany", "scans": 89 }
],
"recentScans": [
{
"scannedAt": "2025-01-07T15:30:00Z",
"deviceType": "Mobile",
"browser": "Safari",
"country": "United States",
"city": "New York"
},
{
"scannedAt": "2025-01-07T15:28:00Z",
"deviceType": "Mobile",
"browser": "Chrome",
"country": "Germany",
"city": "Berlin"
}
]
}
}
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "QR code not found"
}
}
{
"success": false,
"error": {
"code": "ACCESS_DENIED",
"message": "Access denied"
}
}
Use Cases
Build a QR code detail page
Build a QR code detail page
Create a comprehensive analytics view for a single QR code.
async function getQRCodeDetails(qrCodeId) {
const response = await fetch(
`https://jmpy.me/api/v1/qranalytics/${qrCodeId}/complete?days=30`,
{ headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
const { data } = await response.json();
return {
info: {
name: data.qrCode.name,
type: data.qrCode.contentType,
created: new Date(data.qrCode.createdAt).toLocaleDateString()
},
stats: {
totalScans: data.qrCode.totalScans,
lastScan: data.qrCode.lastScannedAt
? new Date(data.qrCode.lastScannedAt).toLocaleString()
: 'Never'
},
chartData: {
labels: data.timeline.map(t => t.date),
scans: data.timeline.map(t => t.scans)
},
devices: data.devices,
locations: data.locations,
activity: data.recentScans
};
}
Generate a performance report
Generate a performance report
Create a printable performance report for a QR code.
import requests
from datetime import datetime
def generate_qr_report(qr_code_id):
response = requests.get(
f'https://jmpy.me/api/v1/qranalytics/{qr_code_id}/complete',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
params={'days': 30}
)
data = response.json()['data']
qr = data['qrCode']
report = f"""
╔══════════════════════════════════════════════════════════════╗
║ QR CODE PERFORMANCE REPORT ║
╠══════════════════════════════════════════════════════════════╣
║ Name: {qr['name'][:50]:<50} ║
║ Type: {qr['contentType']:<50} ║
║ Created: {qr['createdAt'][:10]:<48} ║
╠══════════════════════════════════════════════════════════════╣
║ METRICS (Last 30 Days) ║
║ ───────────────────── ║
║ Total Scans: {qr['totalScans']:<47} ║
║ Daily Average: {sum(t['scans'] for t in data['timeline']) / max(len(data['timeline']), 1):.1f} ║
╠══════════════════════════════════════════════════════════════╣
║ TOP DEVICES ║
║ ─────────── ║"""
for device in data['devices'][:3]:
report += f"\n║ • {device['type']}: {device['scans']} scans"
report += """
╠══════════════════════════════════════════════════════════════╣
║ TOP COUNTRIES ║
║ ───────────── ║"""
for loc in data['locations'][:3]:
report += f"\n║ • {loc['country']}: {loc['scans']} scans"
report += "\n╚══════════════════════════════════════════════════════════════╝"
return report
print(generate_qr_report('550e8400-e29b-41d4-a716-446655440000'))
Compare multiple QR codes
Compare multiple QR codes
Fetch analytics for multiple QR codes and compare performance.
async function compareQRCodes(qrCodeIds: string[]) {
const results = await Promise.all(
qrCodeIds.map(async id => {
const response = await fetch(
`https://jmpy.me/api/v1/qranalytics/${id}/complete?days=30`,
{ headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
return response.json();
})
);
// Sort by total scans
const comparison = results
.map(r => r.data)
.sort((a, b) => b.qrCode.totalScans - a.qrCode.totalScans);
console.log('QR Code Comparison (by total scans):');
comparison.forEach((qr, i) => {
const recentTotal = qr.timeline.reduce((sum, t) => sum + t.scans, 0);
console.log(`${i + 1}. ${qr.qrCode.name}`);
console.log(` Total: ${qr.qrCode.totalScans} | Recent: ${recentTotal}`);
});
return comparison;
}
Related Endpoints
Analytics Overview
Get aggregated stats across all QR codes
Top Performing
Find your best performing QR codes
Get QR Code
Get QR code details and configuration
List QR Codes
Get a list of all your QR codes
⌘I