Référence API pour les développeurs v3

Commencer

Le système a besoin d'une clé API pour traiter votre demande. Lorsqu'un utilisateur s'inscrit, une clé API est automatiquement générée pour cet utilisateur. Une clé API doit être envoyée avec chaque demande (voir l'exemple complet ci-dessous). Une erreur se produit si la clé API n'est pas envoyée ou expire. Gardez vos clés API secrètes pour éviter les abus.

certification

Pour vous authentifier auprès du système API, vous devez envoyer une clé API en tant que jeton d'authentification avec chaque demande. Vous pouvez voir l'exemple de code ci-dessous.

curl --location --request POST 'https://short7.iwinv.net/api/url/add' \ 
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \ 
$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_URL => "https://short7.iwinv.net/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);
Limitation de vitesse

Our API has a rate limiter to safeguard against spike in requests to maximize its stability. Our rate limiter is currently caped at 30 requests per 1 minute.

Plusieurs en-têtes sont envoyés avec la réponse, et en inspectant ces en-têtes, diverses informations sur la demande peuvent être obtenues.

X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: TIMESTAMP
traitement des réponses

Toutes les réponses de l'API sont renvoyées au format JSON par défaut. Transformer cela en données utilisables nécessite l'utilisation de la fonction appropriée en fonction du langage. En PHP, vous pouvez utiliser la fonction json_decode() pour convertir des données en un objet (par défaut) ou un tableau (définissez le deuxième paramètre sur true). Il est très important de vérifier la clé d'erreur, qui fournit des informations sur l'existence ou non d'une erreur. Vous pouvez également vérifier le code d'en-tête.

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

Compte

Obtenir un compte
GET https://short7.iwinv.net/api/account

Pour obtenir des informations sur un compte, envoyez une demande à ce point de terminaison et il renverra des données sur le compte.

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://short7.iwinv.net/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;
réponse du serveur
{
    "error": 0,
    "data": {
        "id": 1,
        "email": "sample@domain.com",
        "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"
    }
}
mise à jour du compte
PUT https://short7.iwinv.net/api/account/update

Pour mettre à jour les informations de votre compte, envoyez une demande à ce point de terminaison et les données de votre compte seront mises à jour.

curl --location --request PUT 'https://short7.iwinv.net/api/account/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "newemail@google.com",
    "password": "newpassword"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://short7.iwinv.net/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": "newemail@google.com",
    "password": "newpassword"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
réponse du serveur
{
    "error": 0,
    "message": "Account has been successfully updated."
}

domaine de la marque

Répertorier tous les domaines de marque
GET https://short7.iwinv.net/api/domains?limit=2&page=1

Vous pouvez utiliser ce point de terminaison pour obtenir votre code de domaine de marque via l'API. Vous pouvez également filtrer les données (voir le tableau pour plus de détails).

paramètreExplication
limit (Facultatif) Résultats des données par page
page (Facultatif) Demander la page actuelle
curl --location --request GET 'https://short7.iwinv.net/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://short7.iwinv.net/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;
réponse du serveur
{
    "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"
            }
        ]
    }
}
Créer un domaine de marque
POST https://short7.iwinv.net/api/domain/add

Vous pouvez utiliser ce point de terminaison pour ajouter des domaines. Assurez-vous que le domaine pointe correctement vers notre serveur.

paramètreExplication
domain (obligatoire) le domaine de votre marque, y compris http ou https
redirectroot (Facultatif) Rediriger la racine lorsque quelqu'un visite votre domaine
redirect404 (facultatif) redirection 404 personnalisée
curl --location --request POST 'https://short7.iwinv.net/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://short7.iwinv.net/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;
réponse du serveur
{
    "error": 0,
    "id": 1
}
mise à jour de domaine
PUT https://short7.iwinv.net/api/domain/:id/update

La mise à jour de votre domaine de marque nécessite l'envoi de données valides au format JSON via une requête PUT. Les données doivent être envoyées dans le corps brut de la demande, comme indiqué ci-dessous. L'exemple ci-dessous montre tous les paramètres qui peuvent être envoyés, mais tous n'ont pas besoin d'être envoyés (voir le tableau pour plus de détails).

