Skip to main content
POST
/
v1
/
attestations
/
codes
/
batch
curl -X POST \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      "550e8400-e29b-41d4-a716-446655440000",
      "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
    ],
    "type": "both",
    "size": 512
  }' \
  "https://api.truthlocks.com/v1/attestations/codes/batch" \
  --output verification-codes.zip

Documentation Index

Fetch the complete documentation index at: https://docs.truthlocks.com/llms.txt

Use this file to discover all available pages before exploring further.

Generate QR codes and/or barcodes for multiple attestations at once. Returns a ZIP file containing all requested code images.

Use cases

  • Bulk certificate printing with QR codes
  • Generating labels for an entire product batch
  • Exporting verification codes for offline distribution

Request body

ids
string[]
required
Array of attestation UUIDs. Maximum 100 per request.
type
string
default:"qr"
Type of codes to generate. Options: qr, barcode, both
size
integer
default:"256"
Size for QR codes in pixels (128 to 1024). Barcodes use default 300x80.

Response

Returns a ZIP file (Content-Type: application/zip) containing PNG images named:
  • {attestation_id}-qr.png for QR codes
  • {attestation_id}-barcode.png for barcodes

Rate limits

Batch requests are rate-limited to 10 requests per minute. Each request can contain up to 100 attestation IDs.
curl -X POST \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ids": [
      "550e8400-e29b-41d4-a716-446655440000",
      "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
    ],
    "type": "both",
    "size": 512
  }' \
  "https://api.truthlocks.com/v1/attestations/codes/batch" \
  --output verification-codes.zip