Referensi API untuk Pengembang v3

Mulai

Kunci API diperlukan agar permintaan diproses oleh sistem. Setelah pengguna mendaftar, kunci API secara otomatis dibuat untuk pengguna ini. Kunci API harus dikirim dengan setiap permintaan (lihat contoh lengkap di bawah). Jika kunci API tidak dikirim atau kedaluwarsa, akan terjadi kesalahan. Pastikan untuk merahasiakan kunci API Anda untuk mencegah penyalahgunaan.

Autentikasi

Untuk mengautentikasi dengan sistem API, Anda perlu mengirim kunci API sebagai token otorisasi dengan setiap permintaan. Anda dapat melihat contoh kode di bawah ini.

curl --location --request POST 'https://rll.cc/api/url/add' \ 
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \ 
$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/url/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => array(
    "Authorization: Bearer YOURAPIKEY",
    "Content-Type: application/json",
    ),
));

$response = curl_exec($curl);
Batas Tarif

API kami memiliki pembatas kecepatan untuk melindungi dari lonjakan permintaan untuk memaksimalkan stabilitasnya. Pembatas tarif kami saat ini dibatasi pada 30 permintaan per 1 menit.

Beberapa tajuk akan dikirim bersama respons dan ini dapat diperiksa untuk menentukan berbagai informasi tentang permintaan.

X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: TIMESTAMP
Penanganan Respon

Semua respons API dikembalikan dalam format JSON secara default. Untuk mengubah ini menjadi data yang dapat digunakan, fungsi yang sesuai perlu digunakan sesuai dengan bahasa. Di PHP, fungsi json_decode() dapat digunakan untuk mengonversi data menjadi objek (default) atau array (setel parameter kedua ke true). Sangat penting untuk memeriksa kunci kesalahan karena memberikan informasi apakah ada kesalahan atau tidak. Anda juga dapat memeriksa kode header.

{
    "error": 1,
    "message": "An error ocurred"
}

Akun

Dapatkan Akun
GET https://rll.cc/api/account

Untuk mendapatkan informasi tentang akun, Anda dapat mengirim permintaan ke titik akhir ini dan itu akan mengembalikan data pada akun.

curl --location --request GET 'https://rll.cc/api/account' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/account",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "data": {
        "id": 1,
        "email": "[email protected]",
        "username": "sampleuser",
        "avatar": "https:\/\/domain.com\/content\/avatar.png",
        "status": "pro",
        "expires": "2022-11-15 15:00:00",
        "registered": "2020-11-10 18:01:43"
    }
}
Perbaharui akun
PUT https://rll.cc/api/account/update

Untuk memperbarui informasi di akun, Anda dapat mengirim permintaan ke titik akhir ini dan itu akan memperbarui data di akun.

curl --location --request PUT 'https://rll.cc/api/account/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "[email protected]",
    "password": "newpassword"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/account/update",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => '{
    "email": "[email protected]",
    "password": "newpassword"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "message": "Account has been successfully updated."
}

Domain Bermerek

List all branded domains
GET https://rll.cc/api/domains?limit=2&page=1

To get your branded domains codes via the API, you can use this endpoint. You can also filter data (See table for more info).

ParameterKeterangan
limit (optional) Per page data result
page (optional) Current page request
curl --location --request GET 'https://rll.cc/api/domains?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/domains?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "domains": [
            {
                "id": 1,
                "domain": "https:\/\/domain1.com",
                "redirectroot": "https:\/\/rootdomain.com",
                "redirect404": "https:\/\/rootdomain.com\/404"
            },
            {
                "id": 2,
                "domain": "https:\/\/domain2.com",
                "redirectroot": "https:\/\/rootdomain2.com",
                "redirect404": "https:\/\/rootdomain2.com\/404"
            }
        ]
    }
}
Create a Branded Domain
POST https://rll.cc/api/domain/add

A domain can be added using this endpoint. Please make sure the domain is correctly pointed to our server.

