クイックスタート
QR Cake APIを使うと、アカウント内のQRコードをプログラムから管理できます。
ベースURL
https://api.qrcake.com/v1/product
認証
ダッシュボードでAPIキーを作成し、Authorizationヘッダーに含めて送信してください。
Authorization: Bearer <API Key> Content-Type: application/json
APIキーの管理は以下から行えます: ダッシュボードのAPIキー.
APIリクエストテスター
このページから直接エンドポイントを試せます。APIキーを入力し、エンドポイントを選んで、レスポンスをその場でご確認ください。
インタラクティブAPIテスター
ブラウザから、選択したQR Cake APIエンドポイントへリクエストを直接実行します。
Authorization: Bearer YOUR_API_KEY実行されるURL
https://api.qrcake.com/v1/product/user/product
リクエストを実行すると、ステータスとレスポンス内容がここに表示されます。
用語
製品
QRコード
ユーザー
QR Cakeのアカウント
リクエストボディ(POST/PUT)
POSTおよびPUTリクエストでは、リクエストボディを文字列化する必要があります。JSONを送信する場合は、JSON文字列として渡してください(例: JSON.stringify(payload)).
const payload = { redirect: "https://example.com", metadata: {} };
await fetch(url, {
method: "POST",
body: JSON.stringify(payload),
});GET
QRコード一覧の取得
このAPIキーでアクセス可能なQRコードの一覧を取得します。
パス: /user/product
URL: https://api.qrcake.com/v1/product/user/product
リクエストの詳細
ヘッダー
Authorization: Bearer <API Key>Accept: application/json
レスポンス
200 OK
[
{
"accountId": "string",
"productId": "string",
"userId": "string",
"redirect": "string",
"state": "ACTIVE",
"metadata": {},
"createdAt": 0,
"updatedAt": 0
}
]401 Unauthorized
{
"message": {}
}Products は QRコードを意味します。
GET
QRコードの取得
1件のQRコードを取得します。
パス: /product/{productId}
URL: https://api.qrcake.com/v1/product/product/{productId}
リクエストの詳細
パスパラメータ
- productId (string)
ヘッダー
Authorization: Bearer <API Key>Accept: application/json
レスポンス
200 OK
{
"accountId": "string",
"productId": "string",
"userId": "string",
"redirect": "string",
"state": "ACTIVE",
"metadata": {},
"createdAt": 0,
"updatedAt": 0
}401 Unauthorized
{
"message": {}
}POST
QRコードの作成
新しいQRコード(product)を作成します。
パス: /product
URL: https://api.qrcake.com/v1/product/product
リクエストの詳細
ヘッダー
Authorization: Bearer <API Key>Content-Type: application/jsonAccept: application/json
ボディテンプレート
{
"redirect": "https://example.com",
"metadata": {},
"state": "ACTIVE"
}レスポンス
200 OK
{
"accountId": "string",
"productId": "string",
"userId": "string",
"redirect": "string",
"state": "ACTIVE",
"metadata": {},
"createdAt": 0,
"updatedAt": 0
}401 Unauthorized
{
"message": {}
}POSTリクエストのボディは文字列化する必要があります(例:JSON.stringify(payload))。
PUT
QRコードの更新
既存のQRコード(product)を更新します。
パス: /product/{productId}
URL: https://api.qrcake.com/v1/product/product/{productId}
リクエストの詳細
パスパラメータ
- productId (string)
ヘッダー
Authorization: Bearer <API Key>Content-Type: application/jsonAccept: application/json
ボディテンプレート
{
"redirect": "https://example.com",
"metadata": {},
"state": "ACTIVE"
}レスポンス
200 OK
{
"accountId": "string",
"productId": "string",
"userId": "string",
"redirect": "string",
"state": "ACTIVE",
"metadata": {},
"expiresAt": 0,
"createdAt": 0,
"updatedAt": 0
}401 Unauthorized
{
"message": {}
}PUTリクエストのボディは文字列化する必要があります。
DELETE
QRコードの削除
QRコードを削除します。
パス: /product/{productId}
URL: https://api.qrcake.com/v1/product/product/{productId}
リクエストの詳細
パスパラメータ
- productId (string)
ヘッダー
Authorization: Bearer <API Key>Accept: application/json
レスポンス
200 OK
{
"productId": "string"
}401 Unauthorized
{
"message": {}
}GET
権限
このAPIキーに付与されている権限を返します。
パス: /permission
URL: https://api.qrcake.com/v1/product/permission
リクエストの詳細
ヘッダー
Authorization: Bearer <API Key>Accept: application/json
レスポンス
200 OK
{
"success": true,
"result": {
"analytics": true,
"productLimit": 100,
"tier": "subscriber",
"productTotal": 3,
"productActiveLimit": 100,
"productActiveTotal": 3
}
}401 Unauthorized
{
"message": {}
}対応しているQRタイプ
QRコードを作成または更新する際は、以下のメタデータタイプをご利用ください。
redirect, link, image, video, file, pdf, audio, app, event, vCard
まずはトップページの動的QRコードや変更可能なQRコードからお試しください。