بداية سريعة
تتيح واجهة QR Cake البرمجية لمستخدمي QR Cake إدارة رموز QR الموجودة في حساباتهم.
المصادقة
أنشئ مفتاح API من لوحة التحكم وأرسله في ترويسة x-api-key.
x-api-key: <API Key> Content-Type: application/json
أدر مفاتيح API من مفاتيح API في لوحة التحكم.
أداة اختبار طلبات API
اختبر نقاط النهاية مباشرة من هذه الصفحة. أدخل مفتاح API واختر نقطة نهاية ثم افحص الاستجابة الحية.
أداة اختبار API تفاعلية
شغّل الطلبات مباشرة من متصفحك إلى نقطة نهاية API المحددة في QR Cake.
x-api-key: YOUR_API_KEYhttps://api.qrcake.com/v1/product/api/product
المصطلحات
Products
رموز QR
Users
حسابات QR Cake
جسم الطلب (POST/PUT)
في طلبات POST وPUT يجب تحويل جسم الطلب إلى نص. وإذا كنت ترسل JSON فمرّره كسلسلة نصية (على سبيل المثال JSON.stringify(payload)).
const payload = { redirect: "https://example.com", metadata: {} };
await fetch(url, {
method: "POST",
body: JSON.stringify(payload),
});عرض قائمة رموز QR
يعرض رموز QR المتاحة لمفتاح 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.
جلب رمز QR
يجلب رمز QR واحدًا.
- 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
ينشئ منتج رمز QR جديدًا.
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
يحدّث رمز QR موجودًا (منتجًا).
- 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
يحذف رمز QR.
- 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
ابدأ من رموز QR الديناميكية ورموز QR القابلة للتغيير على صفحتنا الرئيسية.