เริ่มต้นอย่างรวดเร็ว
QR Cake API ช่วยให้ผู้ใช้ QR Cake จัดการ QR Code ในบัญชีของตนได้
การยืนยันตัวตน
สร้างคีย์ API ในแดชบอร์ดของคุณ แล้วส่งคีย์นั้นในส่วนหัว x-api-key
x-api-key: <API Key> Content-Type: application/json
จัดการคีย์ API ได้ที่ คีย์ API ในแดชบอร์ด.
ตัวทดสอบคำขอ API
ทดสอบเอนด์พอยต์ได้จากหน้านี้โดยตรง ป้อนคีย์ API เลือกเอนด์พอยต์ และดูผลลัพธ์ที่ตอบกลับมาแบบเรียลไทม์
ตัวทดสอบ API แบบโต้ตอบ
ส่งคำขอจากเบราว์เซอร์ของคุณไปยังเอนด์พอยต์ QR Cake API ที่เลือกได้โดยตรง
x-api-key: YOUR_API_KEYhttps://api.qrcake.com/v1/product/api/product
คำศัพท์
Products
QR Code
Users
บัญชี 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),
});รายการ QR Code
แสดงรายการ QR Code ที่คีย์ API นี้เข้าถึงได้
x-api-key: <API Key>Accept: application/json
[
{
"accountId": "string",
"productId": "string",
"userId": "string",
"redirect": "string",
"state": "ACTIVE",
"metadata": {},
"createdAt": 0,
"updatedAt": 0
}
]{
"message": {}
}Products = QR Codes (สินค้า = QR Code)
ดึงข้อมูล QR Code
ดึงข้อมูล QR Code หนึ่งรายการ
- productId (string)
x-api-key: <API Key>Accept: application/json
{
"accountId": "string",
"productId": "string",
"userId": "string",
"redirect": "string",
"state": "ACTIVE",
"metadata": {},
"createdAt": 0,
"updatedAt": 0
}{
"message": {}
}สร้าง QR Code
สร้างผลิตภัณฑ์ QR Code ใหม่
x-api-key: <API Key>Content-Type: application/jsonAccept: application/json
{
"redirect": "https://example.com",
"metadata": {},
"state": "ACTIVE"
}{
"accountId": "string",
"productId": "string",
"userId": "string",
"redirect": "string",
"state": "ACTIVE",
"metadata": {},
"createdAt": 0,
"updatedAt": 0
}{
"message": {}
}เนื้อหาคำขอแบบ POST ต้องถูกแปลงเป็นสตริง (เช่น JSON.stringify(payload))
อัปเดต QR Code
อัปเดต QR Code ที่มีอยู่ (ผลิตภัณฑ์)
- productId (string)
x-api-key: <API Key>Content-Type: application/jsonAccept: application/json
{
"redirect": "https://example.com",
"metadata": {},
"state": "ACTIVE"
}{
"accountId": "string",
"productId": "string",
"userId": "string",
"redirect": "string",
"state": "ACTIVE",
"metadata": {},
"expiresAt": 0,
"createdAt": 0,
"updatedAt": 0
}{
"message": {}
}เนื้อหาคำขอแบบ PUT ต้องถูกแปลงเป็นสตริง
ลบ QR Code
ลบ QR Code หนึ่งรายการ
- productId (string)
x-api-key: <API Key>Accept: application/json
{
"productId": "string"
}{
"message": {}
}สิทธิ์
ส่งกลับสิทธิ์ที่ได้รับให้กับคีย์ API
x-api-key: <API Key>Accept: application/json
{
"success": true,
"result": {
"tier": "subscriber",
"active": true,
"analytics": true,
"productLimit": 100,
"productTotal": 3,
"productActiveLimit": 100,
"productActiveTotal": 3
}
}{
"message": {}
}ประเภท QR ที่รองรับ
ใช้ประเภทเมตาดาต้าเหล่านี้เมื่อสร้างหรืออัปเดตผลิตภัณฑ์ QR
redirect, link, image, video, file, pdf, audio, app, event, vCard, review
เริ่มต้นจาก QR Code แบบไดนามิก และ QR Code ที่เปลี่ยนแปลงได้ บนหน้าแรกของเรา