ParameterKeterangan
domain (required) Branded domain including http or https
redirectroot (optional) Root redirect when someone visits your domain
redirect404 (optional) Custom 404 redirect
curl --location --request POST 'https://rll.cc/api/domain/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "domain": "https:\/\/domain1.com",
    "redirectroot": "https:\/\/rootdomain.com",
    "redirect404": "https:\/\/rootdomain.com\/404"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/domain/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => '{
    "domain": "https:\/\/domain1.com",
    "redirectroot": "https:\/\/rootdomain.com",
    "redirect404": "https:\/\/rootdomain.com\/404"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "id": 1
}
Update a Domain
PUT https://rll.cc/api/domain/:id/update

To update a branded domain, you need to send a valid data in JSON via a PUT request. The data must be sent as the raw body of your request as shown below. The example below shows all the parameters you can send but you are not required to send all (See table for more info).

ParameterKeterangan
redirectroot (optional) Root redirect when someone visits your domain
redirect404 (optional) Custom 404 redirect
curl --location --request PUT 'https://rll.cc/api/domain/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "redirectroot": "https:\/\/rootdomain-new.com",
    "redirect404": "https:\/\/rootdomain-new.com\/404"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/domain/:id/update",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => '{
    "redirectroot": "https:\/\/rootdomain-new.com",
    "redirect404": "https:\/\/rootdomain-new.com\/404"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "message": "Domain has been updated successfully."
}
Delete Domain
DELETE https://rll.cc/api/domain/:id/delete

To delete a domain, you need to send a DELETE request.

curl --location --request DELETE 'https://rll.cc/api/domain/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/domain/:id/delete",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "message": "Domain has been deleted successfully."
}

Pembuka Kustom

List all custom splash
GET https://rll.cc/api/splash?limit=2&page=1

To get custom splash pages via the API, you can use this endpoint. You can also filter data (See table for more info).

ParameterKeterangan
limit (optional) Per page data result
page (optional) Current page request
curl --location --request GET 'https://rll.cc/api/splash?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/splash?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "splash": [
            {
                "id": 1,
                "name": "Product 1 Promo",
                "date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "name": "Product 2 Promo",
                "date": "2020-11-10 18:10:00"
            }
        ]
    }
}

Hamparan CTA

List all cta overlays
GET https://rll.cc/api/overlay?limit=2&page=1

To get cta overlays via the API, you can use this endpoint. You can also filter data (See table for more info).

ParameterKeterangan
limit (optional) Per page data result
page (optional) Current page request
curl --location --request GET 'https://rll.cc/api/overlay?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/overlay?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "cta": [
            {
                "id": 1,
                "type": "message",
                "name": "Product 1 Promo",
                "date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "type": "contact",
                "name": "Contact Page",
                "date": "2020-11-10 18:10:00"
            }
        ]
    }
}

Tautan


Piksel

List all pixels
GET https://rll.cc/api/pixels?limit=2&page=1

To get your pixels codes via the API, you can use this endpoint. You can also filter data (See table for more info).

ParameterKeterangan
limit (optional) Per page data result
page (optional) Current page request
curl --location --request GET 'https://rll.cc/api/pixels?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/pixels?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "pixels": [
            {
                "id": 1,
                "type": "gtmpixel",
                "name": "GTM Pixel",
                "tag": "GA-123456789",
                "date": "2020-11-10 18:00:00"
            },
            {
                "id": 2,
                "type": "twitterpixel",
                "name": "Twitter Pixel",
                "tag": "1234567",
                "date": "2020-11-10 18:10:00"
            }
        ]
    }
}
Create a Pixel
POST https://rll.cc/api/pixel/add

A pixel can be created using this endpoint. You need to send the pixel type and the tag.

ParameterKeterangan
type (required) gtmpixel | gapixel | fbpixel | adwordspixel | linkedinpixel | twitterpixel | adrollpixel | quorapixel | pinterest | bing | snapchat | reddit
name (required) Custom name for your pixel
tag (required) The tag for the pixel
curl --location --request POST 'https://rll.cc/api/pixel/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "gtmpixel",
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/pixel/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => '{
    "type": "gtmpixel",
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "id": 1
}
Update a Pixel
PUT https://rll.cc/api/pixel/:id/update

