डेवलपर्स के लिए एपीआई संदर्भ v3

शुरू करना

सिस्टम द्वारा संसाधित किए जाने वाले अनुरोधों के लिए एक एपीआई कुंजी की आवश्यकता होती है। एक बार जब कोई उपयोगकर्ता पंजीकृत हो जाता है, तो इस उपयोगकर्ता के लिए एक एपीआई कुंजी स्वचालित रूप से उत्पन्न हो जाती है। प्रत्येक अनुरोध के साथ एपीआई कुंजी भेजी जानी चाहिए (नीचे पूरा उदाहरण देखें)। यदि एपीआई कुंजी नहीं भेजी गई है या समाप्त हो गई है, तो एक त्रुटि होगी। दुरुपयोग को रोकने के लिए कृपया अपनी एपीआई कुंजी को गुप्त रखना सुनिश्चित करें।

प्रमाणीकरण

एपीआई प्रणाली के साथ प्रमाणित करने के लिए, आपको प्रत्येक अनुरोध के साथ अपनी एपीआई कुंजी को प्राधिकरण टोकन के रूप में भेजने की आवश्यकता है। आप नीचे नमूना कोड देख सकते हैं।

curl --location --request POST 'https://ltd.ac/api/url/add' \ 
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \ 
$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_URL => "https://ltd.ac/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);
कीमत सीमा

हमारे एपीआई में इसकी स्थिरता को अधिकतम करने के अनुरोधों में स्पाइक के खिलाफ सुरक्षा के लिए एक दर सीमक है। हमारी दर सीमा वर्तमान में 30 अनुरोध प्रति 1 मिनट पर सीमित है।

प्रतिक्रिया के साथ कई हेडर भेजे जाएंगे और अनुरोध के बारे में विभिन्न जानकारी निर्धारित करने के लिए इनकी जांच की जा सकती है।

X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: TIMESTAMP
रिस्पांस हैंडलिंग

सभी एपीआई प्रतिक्रिया डिफ़ॉल्ट रूप से JSON प्रारूप में लौटा दी जाती है। इसे प्रयोग करने योग्य डेटा में बदलने के लिए, भाषा के अनुसार उपयुक्त फ़ंक्शन का उपयोग करने की आवश्यकता होगी। PHP में, फ़ंक्शन json_decode() का उपयोग डेटा को किसी ऑब्जेक्ट (डिफ़ॉल्ट) या एक सरणी में परिवर्तित करने के लिए किया जा सकता है (दूसरे पैरामीटर को सत्य पर सेट करें)। त्रुटि कुंजी की जांच करना बहुत महत्वपूर्ण है क्योंकि इससे यह जानकारी मिलती है कि कोई त्रुटि हुई या नहीं। आप हेडर कोड भी देख सकते हैं।

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

खाता

खाता प्राप्त करें
GET https://ltd.ac/api/account

खाते की जानकारी प्राप्त करने के लिए, आप इस समापन बिंदु पर एक अनुरोध भेज सकते हैं और यह खाते पर डेटा लौटाएगा।

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "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"
    }
}
खाता अद्यतन करें
PUT https://ltd.ac/api/account/update

खाते की जानकारी अपडेट करने के लिए, आप इस समापन बिंदु पर एक अनुरोध भेज सकते हैं और यह खाते के डेटा को अपडेट कर देगा।

curl --location --request PUT 'https://ltd.ac/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://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "error": 0,
    "message": "Account has been successfully updated."
}

ब्रांडेड डोमेन

List all branded domains
GET https://ltd.ac/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).

पैरामीटरविवरण
limit (optional) Per page data result
page (optional) Current page request
curl --location --request GET 'https://ltd.ac/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://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "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://ltd.ac/api/domain/add

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

पैरामीटरविवरण
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://ltd.ac/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://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "error": 0,
    "id": 1
}
Update a Domain
PUT https://ltd.ac/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).

पैरामीटरविवरण
redirectroot (optional) Root redirect when someone visits your domain
redirect404 (optional) Custom 404 redirect
curl --location --request PUT 'https://ltd.ac/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://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "error": 0,
    "message": "Domain has been updated successfully."
}
Delete Domain
DELETE https://ltd.ac/api/domain/:id/delete

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

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "error": 0,
    "message": "Domain has been deleted successfully."
}

कस्टम स्पलैश

List all custom splash
GET https://ltd.ac/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).

पैरामीटरविवरण
limit (optional) Per page data result
page (optional) Current page request
curl --location --request GET 'https://ltd.ac/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://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "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"
            }
        ]
    }
}

सीटीए ओवरले

List all cta overlays
GET https://ltd.ac/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).

पैरामीटरविवरण
limit (optional) Per page data result
page (optional) Current page request
curl --location --request GET 'https://ltd.ac/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://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "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"
            }
        ]
    }
}

लिंक


Pixels

List all pixels
GET https://ltd.ac/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).

पैरामीटरविवरण
limit (optional) Per page data result
page (optional) Current page request
curl --location --request GET 'https://ltd.ac/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://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "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://ltd.ac/api/pixel/add

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

पैरामीटरविवरण
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://ltd.ac/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://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "error": 0,
    "id": 1
}
Update a Pixel
PUT https://ltd.ac/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).

पैरामीटरविवरण
name (optional) Custom name for your pixel
tag (required) The tag for the pixel
curl --location --request PUT 'https://ltd.ac/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://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "error": 0,
    "message": "Pixel has been updated successfully."
}
Delete Pixel
DELETE https://ltd.ac/api/pixel/:id/delete

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

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "error": 0,
    "message": "Pixel has been deleted successfully."
}

क्यूआर कोड

सभी क्यूआर कोड सूचीबद्ध करें
GET https://ltd.ac/api/qr?limit=2&page=1

