Get QR Code
curl --request GET \
--url https://jmpy.me/api/v1/qr-codes/{id} \
--header 'Authorization: Bearer <token>'{
"success": true,
"data": {
"qrCode": {
"id": "<string>",
"user_id": "<string>",
"name": "<string>",
"content_type": "<string>",
"content_data": {},
"visual_settings": {},
"is_dynamic": true,
"tracking_enabled": true,
"short_url_id": "<string>",
"scan_count": 123,
"last_scanned_at": "<string>",
"expires_at": "<string>",
"is_password_protected": true,
"source": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
}
}QR Codes
Get QR Code
Retrieve a specific QR code by ID
GET
/
qr-codes
/
{id}
Get QR Code
curl --request GET \
--url https://jmpy.me/api/v1/qr-codes/{id} \
--header 'Authorization: Bearer <token>'{
"success": true,
"data": {
"qrCode": {
"id": "<string>",
"user_id": "<string>",
"name": "<string>",
"content_type": "<string>",
"content_data": {},
"visual_settings": {},
"is_dynamic": true,
"tracking_enabled": true,
"short_url_id": "<string>",
"scan_count": 123,
"last_scanned_at": "<string>",
"expires_at": "<string>",
"is_password_protected": true,
"source": "<string>",
"created_at": "<string>",
"updated_at": "<string>"
}
}
}Get detailed information about a specific QR code including its content data, visual settings, and scan statistics.
Path Parameters
The UUID of the QR code to retrieve.
Temporary QR codes (IDs starting with
temp-) cannot be retrieved. Only saved QR codes from authenticated users can be accessed.Response
Whether the request was successful.
Response containing the QR code object.
Show QR Code Object
Show QR Code Object
The QR code details.
Show QR Code Properties
Show QR Code Properties
Unique identifier (UUID).
ID of the owner user.
Friendly name for the QR code.
Type of encoded content:
url, text, wifi, vcard, email, phone, sms, location.The original content data used to generate the QR code.
Visual customization settings including colors, size, and margin.
Whether this is a dynamic QR code (destination can be changed).
Whether scan analytics is enabled for this QR code.
Associated short URL ID (if dynamic or tracking enabled). Use with Short URL endpoints.
Total number of scans recorded.
ISO 8601 timestamp of the last scan.
Expiration timestamp (if set).
Whether the QR code requires a password.
Creation source:
QR_CODE_GENERATOR, BULK_IMPORT, etc.ISO 8601 creation timestamp.
ISO 8601 last update timestamp.
Request Examples
- cURL
- Node.js
- TypeScript
- Python
- PHP
- Go
- Java
curl -X GET "https://jmpy.me/api/v1/qr-codes/770e8400-e29b-41d4-a716-446655440000" \
-H "Authorization: Bearer YOUR_API_KEY"
const fetch = require('node-fetch');
const qrCodeId = '770e8400-e29b-41d4-a716-446655440000';
const response = await fetch(
`https://jmpy.me/api/v1/qr-codes/${qrCodeId}`,
{ headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
const data = await response.json();
if (data.success) {
const qrCode = data.data.qrCode;
console.log('QR Code Name:', qrCode.name);
console.log('Content Type:', qrCode.content_type);
console.log('Scans:', qrCode.scan_count);
}
import axios from 'axios';
interface QRCodeResponse {
success: boolean;
data: {
qrCode: {
id: string;
name: string;
content_type: string;
content_data: Record<string, any>;
is_dynamic: boolean;
tracking_enabled: boolean;
scan_count: number;
visual_settings: Record<string, any>;
created_at: string;
updated_at: string;
};
};
}
const qrCodeId = '770e8400-e29b-41d4-a716-446655440000';
const response = await axios.get<QRCodeResponse>(
`https://jmpy.me/api/v1/qr-codes/${qrCodeId}`,
{ headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
console.log('QR Code:', response.data.data.qrCode);
import requests
qr_code_id = '770e8400-e29b-41d4-a716-446655440000'
response = requests.get(
f'https://jmpy.me/api/v1/qr-codes/{qr_code_id}',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
if data['success']:
qr_code = data['data']['qrCode']
print(f"Name: {qr_code['name']}")
print(f"Type: {qr_code['content_type']}")
print(f"Scans: {qr_code.get('scan_count', 0)}")
print(f"Is Dynamic: {qr_code['is_dynamic']}")
<?php
$client = new GuzzleHttp\Client();
$qrCodeId = '770e8400-e29b-41d4-a716-446655440000';
$response = $client->request('GET', "https://jmpy.me/api/v1/qr-codes/{$qrCodeId}", [
'headers' => [
'Authorization' => 'Bearer YOUR_API_KEY'
]
]);
$data = json_decode($response->getBody(), true);
$qrCode = $data['data']['qrCode'];
echo "Name: " . $qrCode['name'] . "\n";
echo "Scans: " . $qrCode['scan_count'] . "\n";
?>
package main
import (
"fmt"
"net/http"
)
func main() {
qrCodeId := "770e8400-e29b-41d4-a716-446655440000"
url := fmt.Sprintf("https://jmpy.me/api/v1/qr-codes/%s", qrCodeId)
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer YOUR_API_KEY")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
fmt.Println("Response status:", resp.Status)
}
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.URI;
import java.net.http.HttpResponse;
String qrCodeId = "770e8400-e29b-41d4-a716-446655440000";
String url = "https://jmpy.me/api/v1/qr-codes/" + 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 Success
- 404 Not Found
- 400 Invalid ID
- 403 Access Denied
- 410 Expired
{
"success": true,
"data": {
"qrCode": {
"id": "770e8400-e29b-41d4-a716-446655440000",
"user_id": "user-uuid-here",
"name": "Product Launch QR",
"content_type": "url",
"content_data": {
"url": "https://example.com/product"
},
"visual_settings": {
"foregroundColor": "#1a1a1a",
"backgroundColor": "#ffffff",
"size": 400,
"errorCorrectionLevel": "H"
},
"is_dynamic": true,
"tracking_enabled": true,
"short_url_id": "550e8400-e29b-41d4-a716-446655440000",
"scan_count": 523,
"last_scanned_at": "2024-01-20T14:22:00.000Z",
"expires_at": null,
"is_password_protected": false,
"source": "QR_CODE_GENERATOR",
"created_at": "2024-01-15T10:30:00.000Z",
"updated_at": "2024-01-20T14:22:00.000Z"
}
}
}
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "QR code not found"
}
}
{
"success": false,
"error": {
"code": "INVALID_INPUT",
"message": "Invalid QR code ID format. Please provide a valid UUID."
}
}
{
"success": false,
"error": {
"code": "ACCESS_DENIED",
"message": "You do not have permission to access this resource"
}
}
{
"success": false,
"error": {
"code": "RESOURCE_EXPIRED",
"message": "QR code has expired"
}
}
Use Cases
Check QR code status before updating
Check QR code status before updating
Retrieve QR code details to check if itβs dynamic before attempting an update.
async function safeUpdateQRCode(qrCodeId, newUrl) {
// First, get the QR code details
const response = await fetch(
`https://jmpy.me/api/v1/qr-codes/${qrCodeId}`,
{ headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
);
const data = await response.json();
if (!data.success) {
throw new Error(data.error.message);
}
const qrCode = data.data.qrCode;
if (!qrCode.is_dynamic) {
throw new Error('Cannot update static QR codes. Create a new one instead.');
}
// Proceed with update...
// See Update QR Code endpoint
}
Display QR code with scan statistics
Display QR code with scan statistics
Retrieve a QR code and display its performance metrics.
import requests
from datetime import datetime
def get_qr_code_stats(qr_code_id):
response = requests.get(
f'https://jmpy.me/api/v1/qr-codes/{qr_code_id}',
headers={'Authorization': 'Bearer YOUR_API_KEY'}
)
data = response.json()
if data['success']:
qr = data['data']['qrCode']
print(f"π QR Code: {qr['name']}")
print(f" Type: {'Dynamic' if qr['is_dynamic'] else 'Static'}")
print(f" Total Scans: {qr.get('scan_count', 0)}")
if qr.get('last_scanned_at'):
last_scan = datetime.fromisoformat(qr['last_scanned_at'].replace('Z', '+00:00'))
print(f" Last Scanned: {last_scan.strftime('%Y-%m-%d %H:%M')}")
if qr.get('expires_at'):
print(f" Expires: {qr['expires_at']}")
return qr
else:
print(f"Error: {data['error']['message']}")
return None
Related Endpoints
List QR Codes
View all your QR codes
Update QR Code
Update QR code properties
Delete QR Code
Delete a QR code
QR Analytics
View detailed scan analytics
βI