paramètreExplication
redirectroot (Facultatif) Rediriger la racine lorsque quelqu'un visite votre domaine
redirect404 (facultatif) redirection 404 personnalisée
curl --location --request PUT 'https://short7.iwinv.net/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://short7.iwinv.net/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;
réponse du serveur
{
    "error": 0,
    "message": "Domain has been updated successfully."
}
Supprimer le domaine
DELETE https://short7.iwinv.net/api/domain/:id/delete

Pour supprimer un domaine, vous devez envoyer une requête DELETE.

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://short7.iwinv.net/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;
réponse du serveur
{
    "error": 0,
    "message": "Domain has been deleted successfully."
}

éclaboussure personnalisée

Répertorier toutes les éclaboussures personnalisées
GET https://short7.iwinv.net/api/splash?limit=2&page=1

Vous pouvez utiliser ce point de terminaison pour obtenir une page de démarrage personnalisée via l'API. Vous pouvez également filtrer les données (voir le tableau pour plus de détails).

paramètreExplication
limit (Facultatif) Résultats des données par page
page (Facultatif) Demander la page actuelle
curl --location --request GET 'https://short7.iwinv.net/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://short7.iwinv.net/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;
réponse du serveur
{
    "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"
            }
        ]
    }
}

Superposition d'incitation à l'action

Répertorier toutes les superpositions CTA
GET https://short7.iwinv.net/api/overlay?limit=2&page=1

Vous pouvez utiliser ce point de terminaison pour obtenir la superposition CTA via l'API. Vous pouvez également filtrer les données (voir le tableau pour plus de détails).

paramètreExplication
limit (Facultatif) Résultats des données par page
page (Facultatif) Demander la page actuelle
curl --location --request GET 'https://short7.iwinv.net/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://short7.iwinv.net/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;
réponse du serveur
{
    "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"
            }
        ]
    }
}

lien


pixels

lister tous les pixels
GET https://short7.iwinv.net/api/pixels?limit=2&page=1

Vous pouvez utiliser ce point de terminaison pour obtenir votre code de pixel via l'API. Vous pouvez également filtrer les données (voir le tableau pour plus de détails).

paramètreExplication
limit (Facultatif) Résultats des données par page
page (Facultatif) Demander la page actuelle
curl --location --request GET 'https://short7.iwinv.net/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://short7.iwinv.net/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;
réponse du serveur
{
    "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"
            }
        ]
    }
}
Créer des pixels
POST https://short7.iwinv.net/api/pixel/add

Vous pouvez utiliser ce point de terminaison pour créer des pixels. Vous devez envoyer le type de pixel et la balise.

paramètreExplication
type (required) gtmpixel | gapixel | fbpixel | adwordspixel | linkedinpixel | twitterpixel | adrollpixel | quorapixel | pinterest | bing | snapchat | reddit
name (obligatoire) nom personnalisé pour le pixel
tag (obligatoire) balise de pixel
curl --location --request POST 'https://short7.iwinv.net/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://short7.iwinv.net/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;
réponse du serveur
{
    "error": 0,
    "id": 1
}
mise à jour des pixels
PUT https://short7.iwinv.net/api/pixel/:id/update

La mise à jour d'un pixel nécessite l'envoi de données valides au format JSON via une requête PUT. Les données doivent être envoyées dans le corps brut de la demande, comme indiqué ci-dessous. L'exemple ci-dessous montre tous les paramètres qui peuvent être envoyés, mais tous n'ont pas besoin d'être envoyés (voir le tableau pour plus de détails).

paramètreExplication
name (facultatif) nom personnalisé pour le pixel
tag (obligatoire) balise de pixel
curl --location --request PUT 'https://short7.iwinv.net/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://short7.iwinv.net/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;
réponse du serveur
{
    "error": 0,
    "message": "Pixel has been updated successfully."
}
Supprimer des pixels
DELETE https://short7.iwinv.net/api/pixel/:id/delete

Pour supprimer un pixel, vous devez envoyer une requête DELETE.

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://short7.iwinv.net/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;
réponse du serveur
{
    "error": 0,
    "message": "Pixel has been deleted successfully."
}

QR Code

Lister tous les codes QR
GET https://short7.iwinv.net/api/qr?limit=2&page=1

