Overview

X-QRCODE generates and manages QR codes for campaigns, product packaging, and document distribution. Customize size, error correction level, expiration, and retrieve codes in bulk with a simple API.

Quick Start

  1. Obtain your sk- prefixed XAPI private key.
  2. Call POST /x-qrcode with the target URL, desired size, lifetime, and optional error-correction level.
  3. Use GET /x-qrcode to list codes or GET /x-qrcode/{id} for individual details.
  4. Remove expired campaigns with DELETE /x-qrcode/{id}.

Key Capabilities

  • Instant generation: Millisecond PNG output with sizes from 128 to 1024 pixels.
  • Long-term control: Set expirations up to 10 years; cleanup runs automatically after expiry.
  • Flexible redundancy: Support for L/M/Q/H error correction levels to balance density vs. resilience.
  • Bulk operations: Listing endpoints support pagination for managing large code inventories.

API Reference

MethodPathDescription
POST/x-qrcodeCreate a QR code with url, title, size, days, and level
GET/x-qrcodeList all QR codes for the account (pagination supported)
GET/x-qrcode/{id}Retrieve details and Base64 image data for a specific code
DELETE/x-qrcode/{id}Delete a QR code

Example: Generate a Campaign QR Code

export XAPI_KEY="your-xapi-key" # sk- prefixed key

curl -X POST https://api.xabcstack.com/x-qrcode \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $XAPI_KEY" \
  -d '{
      "url": "https://yoursite.com/promo",
      "title": "Limited Offer",
      "size": 512,
      "days": 30,
      "level": "M"
    }'

Use the returned qrcode.image_data directly in <img> tags or export to print assets.

FAQ

  • Output format? PNG delivered as Base64. Convert client-side if you need other formats.
  • Logo overlays? Not built-in yetβ€”combine the Base64 with your graphics pipeline to add branding.
  • Expiration policy? Set via the days parameter; expired records are purged automatically.