APIドキュメント
このページはホームの作成ツールと同じペイロードモデルを使い、https://qrkit.io/api/v1/qr/generateにリクエストを送信して、一連の動作を確認できます。
対応する種類
URLのフィールド
| フィールド | 種類 | 必須 |
|---|---|---|
| url | url | はい |
cURLの例
curl -X POST https://qrkit.io/api/v1/qr/generate \
-H "Content-Type: application/json" \
-d '{"type":"url","payload":{"url":"https://www.example.com"},"design":{"frame":{"enabled":false,"type":"none","text":"","fontFamily":"sans-serif","fontSize":34,"fontWeight":700,"textColor":"#ffffff","backgroundColor":"#000000","qrPadding":24,"paddingX":16,"paddingY":10,"borderRadius":12},"modules":{"shape":"square","color":"#000000","gradient":null},"background":{"color":"#ffffff","transparent":false},"finder":{"style":"square","centerStyle":"square","outerColor":"#000000","innerColor":"#000000","borderColor":"#000000"},"logo":{"enabled":false,"assetId":null,"sizePercent":20,"padding":0,"backgroundColor":"#ffffff","shape":"square","removeBackgroundBehindLogo":true},"quietZone":{"modules":2,"size":16}},"format":"svg","size":512,"errorCorrection":"M"}'生成APIを試す
読み込み中…
対応するデザインJSONのキー
初期設定のデザイン例には、オブジェクトの全体構造が含まれています。以下の一覧で、`design`内の変更可能なキーを確認できます。
| フィールド | 種類 | 例 | 指定できる値 | 変更内容 |
|---|---|---|---|---|
| frame.enabled | boolean | true | - | コードの周囲にCTAフレームを表示します。 |
| frame.type | string | "poster" | banner, outline, bag, clapper, phone, clip, poster, classic, badge, orbit, none | CTAフレームのプリセットを選択します。 |
| frame.text | string | "SCAN ME" | - | フレーム内に表示するCTAラベルです。 |
| frame.fontFamily | string | "Space Grotesk" | - | CTAテキストのフォントです。 |
| frame.fontSize | number | 34 | - | CTAテキストの大きさを設定します。 |
| frame.fontWeight | number | 800 | - | CTAテキストの太さを設定します。 |
| frame.backgroundColor | string | "#0f172a" | - | フレームの塗りつぶし色です。 |
| frame.textColor | string | "#ffffff" | - | CTAテキストの色です。 |
| frame.qrPadding | number | 24 | - | QR本体とフレームの間の余白です。 |
| frame.paddingX | number | 16 | - | CTAフレーム内の左右の余白です。 |
| frame.paddingY | number | 12 | - | CTAフレーム内の上下の余白です。 |
| frame.borderRadius | number | 12 | - | フレームの角の丸みです。 |
| フィールド | 種類 | 例 | 指定できる値 | 変更内容 |
|---|---|---|---|---|
| modules.shape | string | "dots" | square, rounded, dots, morse, diamond, organic, chain | QRモジュールの形を設定します。 |
| modules.color | string | "#111827" | - | モジュールの基本色です。 |
| modules.gradient | object|null | {"from":"#111827","to":"#10b981","direction":"diagonal"} | - | モジュールのグラデーション(任意)です。 |
| modules.gradient.from | string | "#111827" | - | グラデーションの開始色です。 |
| modules.gradient.to | string | "#10b981" | - | グラデーションの終了色です。 |
| modules.gradient.direction | string | "diagonal" | top, bottom, left, right, diagonal | QRモジュールのグラデーションの方向です。 |
| background.color | string | "#ffffff" | - | キャンバスの背景色です。 |
| background.transparent | boolean | false | - | 背景を透明にします。 |
| フィールド | 種類 | 例 | 指定できる値 | 変更内容 |
|---|---|---|---|---|
| finder.style | string | "double-border" | square, rounded, circle, rounded-square, corner-top-left-sharp, corner-mix, sharp-circle-hole, square-hole, double-border | ファインダーの外側の形です。 |
| finder.centerStyle | string | "diamond" | square, rounded, circle, rounded-square, corner-top-left-sharp, corner-mix, star, heart, diamond | ファインダーの中央の形です。 |
| finder.outerColor | string | "#111827" | - | ファインダーの外周の色です。 |
| finder.innerColor | string | "#0ea5e9" | - | ファインダー中央の色です。 |
| finder.borderColor | string | "#111827" | - | ファインダー外枠のアクセントカラーです。 |
| quietZone.size | number | 24 | - | QRの周囲のクワイエットゾーンの余白です。 |
| quietZone.modules | number | 4 | - | モジュール単位の余白設定です。 |
| フィールド | 種類 | 例 | 指定できる値 | 変更内容 |
|---|---|---|---|---|
| logo.enabled | boolean | true | - | ロゴの表示を有効にします。 |
| logo.assetId | string|null | "550e8400-e29b-41d4-a716-446655440000" | - | アップロード済みのロゴをアセットIDで指定します。 |
| logo.sizePercent | number | 18 | - | QR本体に対するロゴのサイズです。 |
| logo.padding | number | 6 | - | ロゴの周囲の追加余白です。 |
| logo.shape | string | "circle" | circle, square | ロゴのマスク形状を選択します。 |
| logo.backgroundColor | string | "#ffffff" | - | ロゴの背面の背景色です。 |
| logo.removeBackgroundBehindLogo | boolean | true | - | ロゴの背面にあるQRモジュールを削除します。 |
| logoDataUrl | string | "data:image/png;base64,..." | - | ロゴを直接描画するためのPNG・JPG・SVGのデータURLです。 |