GET
https://jmpy.me/api/v1
/
qr-codes
List QR Codes
curl --request GET \
  --url https://jmpy.me/api/v1/qr-codes \
  --header 'Authorization: Bearer <token>'
{
  "success": true,
  "data": {
    "qrCodes": [
      {
        "id": "<string>",
        "name": "<string>",
        "content": "<string>",
        "content_type": "<string>",
        "content_data": {},
        "dataURL": "<string>",
        "is_dynamic": true,
        "tracking_enabled": true,
        "scan_count": 123,
        "short_url_id": "<string>",
        "visual_settings": {},
        "expires_at": "<string>",
        "created_at": "<string>",
        "updated_at": "<string>"
      }
    ],
    "pagination": {
      "page": 123,
      "limit": 123,
      "totalCount": 123,
      "totalPages": 123,
      "hasNext": true,
      "hasPrev": true
    }
  }
}
Get a list of all QR codes created by the authenticated user with filtering, sorting, and pagination options.
This endpoint returns QR codes with regenerated dataURL for each item, allowing immediate use/display of the QR code images.

Query Parameters

page
integer
default:1
Page number for pagination.
limit
integer
default:50
Items per page. Maximum: 100.
source
string
Filter by creation source.Options: QR_CODE_GENERATOR, BULK_IMPORT, URL_SHORTENER
qrType
string
default:"all"
Filter by QR code type.Options: static, dynamic, tracked, all
Search term to filter by name or content.
dateRange
string
default:"all_time"
Filter by creation date range.Options: last_hour, last_24_hours, last_7_days, last_30_days, last_year, all_time
sortBy
string
default:"created_at"
Field to sort by.Options: name, scans, created_at
sortOrder
string
default:"desc"
Sort order: asc or desc.

Response

success
boolean
Whether the request was successful.
data
object
Response data containing QR codes and pagination.

Request Examples

# Basic list request
curl -X GET "https://jmpy.me/api/v1/qr-codes?page=1&limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"

# With filters
curl -X GET "https://jmpy.me/api/v1/qr-codes?qrType=dynamic&dateRange=last_7_days&sortBy=scans&sortOrder=desc" \
  -H "Authorization: Bearer YOUR_API_KEY"

# Search by name
curl -X GET "https://jmpy.me/api/v1/qr-codes?search=product&limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Examples

{
  "success": true,
  "data": {
    "qrCodes": [
      {
        "id": "770e8400-e29b-41d4-a716-446655440000",
        "name": "Product Launch QR",
        "content": "https://jmpy.me/xyz789",
        "content_type": "url",
        "content_data": {
          "url": "https://example.com/product"
        },
        "dataURL": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...",
        "is_dynamic": true,
        "tracking_enabled": true,
        "scan_count": 523,
        "short_url_id": "550e8400-e29b-41d4-a716-446655440000",
        "visual_settings": {
          "foregroundColor": "#1a1a1a",
          "backgroundColor": "#ffffff",
          "size": 400
        },
        "expires_at": null,
        "created_at": "2024-01-15T10:30:00.000Z",
        "updated_at": "2024-01-20T14:22:00.000Z"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 20,
      "totalCount": 15,
      "totalPages": 1,
      "hasNext": false,
      "hasPrev": false
    }
  }
}

Use Cases

Iterate through all QR codes using pagination.
async function getAllQRCodes() {
  let allQRCodes = [];
  let page = 1;
  let hasMore = true;

  while (hasMore) {
    const response = await fetch(
      `https://jmpy.me/api/v1/qr-codes?page=${page}&limit=100`,
      { headers: { 'Authorization': 'Bearer YOUR_API_KEY' } }
    );
    const data = await response.json();
    
    allQRCodes = allQRCodes.concat(data.data.qrCodes);
    hasMore = data.data.pagination.hasNext;
    page++;
  }

  return allQRCodes;
}
Get QR codes sorted by scan count.
response = requests.get(
    'https://jmpy.me/api/v1/qr-codes',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    params={
        'sortBy': 'scans',
        'sortOrder': 'desc',
        'limit': 10
    }
)

top_qrs = response.json()['data']['qrCodes']
for qr in top_qrs:
    print(f"{qr['name']}: {qr.get('scan_count', 0)} scans")
Find QR codes by name or content.
curl -X GET "https://jmpy.me/api/v1/qr-codes?search=marketing&qrType=dynamic" \
  -H "Authorization: Bearer YOUR_API_KEY"