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.paramName | apiPage.paramType | apiPage.paramRequired | apiPage.paramDescription |
|---|---|---|---|
| text | string | apiPage.yes | apiPage.paramTextDesc |
| size | integer | apiPage.no | apiPage.paramSizeDesc |
| format | string | apiPage.no | apiPage.paramFormatDesc |
| margin | integer | apiPage.no | apiPage.paramMarginDesc |
| ecl | string | apiPage.no | apiPage.paramEclDesc |
| returnUrl | boolean | apiPage.no | apiPage.paramReturnUrlDesc |
apiPage.requestBody
Content-Type: application/json
{
"text": "TICKET-123",
"size": 256,
"format": "png",
"margin": 2,
"ecl": "M",
"returnUrl": false
}apiPage.responses
| apiPage.code | apiPage.paramDescription |
|---|---|
| 200 | apiPage.response200Generate |
| 400 | apiPage.response400Generate |
| 503 | apiPage.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.generateQrNote uses.eventTicketingTitle apiPage.generateQrNoteAnd nav.docs apiPage.generateQrNoteEnd
apiPage.intro
apiPage.endpointLabel POST /api/parse-code
apiPage.parametersRequestBody
| apiPage.paramName | apiPage.paramType | apiPage.paramRequired | apiPage.paramDescription |
|---|---|---|---|
| image | string | No* | apiPage.paramImageDesc |
| imageUrl | string | No* | apiPage.paramImageUrlDesc |
| input | string | No* | apiPage.paramInputDesc |
| formats | string[] | apiPage.no | apiPage.paramFormatsDesc |
| tryHarder | boolean | apiPage.no | apiPage.paramTryHarderDesc |
| aggressive | boolean | apiPage.no | apiPage.paramAggressiveDesc |
| scanMultiple | boolean | apiPage.no | apiPage.paramScanMultipleDesc |
| debug | boolean | apiPage.no | apiPage.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.code | apiPage.paramDescription |
|---|---|
| 200 | apiPage.response200Decode |
| 400 | apiPage.response400Decode |
| 405 | apiPage.response405Decode |
| 503 | apiPage.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
Detected: Unknown
Options
Advanced Options
|