To update a pixel, you need to send a valid data in JSON via a PUT request. The data must be sent as the raw body of your request as shown below. The example below shows all the parameters you can send but you are not required to send all (See table for more info).

ParameterKeterangan
name (optional) Custom name for your pixel
tag (required) The tag for the pixel
curl --location --request PUT 'https://rll.cc/api/pixel/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/pixel/:id/update",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => '{
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "message": "Pixel has been updated successfully."
}
Delete Pixel
DELETE https://rll.cc/api/pixel/:id/delete

To delete a pixel, you need to send a DELETE request.

curl --location --request DELETE 'https://rll.cc/api/pixel/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/pixel/:id/delete",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "message": "Pixel has been deleted successfully."
}

Kode QR

Daftar semua kode QR
GET https://rll.cc/api/qr?limit=2&page=1

Untuk mendapatkan kode QR Anda melalui API, Anda dapat menggunakan titik akhir ini. Anda juga dapat memfilter data (Lihat tabel untuk info selengkapnya).

ParameterKeterangan
limit (optional) Per page data result
page (optional) Current page request
curl --location --request GET 'https://rll.cc/api/qr?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/qr?limit=2&page=1",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "qrs": [
            {
                "id": 2,
                "link": "https:\/\/rll.cc\/qr\/a2d5e",
                "scans": 0,
                "name": "Google",
                "date": "2020-11-10 18:01:43"
            },
            {
                "id": 1,
                "link": "https:\/\/rll.cc\/qr\/b9edfe",
                "scans": 5,
                "name": "Google Canada",
                "date": "2020-11-10 18:00:25"
            }
        ]
    }
}
Dapatkan satu Kode QR
GET https://rll.cc/api/qr/:id

Untuk mendapatkan detail untuk satu kode QR melalui API, Anda dapat menggunakan titik akhir ini.

curl --location --request GET 'https://rll.cc/api/qr/:id' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/qr/:id",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "details": {
        "id": 1,
        "link": "https:\/\/rll.cc\/qr\/b9edfe",
        "scans": 5,
        "name": "Google Canada",
        "date": "2020-11-10 18:00:25"
    },
    "data": {
        "clicks": 1,
        "uniqueClicks": 1,
        "topCountries": {
            "Unknown": "1"
        },
        "topReferrers": {
            "Direct, email and other": "1"
        },
        "topBrowsers": {
            "Chrome": "1"
        },
        "topOs": {
            "Windows 10": "1"
        },
        "socialCount": {
            "facebook": 0,
            "twitter": 0,
            "instagram": 0
        }
    }
}
Buat Kode QR
POST https://rll.cc/api/qr/add

To create a QR Code, you need to send a valid data in JSON via a POST request. The data must be sent as the raw body of your request as shown below. The example below shows all the parameters you can send but you are not required to send all (See table for more info).

ParameterKeterangan
type (required) text | vcard | link | email | phone | sms | wifi
data (required) Data to be embedded inside the QR code. The data can be string or array depending on the type
background (optional) RGB color e.g. rgb(255,255,255)
foreground (optional) RGB color e.g. rgb(0,0,0)
logo (optional) Path to the logo either png or jpg
curl --location --request POST 'https://rll.cc/api/qr/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "link",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/qr/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => '{
    "type": "link",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "id": 3,
    "link": "https:\/\/rll.cc\/qr\/a58f79"
}
Perbarui Kode QR
PUT https://rll.cc/api/qr/:id/update

Untuk memperbarui Kode QR, Anda perlu mengirim data yang valid di JSON melalui permintaan PUT. Data harus dikirim sebagai badan mentah permintaan Anda seperti yang ditunjukkan di bawah ini. Contoh di bawah ini menunjukkan semua parameter yang dapat Anda kirim tetapi Anda tidak diharuskan untuk mengirim semua (Lihat tabel untuk info lebih lanjut).