एपीआई के माध्यम से अपने क्यूआर कोड प्राप्त करने के लिए, आप इस समापन बिंदु का उपयोग कर सकते हैं। आप डेटा फ़िल्टर भी कर सकते हैं (अधिक जानकारी के लिए तालिका देखें)।

पैरामीटरविवरण
limit (optional) Per page data result
page (optional) Current page request
curl --location --request GET 'https://ltd.ac/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://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "qrs": [
            {
                "id": 2,
                "link": "https:\/\/ltd.ac\/qr\/a2d5e",
                "scans": 0,
                "name": "Google",
                "date": "2020-11-10 18:01:43"
            },
            {
                "id": 1,
                "link": "https:\/\/ltd.ac\/qr\/b9edfe",
                "scans": 5,
                "name": "Google Canada",
                "date": "2020-11-10 18:00:25"
            }
        ]
    }
}
एक क्यूआर कोड प्राप्त करें
GET https://ltd.ac/api/qr/:id

एपीआई के माध्यम से एकल क्यूआर कोड का विवरण प्राप्त करने के लिए, आप इस समापन बिंदु का उपयोग कर सकते हैं।

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "error": 0,
    "details": {
        "id": 1,
        "link": "https:\/\/ltd.ac\/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
        }
    }
}
एक क्यूआर कोड बनाएं
POST https://ltd.ac/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).

पैरामीटरविवरण
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://ltd.ac/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://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "error": 0,
    "id": 3,
    "link": "https:\/\/ltd.ac\/qr\/a58f79"
}
क्यूआर कोड अपडेट करें
PUT https://ltd.ac/api/qr/:id/update

क्यूआर कोड को अपडेट करने के लिए, आपको एक पुट अनुरोध के माध्यम से JSON में एक मान्य डेटा भेजने की आवश्यकता है। डेटा आपके अनुरोध के मूल भाग के रूप में भेजा जाना चाहिए जैसा कि नीचे दिखाया गया है। नीचे दिया गया उदाहरण उन सभी मापदंडों को दिखाता है जिन्हें आप भेज सकते हैं लेकिन आपको सभी भेजने की आवश्यकता नहीं है (अधिक जानकारी के लिए तालिका देखें)।

पैरामीटरविवरण
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://ltd.ac/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://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "error": 0,
    "message": "QR has been updated successfully."
}
एक क्यूआर कोड हटाएं
DELETE https://ltd.ac/api/qr/:id/delete

क्यूआर कोड को हटाने के लिए, आपको एक DELETE अनुरोध भेजना होगा।

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "error": 0,
    "message": "QR Code has been deleted successfully."
}

योजनाओं

यह समापन बिंदु केवल व्यवस्थापक विशेषाधिकार वाले उपयोगकर्ताओं द्वारा ही पहुँचा जा सकता है।

सभी योजनाओं की सूची बनाएं
GET https://ltd.ac/api/plans

मंच पर सभी योजनाओं की एक सूची प्राप्त करें।

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "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"
                }
            }
        }
    ]
}
एक उपयोगकर्ता को एक योजना की सदस्यता लें
PUT https://ltd.ac/api/plan/:planid/user/:userid

किसी उपयोगकर्ता को योजना के लिए सदस्यता लेने के लिए, इस समापन बिंदु पर योजना आईडी और उपयोगकर्ता आईडी के साथ एक पुट अनुरोध भेजें। सदस्यता का प्रकार और समाप्ति तिथि निर्दिष्ट करने की आवश्यकता होगी। यदि समाप्ति तिथि निर्दिष्ट नहीं है, तो तिथि को प्रकार के अनुसार समायोजित किया जाएगा।

पैरामीटरविवरण
type monthly | yearly | lifetime
expiration (वैकल्पिक) योजना की समाप्ति तिथि उदा।2024-04-29 07:46:59
curl --location --request PUT 'https://ltd.ac/api/plan/:planid/user/:userid' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "monthly",
    "expiration": "2024-04-29 07:46:59"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://ltd.ac/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 07:46:59"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
सर्वर प्रतिक्रिया
{
    "error": 0,
    "message": "User has been subscribed to this plan."
}

उपयोगकर्ताओं

यह समापन बिंदु केवल व्यवस्थापक विशेषाधिकार वाले उपयोगकर्ताओं द्वारा ही पहुँचा जा सकता है।

सभी उपयोगकर्ताओं की सूची बनाएं
GET https://ltd.ac/api/users?filter=free

प्लेटफ़ॉर्म पर सभी उपयोगकर्ताओं की सूची प्राप्त करें। url में फ़िल्टर पैरामीटर भेजकर डेटा को फ़िल्टर किया जा सकता है।

पैरामीटरविवरण
filter admin | free | pro
curl --location --request GET 'https://ltd.ac/api/users?filter=free' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "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://ltd.ac/api/user/:id

Get data for a single user.

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "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"
    }
}
एक उपयोगकर्ता बनाएं
POST https://ltd.ac/api/user/add

एक उपयोगकर्ता बनाने के लिए, इस समापन बिंदु का उपयोग करें और निम्नलिखित जानकारी को JSON के रूप में भेजें।

पैरामीटरविवरण
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://ltd.ac/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://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "error": 0,
    "message": "User has been registered.",
    "data": {
        "id": 3,
        "email": "[email protected]",
        "username": "user"
    }
}
एक उपयोगकर्ता हटाएं
DELETE https://ltd.ac/api/user/:id/delete

किसी उपयोगकर्ता को हटाने के लिए, इस समापन बिंदु का उपयोग करें।

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://ltd.ac/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;
सर्वर प्रतिक्रिया
{
    "error": 0,
    "message": "User has been deleted."
}