API Cód QR
Foramharc
Is í an Codes-API croílár qr3.app. Leis seo, is féidir leat cóid QR dhinimiciúla agus statacha a chruthú, a thabhairt cothrom le dáta agus a scriosadh.
Bun-URL: https://qr3.app/v1/codes
Cód QR a Chruthú
POST /v1/codes
curl -X POST https://qr3.app/v1/codes \ -H "Authorization: Bearer qr3_sk_..." \ -H "Content-Type: application/json" \ -d '{ "type": "url", "url": "https://example.com", "title": "Mein erster QR-Code", "tags": ["marketing", "q1"], "is_dynamic": true }'const code = await qr3.codes.create({ type: 'url', url: 'https://example.com', title: 'Mein erster QR-Code', tags: ['marketing', 'q1'], is_dynamic: true,});qr3 create https://example.com --title "Mein QR-Code" --tags marketing,q1Freagra (HTTP 201):
{ "data": { "id": "qr_a1b2c3d4", "short_code": "r7f3Kx", "redirect_url": "https://qr3.app/r7f3Kx", "image_svg_url": "https://qr3.app/v1/codes/r7f3Kx/qr.svg", "image_png_url": "https://qr3.app/v1/codes/r7f3Kx/qr.png", "image_pdf_url": "https://qr3.app/v1/codes/r7f3Kx/qr.pdf", "image_eps_url": "https://qr3.app/v1/codes/r7f3Kx/qr.eps", "type": "url", "target_url": "https://example.com", "is_dynamic": true, "status": "live", "tags": ["marketing", "q1"], "total_scans": 0, "created_at": "2026-03-15T10:00:00.000Z" }, "meta": { "request_id": "req_xyz123" }}Cineálacha Cód QR
| Cineál | Cur síos | Réimsí éigeantacha |
|---|---|---|
url | URL suímh ghréasáin (dinimiciúil nó statach) | url |
vcard | Cárta gnó (vCard 3.0) | vcard_first_name nó vcard_last_name |
wifi | Cumraíocht Wi-Fi | wifi_ssid |
email | Ríomhphost (mailto:) | email_to |
sms | SMS | sms_phone |
location | Suíomh (geo:) | location_lat, location_lng |
Tástáil A/B
Déan tástáil ar dhá sprioc-URL éagsúla le ródú ualaithe:
{ "type": "url", "url": "https://version-a.example.com", "ab_enabled": true, "ab_target_url_b": "https://version-b.example.com", "ab_weight_a": 50}Éag (Expiry)
Is féidir le cóid QR dul in éag go huathoibríoch:
{ "type": "url", "url": "https://aktionsseite.example.com", "expires_at": "2026-12-31T23:59:59Z", "redirect_after_expiry": "https://archiv.example.com"}Tar éis dóibh dul in éag, déanfar ródú chuig redirect_after_expiry nó taispeánfar leathanach 410.
Baisc-chruthú
POST /v1/codes/batch
Cruthaíonn sé seo suas le 1,000 cód QR in aon iarratas amháin. Ideal do ríomhphróiseáil mhaise.
curl -X POST https://qr3.app/v1/codes/batch \ -H "Authorization: Bearer qr3_sk_..." \ -H "Content-Type: application/json" \ -d '{ "items": [ { "type": "url", "url": "https://produkt-1.example.com", "tags": ["batch"] }, { "type": "url", "url": "https://produkt-2.example.com", "tags": ["batch"] }, { "type": "wifi", "wifi_ssid": "GastWLAN", "wifi_password": "geheim123" } ], "skip_url_scan": false }'Freagra (HTTP 201):
{ "data": { "created": [ { "id": "qr_...", "short_code": "abc123", "redirect_url": "https://qr3.app/abc123" }, { "id": "qr_...", "short_code": "def456", "redirect_url": "https://qr3.app/def456" }, { "id": "qr_...", "short_code": "ghi789", "status": "live" } ], "total": 3, "failed": 0 }}Liosta Cód QR
GET /v1/codes
curl https://qr3.app/v1/codes?status=live&limit=20 \ -H "Authorization: Bearer qr3_sk_..."Paraiméadair Query:
| Paraiméadar | Cineál | Réamhshocrú | Cur síos |
|---|---|---|---|
cursor | string | — | Cúrsóir le haghaidh leathanachúcháin |
limit | integer | 20 | Torthaí in aghaidh an leathanaigh (uas. 100) |
status | string | — | Scagaire: live, paused, flagged, draft |
Cód QR a Fháil
GET /v1/codes/:id
curl https://qr3.app/v1/codes/qr_a1b2c3d4 \ -H "Authorization: Bearer qr3_sk_..."Cód QR a Nuashonrú
PATCH /v1/codes/:id
Ligeann cóid QR dhinimiciúla duit an sprioc-URL a athrú ag am ar bith — gan gá an cód QR a athphriontáil.
curl -X PATCH https://qr3.app/v1/codes/qr_a1b2c3d4 \ -H "Authorization: Bearer qr3_sk_..." \ -H "Content-Type: application/json" \ -d '{ "url": "https://neue-zielseite.example.com", "status": "live" }'Leathanach Tuirlingthe & Naisc Sheachtracha
I gcás cóid url dhinimiciúla, is féidir leat is_landing_page: true a shocrú (le linn cruthaithe nó trí PATCH). Taispeánfaidh scanadh ansin leathanach arna óstáil ag qr3 ina bhfuil comhaid phoiblí agus naisc sheachtracha an chóid, in ionad ródú ar aghaidh. Seoltar naisc sheachtracha mar eagar links:
{ "is_landing_page": true, "links": [ { "label": "Datenblatt", "url": "https://example.com/datenblatt.pdf" }, { "label": "Zertifikat", "url": "https://example.com/zertifikat.pdf" } ]}- 0–20 nasc in aghaidh an chóid; tá
labelidir 1–100 carachtar; caithfidhurla bheith marhttp(s)(≤ 2048 carachtar). - Déantar gach URL a sheiceáil le Google Web Risk — seolann URL neamhshábháilte
422ar ais. - Mura bhfuil Web Risk inrochtana le linn sábhála, glacfar leis an nasc mar sin féin, ach marcálfar é le haghaidh athsheiceála. Déanann post laethúil athsheiceáil ar naisc shábháilte (agus déanann sé athsheiceáil rialta ar naisc a rangaíodh mar ghlan) agus cuireann sé an cód ar sos go huathoibríoch má aimsítear go bhfuil nasc neamhshábháilte níos déanaí.
"links": []scriosann gach nasc. Féach ar an treoir leathanach tuirlingthe.
Cód QR a Scriosadh
DELETE /v1/codes/:id
Scriosadh bog (Soft-Delete) — déantar an cód QR a chartlannú, coinnítear sonraí scanadh.
curl -X DELETE https://qr3.app/v1/codes/qr_a1b2c3d4 \ -H "Authorization: Bearer qr3_sk_..."Íomhánna QR a Íoslódáil
Tá gach formáid íomhá inrochtana go poiblí — níl aon fhíordheimhniú ag teastáil.
| Formáid | URL | Úsáid |
|---|---|---|
| SVG (Veicteoir) | /v1/codes/:code/qr.svg | Gréasán, Scálú, Digiteach |
| PNG (Rastar) | /v1/codes/:code/qr.png | Ríomhphost, Cur i láthair |
| PDF (Veicteoir) | /v1/codes/:code/qr.pdf | Réamhshocrú: cearnach (an cód amháin); ?format=a4 le haghaidh bileog priontála |
| EPS (Veicteoir) | /v1/codes/:code/qr.eps | Sreafaí oibre priontála gairmiúla (Adobe, clódóirí) |
Roghnach: ?size=N — Méid an mhodúil i bpicteilíní (2–20, Réamhshocrú: 4) do SVG, PNG agus EPS. Úsáideann an PDF méid modúil seasta.
PDF Amháin: ?format=a4|square — Formáid leathanaigh (Réamhshocrú: square — cód + Quiet Zone amháin, gan spás bán A4; a4 le haghaidh bileog A4 réidh le priontáil)
# SVG für Webcurl https://qr3.app/v1/codes/r7f3Kx/qr.svg
# PNG in hoher Auflösungcurl https://qr3.app/v1/codes/r7f3Kx/qr.png?size=10 -o qr-hires.png
# Kompaktes PDF (nur der Code, Standard)curl https://qr3.app/v1/codes/r7f3Kx/qr.pdf -o qr.pdf
# Druckfertiges A4-Blattcurl "https://qr3.app/v1/codes/r7f3Kx/qr.pdf?format=a4" -o qr-a4.pdfTráchtanna
Cumasaíonn tráchtanna lúba aiseolais idir gníomhaireachtaí agus cliaint.
GET /v1/codes/:id/comments
POST /v1/codes/:id/comments
PATCH /v1/codes/:id/comments/:commentId
DELETE /v1/codes/:id/comments/:commentId
# Kommentar hinzufügencurl -X POST https://qr3.app/v1/codes/qr_a1b2c3d4/comments \ -H "Authorization: Bearer qr3_sk_..." \ -H "Content-Type: application/json" \ -d '{ "body": "QR-Code bitte auf grünen Hintergrund abstimmen.", "author_name": "Max Müller" }'
# Offene Kommentare auflistencurl "https://qr3.app/v1/codes/qr_a1b2c3d4/comments?resolved=false" \ -H "Authorization: Bearer qr3_sk_..."
# Kommentar als erledigt markierencurl -X PATCH https://qr3.app/v1/codes/qr_a1b2c3d4/comments/cmt_xyz \ -H "Authorization: Bearer qr3_sk_..." \ -H "Content-Type: application/json" \ -d '{ "resolved": true }'