Dokumentasi API QR Code Dinamis | QR Cake

    Buat, perbarui, dan kelola kode QR dinamis dengan API QR Cake. Gunakan API key, uji request, dan hubungkan alur kerja QR ke tool yang Anda gunakan.

    REST API JSONPembuatan QR dinamisAutentikasi API key

    Mulai cepat

    API QR Cake memungkinkan pengguna QR Cake mengelola kode QR di akun mereka.

    Base URL
    https://api.qrcake.com/v1/product/api

    Autentikasi

    Buat API key di dasbor Anda, lalu kirimkan lewat header x-api-key.

    x-api-key: <API Key>
    Content-Type: application/json

    Kelola API key di API Key Dasbor.

    Penguji request API

    Uji endpoint langsung dari halaman ini. Masukkan API key Anda, pilih endpoint, lalu periksa response yang dikembalikan.

    Penguji API interaktif

    Jalankan request langsung dari browser Anda ke endpoint API QR Cake yang dipilih.

    GET
    x-api-key: YOUR_API_KEY
    URL akhir
    https://api.qrcake.com/v1/product/api/product
    Jalankan request untuk melihat status dan isi response di sini.

    Terminologi

    Products

    Kode QR

    Users

    Akun QR Cake

    Body request (POST/PUT)

    Untuk request POST dan PUT, body harus dikirim dalam bentuk string. Jika Anda mengirim JSON, kirimkan sebagai string JSON (misalnya JSON.stringify(payload)).

    const payload = { redirect: "https://example.com", metadata: {} };
    
    await fetch(url, {
      method: "POST",
      body: JSON.stringify(payload),
    });
    GET

    Daftar kode QR

    Menampilkan kode QR yang bisa diakses oleh API key.

    Buka di GitBook
    Path: /product
    URL: https://api.qrcake.com/v1/product/api/product
    Detail request
    Header
    • x-api-key: <API Key>
    • Accept: application/json
    Response
    200 OK
    [
      {
        "accountId": "string",
        "productId": "string",
        "userId": "string",
        "redirect": "string",
        "state": "ACTIVE",
        "metadata": {},
        "createdAt": 0,
        "updatedAt": 0
      }
    ]
    401 Unauthorized
    {
      "message": {}
    }

    Products = kode QR.

    GET

    Ambil satu kode QR

    Mengambil satu kode QR.

    Buka di GitBook
    Path: /product/{productId}
    URL: https://api.qrcake.com/v1/product/api/product/{productId}
    Detail request
    Parameter path
    • productId (string)
    Header
    • x-api-key: <API Key>
    • Accept: application/json
    Response
    200 OK
    {
      "accountId": "string",
      "productId": "string",
      "userId": "string",
      "redirect": "string",
      "state": "ACTIVE",
      "metadata": {},
      "createdAt": 0,
      "updatedAt": 0
    }
    401 Unauthorized
    {
      "message": {}
    }
    POST

    Buat kode QR

    Membuat produk kode QR baru.

    Buka di GitBook
    Path: /product
    URL: https://api.qrcake.com/v1/product/api/product
    Detail request
    Header
    • x-api-key: <API Key>
    • Content-Type: application/json
    • Accept: application/json
    Template body
    {
      "redirect": "https://example.com",
      "metadata": {},
      "state": "ACTIVE"
    }
    Response
    200 OK
    {
      "accountId": "string",
      "productId": "string",
      "userId": "string",
      "redirect": "string",
      "state": "ACTIVE",
      "metadata": {},
      "createdAt": 0,
      "updatedAt": 0
    }
    401 Unauthorized
    {
      "message": {}
    }

    Body request POST harus dikirim dalam bentuk string (misalnya, JSON.stringify(payload)).

    PUT

    Perbarui kode QR

    Memperbarui kode QR (product) yang sudah ada.

    Buka di GitBook
    Path: /product/{productId}
    URL: https://api.qrcake.com/v1/product/api/product/{productId}
    Detail request
    Parameter path
    • productId (string)
    Header
    • x-api-key: <API Key>
    • Content-Type: application/json
    • Accept: application/json
    Template body
    {
      "redirect": "https://example.com",
      "metadata": {},
      "state": "ACTIVE"
    }
    Response
    200 OK
    {
      "accountId": "string",
      "productId": "string",
      "userId": "string",
      "redirect": "string",
      "state": "ACTIVE",
      "metadata": {},
      "expiresAt": 0,
      "createdAt": 0,
      "updatedAt": 0
    }
    401 Unauthorized
    {
      "message": {}
    }

    Body request PUT harus dikirim dalam bentuk string.

    DELETE

    Hapus kode QR

    Menghapus satu kode QR.

    Buka di GitBook
    Path: /product/{productId}
    URL: https://api.qrcake.com/v1/product/api/product/{productId}
    Detail request
    Parameter path
    • productId (string)
    Header
    • x-api-key: <API Key>
    • Accept: application/json
    Response
    200 OK
    {
      "productId": "string"
    }
    401 Unauthorized
    {
      "message": {}
    }
    GET

    Izin

    Mengembalikan daftar izin yang dimiliki API key.

    Buka di GitBook
    Path: /permission
    URL: https://api.qrcake.com/v1/product/api/permission
    Detail request
    Header
    • x-api-key: <API Key>
    • Accept: application/json
    Response
    200 OK
    {
      "success": true,
      "result": {
        "tier": "subscriber",
        "active": true,
        "analytics": true,
        "productLimit": 100,
        "productTotal": 3,
        "productActiveLimit": 100,
        "productActiveTotal": 3
      }
    }
    401 Unauthorized
    {
      "message": {}
    }

    Tipe QR yang didukung

    Gunakan tipe metadata berikut saat membuat atau memperbarui produk QR.

    redirect, link, image, video, file, pdf, audio, app, event, vCard

    Mulai dengan kode QR dinamis dan kode QR yang bisa diubah di beranda kami.