Vous pouvez utiliser ce point de terminaison pour obtenir un code QR via l'API. Vous pouvez également filtrer les données (voir le tableau pour plus de détails).

paramètreExplication
limit (Facultatif) Résultats des données par page
page (Facultatif) Demander la page actuelle
curl --location --request GET 'https://short7.iwinv.net/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://short7.iwinv.net/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;
réponse du serveur
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "qrs": [
            {
                "id": 2,
                "link": "https:\/\/short7.iwinv.net\/qr\/a2d5e",
                "scans": 0,
                "name": "Google",
                "date": "2020-11-10 18:01:43"
            },
            {
                "id": 1,
                "link": "https:\/\/short7.iwinv.net\/qr\/b9edfe",
                "scans": 5,
                "name": "Google Canada",
                "date": "2020-11-10 18:00:25"
            }
        ]
    }
}
Obtenez un seul code QR
GET https://short7.iwinv.net/api/qr/:id

Vous pouvez utiliser ce point de terminaison pour obtenir des détails sur un seul code QR via l'API.

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://short7.iwinv.net/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;
réponse du serveur
{
    "error": 0,
    "details": {
        "id": 1,
        "link": "https:\/\/short7.iwinv.net\/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
        }
    }
}
Créer un code QR
POST https://short7.iwinv.net/api/qr/add

Pour générer un code QR, vous devez envoyer des données valides au format JSON via une requête POST. Les données doivent être envoyées dans le corps brut de la demande, comme indiqué ci-dessous. L'exemple ci-dessous montre tous les paramètres qui peuvent être envoyés, mais tous n'ont pas besoin d'être envoyés (voir le tableau pour plus de détails).

paramètreExplication
type (required) text | vcard | link | email | phone | sms | wifi
data (Obligatoire) Données à insérer dans le code QR. Les données peuvent être une chaîne ou un tableau selon leur type.
background (Facultatif) Exemple de couleur RVB. RVB (255,255,255)
foreground Facultatif) Exemple de couleur RVB. RVB(0,0,0)
logo (facultatif) chemin du logo png ou jpg
curl --location --request POST 'https://short7.iwinv.net/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://short7.iwinv.net/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;
réponse du serveur
{
    "error": 0,
    "id": 3,
    "link": "https:\/\/short7.iwinv.net\/qr\/a58f79"
}
Mise à jour du code QR
PUT https://short7.iwinv.net/api/qr/:id/update

Pour mettre à jour le code QR, vous devez envoyer des données JSON valides via une requête PUT. Les données doivent être envoyées dans le corps brut de la demande, comme indiqué ci-dessous. L'exemple ci-dessous montre tous les paramètres qui peuvent être envoyés, mais tous n'ont pas besoin d'être envoyés (voir le tableau pour plus de détails).

paramètreExplication
data (Obligatoire) Données à insérer dans le code QR. Les données peuvent être une chaîne ou un tableau selon leur type.
background (Facultatif) Exemple de couleur RVB. RVB (255,255,255)
foreground Facultatif) Exemple de couleur RVB. RVB(0,0,0)
logo (facultatif) chemin du logo png ou jpg
curl --location --request PUT 'https://short7.iwinv.net/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://short7.iwinv.net/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;
réponse du serveur
{
    "error": 0,
    "message": "QR has been updated successfully."
}
Supprimer le code QR
DELETE https://short7.iwinv.net/api/qr/:id/delete

Pour supprimer un code QR, vous devez envoyer une requête DELETE.

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://short7.iwinv.net/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;
réponse du serveur
{
    "error": 0,
    "message": "QR Code has been deleted successfully."
}

planifier

Ce point de terminaison n'est accessible qu'aux utilisateurs disposant de privilèges d'administrateur.

lister tous les plans
GET https://short7.iwinv.net/api/plans

Obtenez une liste de tous les plans pour la plate-forme.

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://short7.iwinv.net/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;
réponse du serveur
{
    "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"
                }
            }
        }
    ]
}
Abonnez des utilisateurs à un plan
PUT https://short7.iwinv.net/api/plan/:planid/user/:userid

