GET
https://jmpy.me/api/v1
/
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

id
string
required
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

success
boolean
Whether the request was successful.
data
object
Response containing the QR code object.

Request Examples

curl -X GET "https://jmpy.me/api/v1/qr-codes/770e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Examples

{
  "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"
    }
  }
}

Use Cases

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
}
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