Link Tracking API

POST - Create Shortlink

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/"}'
ATTRIBUTESDESCRIPTION

target_url

URL of which the shortlink has to be created.

PAYLOAD

{"target_url":"https://www.ylytic.com/"}

OUTPUT (JSON)

{
    "short_link": "https://app.ylytic.com/sl/1705923271.798946"
}

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}}'

OUTPUT(JSON)

{
    "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"
}

POST - Create Shortlinks (Shopify Sales Conversion)

curl --location 'https://dashboard.ylytic.com/ylytic/admin/api/v1/shortlinks' \
--header 'Authorization: Bearer <token>' \
--data '{
    "target_url":"https://docs.ylytic.com/ylytic",
    "name":"test",
    "shopify_store_name":"61db52-3.myshopify.com",
    "utm_source":"anurag"
}'

ATTRIBUTESDESCRIPTION

target_url

URL of which the short link has to be created.

name

name of the shortlink created.

shopify_store_name

name of the shopify store

utm_source

Influencer identifier preferably for whom you want to track the sales

PAYLOAD

{
    "name": "Test Shortlink",
    "target_url": "https://hyue.in/products/hyue-hydramatte%E2%84%A2-liquid-lipstick-corallina",
    "shopify_store_name": "61db52-3.myshopify.com",
    "utm_source": "hello_anurag"
}

curl --location 'https://dashboard.ylytic.com/ylytic/admin/api/v1/shortlinks/1707435886.122057/insights' \
--header 'Authorization: Bearer <token>'

Last updated