The createQrCodeHandler creates a qr code for the input body and returns the reponse to users
# cURL
curl -X POST \
'https://divsly-backend.vercel.app/api/v1/qr-code' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN_HERE' \
-d '{
"firstName":"",
"lastName":"",
"videos":[],
"imageList":[],
"bio":"doe",
"mobile":"",
"phone":"",
"fax":"",
"email":"",
"qrType":"website",
"company":"",
"job":"",
"address":"",
"website":"",
"summary":"",
"businessType":"",
"facebook":"",
"instagram":"",
"google":"",
"linkedin":"",
"welcomeImage":"",
"profilePic":"",
"title":"Preview",
"qr":"//api.qrcode-monkey.com/tmp/807f36b526d53242cbdb35e73b0f363f.png",
"qrLogoId":"886d912a169c986ca5f98c3450da9edaf3cdf137.png",
"destinationUrl":"https://divsly.com",
"slashTag":"dye6y",
"brandedDomain":"kut.lt",
"preset":"#000000",
"color":"#000000",
"bgColor":"#ffffff",
"isBgTransparent":false,
"pattern":"classy",
"corner":"square",
"logo":"",
"edit":0,
"frame":"",
"gradientColor":"",
"primaryColor":"#f1416c",
"audioPrimary":"#000000",
"primary":"",
"secondary":"",
"textColor":"",
"text":"Scan Me",
"about":"",
"aboutName":"",
"aboutPhone":"",
"aboutEmail":"",
"aboutWebsite":"",
"mondayOpen":"monday",
"tuesdayOpen":"tuesday",
"wednesdayOpen":"wednesday",
"thursdayOpen":"thursday",
"fridayOpen":"friday",
"saturdayOpen":"saturday",
"sundayOpen":"sunday",
"mondayStart":"09:00",
"tuesdayStart":"09:00",
"wednesdayStart":"09:00",
"thursdayStart":"09:00",
"fridayStart":"09:00",
"saturdayStart":"09:00",
"sundayStart":"09:00",
"mondayEnd":"20:00",
"tuesdayEnd":"20:00",
"wednesdayEnd":"20:00",
"thursdayEnd":"20:00",
"fridayEnd":"20:00",
"saturdayEnd":"20:00",
"sundayEnd":"20:00",
"ctaColor":"#e9e7e7",
"buttonText":"View",
"buttonLink":"https://www.divsly.com",
"audioTitle":"",
"bannerImage":"",
"pdfPassword":"",
"password":"",
"passwordProtectionEnabled":false,
"fieldData":"{\"destinationUrl\":\"https://divsly.com\",\"title\":\"Preview\",\"metaDescription\":\"\",\"brandedDomain\":\"kut.lt\",\"contentWelcomeImage\":\"\",\"contentWelcomeTime\":2.5,\"password\":\"\",\"passwordProtectionEnabled\":false}",
"expirationDate":"2025-06-25T06:21:29.854Z"
}'
// JavaScript Fetch
const payload = {
firstName: "",
lastName: "",
videos: [],
imageList: [],
bio: "doe",
mobile: "",
phone: "",
fax: "",
email: "",
qrType: "website",
company: "",
job: "",
address: "",
website: "",
summary: "",
businessType: "",
facebook: "",
instagram: "",
google: "",
linkedin: "",
welcomeImage: "",
profilePic: "",
title: "Preview",
qr: "//api.qrcode-monkey.com/tmp/807f36b526d53242cbdb35e73b0f363f.png",
qrLogoId: "886d912a169c986ca5f98c3450da9edaf3cdf137.png",
destinationUrl: "https://divsly.com",
slashTag: "dye6y",
brandedDomain: "kut.lt",
preset: "#000000",
color: "#000000",
bgColor: "#ffffff",
isBgTransparent: false,
pattern: "classy",
corner: "square",
logo: "",
edit: 0,
frame: "",
gradientColor: "",
primaryColor: "#f1416c",
audioPrimary: "#000000",
primary: "",
secondary: "",
textColor: "",
text: "Scan Me",
// ... rest of your payload
fieldData: "{\"destinationUrl\":\"https://divsly.com\",\"title\":\"Preview\",\"metaDescription\":\"\",\"brandedDomain\":\"kut.lt\",\"contentWelcomeImage\":\"\",\"contentWelcomeTime\":2.5,\"password\":\"\",\"passwordProtectionEnabled\":false}",
expirationDate: "2025-06-25T06:21:29.854Z"
};
fetch('https://divsly-backend.vercel.app/api/v1/qr-code', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_TOKEN_HERE'
},
body: JSON.stringify(payload)
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
// Axios (Node.js)
const axios = require('axios');
const payload = {
firstName: "",
lastName: "",
videos: [],
imageList: [],
bio: "doe",
// ... rest of your payload as above
};
axios.post('https://divsly-backend.vercel.app/api/v1/qr-code', payload, {
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_TOKEN_HERE'
}
})
.then(response => console.log(response.data))
.catch(error => console.error('Error:', error));
// PHP
$payload = array(
'firstName' => '',
'lastName' => '',
'videos' => array(),
'imageList' => array(),
'bio' => 'doe',
// ... rest of your payload
);
$ch = curl_init('https://divsly-backend.vercel.app/api/v1/qr-code');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payload));
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Authorization: Bearer YOUR_TOKEN_HERE'
));
$response = curl_exec($ch);
$result = json_decode($response, true);
curl_close($ch);
print_r($result);
# Python (requests)
import requests
import json
payload = {
"firstName": "",
"lastName": "",
"videos": [],
"imageList": [],
"bio": "doe",
# ... rest of your payload
}
headers = {
'Content-Type': 'application/json',
'Authorization': 'Bearer YOUR_TOKEN_HERE'
}
response = requests.post(
'https://divsly-backend.vercel.app/api/v1/qr-code',
headers=headers,
json=payload
)
print(response.json())
{
"message": "QR Code Created Successfully.",
"data": {
"id": 1167,
"type": "qr",
"type2": null,
"userId": 92,
"clicks": 0,
"lbClicks": 0,
"scans": 0,
"destinationUrl": "https://divsly.com",
"faviconUrl": "assets/img/logo/favicon.png",
"title": "Preview",
"titleLabel": "preview",
"btnLabel": null,
"brandedDomain": "kut.lt",
"slashTag": "dye6y",
"edit": 0,
"utm_id": null,
"utm_content": null,
"utm_term": null,
"utm_campaign": null,
"utm_medium": null,
"utm_source": null,
"preset": "#000000",
"bgColor": "#ffffff",
"color": "#000000",
"pattern": "classy",
"corner": "square",
"logo": "886d912a169c986ca5f98c3450da9edaf3cdf137.png",
"qr": "//api.qrcode-monkey.com/tmp/807f36b526d53242cbdb35e73b0f363f.png",
"qrLogoId": "886d912a169c986ca5f98c3450da9edaf3cdf137.png",
"tags": "",
"linkInBioId": null,
"uniqueTagId": 1228,
"isActive": true,
"isStarred": false,
"expirationDate": "2025-06-25T06:21:29.854Z",
"createdAt": "2025-03-27T06:21:38.331Z",
"updatedAt": "2025-03-27T06:21:38.331Z",
"fieldData": "{\"destinationUrl\":\"https://divsly.com\",\"title\":\"Preview\",\"metaDescription\":\"\",\"brandedDomain\":\"kut.lt\",\"contentWelcomeImage\":\"\",\"contentWelcomeTime\":2.5,\"password\":\"\",\"passwordProtectionEnabled\":false}",
"frame": "",
"isadminblocked": false,
"isEdit": false,
"password": null,
"passwordProtectionEnabled": false,
"primary": "",
"qrType": "website",
"secondary": "",
"text": "Scan Me",
"textColor": ""
}
}
{
"success": false,
"message": “Failed to create QR code”
}
{
error: true,
data: {
message: 'Qr Code Color Options Exceeded for your current plan. Please upgrade!',
},
}
{
error: true,
data: {
message: 'Qr Code Color Options Exceeded for your current plan. Please upgrade!',
},
}
{
error: true,
data: {
message: 'Qr Code Color Options Exceeded for your current plan. Please upgrade!',
},
}
{
success: false,
message: 'This exact link already exists and cannot be duplicated',
}
{
error: true,
data: {
message: 'Link Limit Exceeded for your current plan. Please upgrade!',
},
}
{ success: false, message: “string contains error description” }
{
error: true,
data: {
message: 'Qr Code Limit Exceeded for your current plan. Please upgrade!',
},
}