ParameterKeterangan
data (required) Data to be embedded inside the QR code. The data can be string or array depending on the type
background (optional) RGB color e.g. rgb(255,255,255)
foreground (optional) RGB color e.g. rgb(0,0,0)
logo (optional) Path to the logo either png or jpg
curl --location --request PUT 'https://rll.cc/api/qr/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "link",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/qr/:id/update",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => '{
    "type": "link",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "message": "QR has been updated successfully."
}
Hapus Kode QR
DELETE https://rll.cc/api/qr/:id/delete

Untuk menghapus kode QR, Anda perlu mengirim permintaan DELETE.

curl --location --request DELETE 'https://rll.cc/api/qr/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/qr/:id/delete",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "message": "QR Code has been deleted successfully."
}

Rencana

Titik akhir ini hanya dapat diakses oleh pengguna dengan hak istimewa admin.

Daftar semua rencana
GET https://rll.cc/api/plans

Dapatkan daftar semua paket di platform.

curl --location --request GET 'https://rll.cc/api/plans' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/plans",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "data": [
        {
            "id": 2,
            "name": "Business",
            "free": false,
            "prices": {
                "monthly": 9.99,
                "yearly": 99.99,
                "lifetime": 999.99
            },
            "limits": {
                "links": 100,
                "clicks": 100000,
                "retention": 60,
                "custom": {
                    "enabled": "0"
                },
                "team": {
                    "enabled": "0",
                    "count": "0"
                },
                "splash": {
                    "enabled": "1",
                    "count": "5"
                },
                "overlay": {
                    "enabled": "1",
                    "count": "10"
                },
                "pixels": {
                    "enabled": "1",
                    "count": "10"
                },
                "domain": {
                    "enabled": "1",
                    "count": "1"
                },
                "multiple": {
                    "enabled": "0"
                },
                "alias": {
                    "enabled": "1"
                },
                "device": {
                    "enabled": "0"
                },
                "geo": {
                    "enabled": "0"
                },
                "bundle": {
                    "enabled": "0"
                },
                "parameters": {
                    "enabled": "0"
                },
                "export": {
                    "enabled": "0"
                },
                "api": {
                    "enabled": "0"
                }
            }
        },
        {
            "id": 1,
            "name": "Starter",
            "free": true,
            "prices": null,
            "limits": {
                "links": 10,
                "clicks": 1000,
                "retention": 7,
                "custom": {
                    "enabled": "0"
                },
                "team": {
                    "enabled": "0",
                    "count": "0"
                },
                "splash": {
                    "enabled": "0",
                    "count": "0"
                },
                "overlay": {
                    "enabled": "0",
                    "count": "10"
                },
                "pixels": {
                    "enabled": "0",
                    "count": "10"
                },
                "domain": {
                    "enabled": "0",
                    "count": "0"
                },
                "multiple": {
                    "enabled": "0"
                },
                "alias": {
                    "enabled": "0"
                },
                "device": {
                    "enabled": "0"
                },
                "geo": {
                    "enabled": "0"
                },
                "bundle": {
                    "enabled": "0"
                },
                "parameters": {
                    "enabled": "0"
                },
                "export": {
                    "enabled": "0"
                },
                "api": {
                    "enabled": "0"
                }
            }
        }
    ]
}
Berlangganan pengguna ke paket
PUT https://rll.cc/api/plan/:planid/user/:userid

Untuk berlangganan pengguna ke rencana, kirim permintaan PUT ke titik akhir ini dengan id rencana dan id pengguna. Jenis langganan dan tanggal kedaluwarsa harus ditentukan. Jika tanggal kedaluwarsa tidak ditentukan, tanggal akan disesuaikan dengan jenisnya.

ParameterKeterangan
type monthly | yearly | lifetime
expiration (opsional) Tanggal kedaluwarsa paket mis.2024-04-29 04:04:49
curl --location --request PUT 'https://rll.cc/api/plan/:planid/user/:userid' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "monthly",
    "expiration": "2024-04-29 04:04:49"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/plan/:planid/user/:userid",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "PUT",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => '{
    "type": "monthly",
    "expiration": "2024-04-29 04:04:49"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "message": "User has been subscribed to this plan."
}