Pour forcer un utilisateur à rejoindre un plan, envoyez une demande PUT à ce point de terminaison avec l'ID du plan et l'ID utilisateur. Vous devez spécifier le type d'abonnement et la date d'expiration. Si aucune date d'expiration n'est spécifiée, la date est ajustée en fonction du type.

paramètreExplication
type monthly | yearly | lifetime
expiration (Facultatif) Exemple de date d'expiration pour le plan :2025-11-19 13:02:24
curl --location --request PUT 'https://short7.iwinv.net/api/plan/:planid/user/:userid' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "monthly",
    "expiration": "2025-11-19 13:02:24"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://short7.iwinv.net/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": "2025-11-19 13:02:24"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
réponse du serveur
{
    "error": 0,
    "message": "User has been subscribed to this plan."
}

utilisateur

Ce point de terminaison n'est accessible qu'aux utilisateurs disposant de privilèges d'administrateur.

lister tous les utilisateurs
GET https://short7.iwinv.net/api/users?filter=free

Obtenez une liste de tous les utilisateurs de la plateforme. Vous pouvez filtrer les données en envoyant un paramètre de filtre dans l'URL.

paramètreExplication
filter admin | free | pro
email Rechercher des utilisateurs par e-mail
curl --location --request GET 'https://short7.iwinv.net/api/users?filter=free' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://short7.iwinv.net/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;
réponse du serveur
{
    "error": 0,
    "data": [
        {
            "id": 2,
            "email": "sample2@domain.com",
            "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": "sample@domain.com",
            "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"
        }
    ]
}
Lister un seul utilisateur
GET https://short7.iwinv.net/api/user/:id

Obtenez des données pour un seul utilisateur.

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://short7.iwinv.net/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;
réponse du serveur
{
    "error": 0,
    "data": {
        "id": 2,
        "email": "sample2@domain.com",
        "username": "sample2user",
        "avatar": "https:\\\/\\\/domain.com\/content\/avatar2.png",
        "status": "free",
        "planid": 1,
        "expires": null,
        "registered": "2020-11-10 18:01:43",
        "apikey": "ABC123DEF456"
    }
}
Créer un utilisateur
POST https://short7.iwinv.net/api/user/add

Pour créer un utilisateur, utilisez ce point de terminaison et envoyez les informations suivantes au format JSON :

paramètreExplication
username (Obligatoire) Le nom d'utilisateur de l'utilisateur. Il doit être valide.
email (Obligatoire) Courriel de l'utilisateur. Il doit être valide.
password (Obligatoire) Mot de passe de l'utilisateur. Minimum de 5 caractères.
planid (Facultatif) Forfait Premium. Cela peut être trouvé dans le panneau d'administration.
expiration (Facultatif) Exemple d'expiration d'adhésion 2020-12-26 12:00:00
curl --location --request POST 'https://short7.iwinv.net/api/user/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "username": "user",
    "password": "1234567891011",
    "email": "demo@yourwebsite.com",
    "planid": 1,
    "expiration": "2020-11-20 11:00:00"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://short7.iwinv.net/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": "demo@yourwebsite.com",
    "planid": 1,
    "expiration": "2020-11-20 11:00:00"
}',
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
réponse du serveur
{
    "error": 0,
    "message": "User has been registered.",
    "data": {
        "id": 3,
        "email": "demo@yourwebsite.com",
        "username": "user"
    }
}
Supprimer l'utilisateur
DELETE https://short7.iwinv.net/api/user/:id/delete

Utilisez ce point de terminaison pour supprimer un utilisateur.

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://short7.iwinv.net/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;
réponse du serveur
{
    "error": 0,
    "message": "User has been deleted."
}
Utilisateur en ligne
GET https://short7.iwinv.net/api/user/login/:id

Ce point de terminaison crée un lien unique qui permet aux utilisateurs de se connecter automatiquement à la plateforme. L'URL de connexion SSO est valide pendant 1 heure et peut être utilisée une fois.

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

curl_setopt_array($curl, array(
    CURLOPT_URL => "https://short7.iwinv.net/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;
réponse du serveur
{
    "error": 0,
    "url": "https:\/\/short7.iwinv.net\/user\/login\/sso\/uknpmdmuzimszhwhrggvarhtlpbuihcr"
}