This API is used for creating shortlinks for a destination URL, often used for affiliate marketing .
curl --location 'https://dashboard.ylytic.com/ylytic/admin/api/v1/shortlinks' \
--header 'Authorization: Bearer {{auth_token}} \
--data '{"target_url":"https://www.ylytic.com/"}'
{"target_url":"https://www.ylytic.com/"}
{
"short_link": "https://app.ylytic.com/sl/1705923271.798946"
}
GET - Shortlink Insights Tracking
Get the insights of the created shortlink.
curl --location 'https://insights.ylytic.com/ylytic/admin/api/v1/shortlinks/1703838910.587752/insights' \
--header 'Authorization: Bearer {{auth_token}}'
{
"id": "1703838910.587752",
"client": {
"id": "643d294c4c77fb75c38bc751",
"short_name": "anuraggupta",
"name": "-"
},
"short_link": "https://app.ylytic.com/sl/1703838910.587752",
"name": "ylytic",
"target_url": "https://instagram.com",
"analytics": {
"users": 1,
"clicks": 1,
"city_distribution": [
{
"city": "Ahmedabad",
"users": 1,
"clicks": 1
}
],
"country_distribution": [
{
"country": "India",
"users": 1,
"clicks": 1
}
],
"platform_distribution": [
{
"platform": "browser",
"users": 1,
"clicks": 1
}
],
"device_distribution": [
{
"device": null,
"users": 1,
"clicks": 1
}
],
"date_distribution": [
{
"date": "2023-12-29",
"users": 1,
"clicks": 1
}
]
},
"analyticsAt": "2024-01-22 11:29:09.420000",
"createdDate": "29-12-2023"
}