Pengguna

Titik akhir ini hanya dapat diakses oleh pengguna dengan hak istimewa admin.

Daftar semua pengguna
GET https://rll.cc/api/users?filter=free

Dapatkan daftar semua pengguna di platform. Data dapat difilter dengan mengirimkan parameter filter di url.

ParameterKeterangan
filter admin | free | pro
email Search a user by email
curl --location --request GET 'https://rll.cc/api/users?filter=free' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/users?filter=free",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "data": [
        {
            "id": 2,
            "email": "[email protected]",
            "username": "sample2user",
            "avatar": "https:\\\/\\\/domain.com\/content\/avatar2.png",
            "status": "free",
            "planid": 1,
            "expires": null,
            "registered": "2020-11-10 18:01:43",
            "apikey": "ABC123DEF456"
        },
        {
            "id": 1,
            "email": "[email protected]",
            "username": "sampleuser",
            "avatar": "https:\\\/\\\/domain.com\/content\/avatar.png",
            "status": "pro",
            "planid": 2,
            "expires": "2022-11-15 15:00:00",
            "registered": "2020-11-10 18:01:43",
            "apikey": "ABC123DEF456"
        }
    ]
}
List a single user
GET https://rll.cc/api/user/:id

Get data for a single user.

curl --location --request GET 'https://rll.cc/api/user/:id' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/user/:id",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "data": {
        "id": 2,
        "email": "[email protected]",
        "username": "sample2user",
        "avatar": "https:\\\/\\\/domain.com\/content\/avatar2.png",
        "status": "free",
        "planid": 1,
        "expires": null,
        "registered": "2020-11-10 18:01:43",
        "apikey": "ABC123DEF456"
    }
}
Buat pengguna
POST https://rll.cc/api/user/add

Untuk membuat pengguna, gunakan titik akhir ini dan kirimkan informasi berikut sebagai JSON.

ParameterKeterangan
username (required) User's username. Needs to be valid.
email (required) User's email. Needs to be valid.
password (required) User's password. Minimum 5 characters.
planid (optional) Premium plan. This can be found in the admin panel.
expiration (optional) Membership expiration example 2020-12-26 12:00:00
curl --location --request POST 'https://rll.cc/api/user/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "user",
    "password": "1234567891011",
    "email": "[email protected]",
    "planid": 1,
    "expiration": "2020-11-20 11:00:00"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/user/add",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "POST",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    CURLOPT_POSTFIELDS => '{
    "username": "user",
    "password": "1234567891011",
    "email": "[email protected]",
    "planid": 1,
    "expiration": "2020-11-20 11:00:00"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "message": "User has been registered.",
    "data": {
        "id": 3,
        "email": "[email protected]",
        "username": "user"
    }
}
Hapus pengguna
DELETE https://rll.cc/api/user/:id/delete

Untuk menghapus pengguna, gunakan titik akhir ini.

curl --location --request DELETE 'https://rll.cc/api/user/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/user/:id/delete",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "DELETE",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "message": "User has been deleted."
}
Login a user
GET https://rll.cc/api/user/login/:id

This endpoint will generate a unique link that will allow the user to automatically login to the platform. SSO login urls are valid for 1 hour and they can be used a single time.

curl --location --request GET 'https://rll.cc/api/user/login/:id' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://rll.cc/api/user/login/:id",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => "",
    CURLOPT_MAXREDIRS => 2,
    CURLOPT_TIMEOUT => 10,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_CUSTOMREQUEST => "GET",
    CURLOPT_HTTPHEADER => array(
        "Authorization: Bearer YOURAPIKEY",
        "Content-Type: application/json",
    ),
    
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
Tanggapan server
{
    "error": 0,
    "url": "https:\/\/rll.cc\/user\/login\/sso\/ogmthputjziiyqfxpyirpbxljplhokwv"
}