common.apiDocs

apiPage.subtitle

Prêt pour l'intégration

Cette API est prête à l'emploi avec les plateformes d'automatisation populaires :

Envoyer un e-mail à Nous contacter

apiPage.generateSubtitle

apiPage.endpointLabel POST /api/generate-qrcode · apiPage.generateGetAlso

apiPage.parametersRequestBody

apiPage.paramNameapiPage.paramTypeapiPage.paramRequiredapiPage.paramDescription
textstringapiPage.yesapiPage.paramTextDesc
sizeintegerapiPage.noapiPage.paramSizeDesc
formatstringapiPage.noapiPage.paramFormatDesc
marginintegerapiPage.noapiPage.paramMarginDesc
eclstringapiPage.noapiPage.paramEclDesc
returnUrlbooleanapiPage.noapiPage.paramReturnUrlDesc

apiPage.requestBody

Content-Type: application/json

{
  "text": "TICKET-123",
  "size": 256,
  "format": "png",
  "margin": 2,
  "ecl": "M",
  "returnUrl": false
}

apiPage.responses

apiPage.codeapiPage.paramDescription
200apiPage.response200Generate
400apiPage.response400Generate
503apiPage.response503Generate

GET /api/generate-qrcode?text=...&size=...&format=... or /api/generate-qrcode/temp/{token} (valid 5 min).

apiPage.example

const res = await $fetch('/api/generate-qrcode', {
  method: 'POST',
  body: {
    text: 'TICKET-123',
    size: 256,
    format: 'png',
    margin: 2,
    ecl: 'M'
  },
  responseType: 'blob'
})
// res is the image blob (PNG or SVG). Use GET with ?text=...&size=... for image URL.

apiPage.generateTryLabel

apiPage.generateEclLabel
QR code for TICKET-123

apiPage.generateQrNote uses.eventTicketingTitle apiPage.generateQrNoteAnd nav.docs apiPage.generateQrNoteEnd

apiPage.intro

apiPage.endpointLabel POST /api/parse-code

apiPage.parametersRequestBody

apiPage.paramNameapiPage.paramTypeapiPage.paramRequiredapiPage.paramDescription
imagestringNo*apiPage.paramImageDesc
imageUrlstringNo*apiPage.paramImageUrlDesc
inputstringNo*apiPage.paramInputDesc
formatsstring[]apiPage.noapiPage.paramFormatsDesc
tryHarderbooleanapiPage.noapiPage.paramTryHarderDesc
aggressivebooleanapiPage.noapiPage.paramAggressiveDesc
scanMultiplebooleanapiPage.noapiPage.paramScanMultipleDesc
debugbooleanapiPage.noapiPage.paramDebugDesc

* Provide one of image, imageUrl, or input.

apiPage.requestBody

Content-Type: application/json

{
  "input": "<your-site>/api/generate-qrcode?text=HelloWorld&size=200",
  "debug": false,
  "tryHarder": false,
  "aggressive": false,
  "assumeGS1": false,
  "assumeCode39CheckDigit": false,
  "formats": ["QR_CODE", "CODE_128"]
}
// or with base64 (auto-detected)
{
  "input": "data:image/png;base64,iVBORw0KGgo..."
}
// or explicitly use imageUrl
{
  "imageUrl": "https://example.com/code.png",
  "debug": false,
  "tryHarder": false,
  "aggressive": false
}
// or explicitly use image (base64)
{
  "image": "iVBORw0KGgo...",
  "debug": false,
  "tryHarder": false,
  "aggressive": false
}

apiPage.responses

apiPage.codeapiPage.paramDescription
200apiPage.response200Decode
400apiPage.response400Decode
405apiPage.response405Decode
503apiPage.response503Decode

apiPage.example

// Example 1: Using input (auto-detect URL or base64). Use our Generate QR API for the image URL.
const res1 = await $fetch('/api/parse-code', {
  method: 'POST',
  body: {
    input: `${window.location.origin}/api/generate-qrcode?text=HelloWorld&size=200`,
    debug: false,
    tryHarder: false,
    aggressive: false,
    formats: ['QR_CODE', 'CODE_128']
  }
})

// Example 2: Using imageUrl explicitly
const res2 = await $fetch('/api/parse-code', {
  method: 'POST',
  body: {
    imageUrl: 'https://example.com/code.png',
    aggressive: true  // Enable aggressive mode for difficult images
  }
})

// Example 3: Using image (base64)
const res3 = await $fetch('/api/parse-code', {
  method: 'POST',
  body: {
    image: 'iVBORw0KGgo...',
    tryHarder: true,
    assumeGS1: true
  }
})

if (res1.ok) console.log(res1.data)

apiPage.tryIt

Demo type:
Format:

Detected: Unknown

Options

Advanced Options

|