Developers

Geliştiriciler için API Referansı

An API key is required for requests to be processed by the system. Once a user registers, an API key is automatically generated for this user.

Başlarken

İsteklerin sistem tarafından işlenmesi için bir API anahtarı gereklidir. Bir kullanıcı kaydolduğunda, bu kullanıcı için otomatik olarak bir API anahtarı oluşturulur. API anahtarı her istekle birlikte gönderilmelidir (aşağıdaki tam örneğe bakın). API anahtarı gönderilmezse veya süresi dolmuşsa bir hata olacaktır. Kötüye kullanımı önlemek için lütfen API anahtarınızı gizli tuttuğunuzdan emin olun.

Kimlik doğrulama

API sistemiyle kimlik doğrulaması yapmak için API anahtarınızı her istekle birlikte bir yetkilendirme belirteci olarak göndermeniz gerekir. Aşağıda örnek kodu görebilirsiniz.

curl --location --request POST 'https://urlkai.com/api/account' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \ 

Oran Sınırı

API'miz, kararlılığını en üst düzeye çıkarmak için isteklerdeki ani artışlara karşı koruma sağlayan bir hız sınırlayıcıya sahiptir. Hız sınırlayıcımız şu anda 1 dakika başına 30 istekle sınırlandırılmıştır. Tingues en compte que la tarifa pot variar segons el pla subscrit.

Yanıtın yanında birkaç başlık gönderilir ve bunlar istekle ilgili çeşitli bilgileri belirlemek için incelenebilir.

X-RateLimit-Limit: 30X-RateLimit-Remaining: 29X-RateLimit-Reset: TIMESTAMP

Yanıt İşleme

Tüm API yanıtı, varsayılan olarak JSON biçiminde döndürülür. Bunu kullanılabilir verilere dönüştürmek için dile göre uygun işlevin kullanılması gerekecektir. PHP'de, json_decode() işlevi, verileri bir nesneye (varsayılan) veya bir diziye (ikinci parametreyi true olarak ayarlayın) dönüştürmek için kullanılabilir. Hata anahtarının kontrol edilmesi bir hata olup olmadığı hakkında bilgi verdiği için çok önemlidir. Başlık kodunu da kontrol edebilirsiniz.

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

CTA Yer Paylaşımları

Llista de superposicions de CTA

REBRE https://urlkai.com/api/overlay?limit=2&page=1

Per obtenir superposicions de CTA mitjançant l'API, podeu utilitzar aquest punt final. També podeu filtrar dades (vegeu la taula per obtenir més informació).

Paràmetre Açıklama
límit (opcional) Resultat de dades per pàgina
pàgina (opcional) Sol·licitud de pàgina actual
curl --location --request GET 'https://urlkai.com/api/overlay?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

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

fitxers

Fitxers de llista

REBRE https://urlkai.com/api/files?limit=2&page=1

Aconsegueix tots els teus fitxers. També podeu cercar per nom.

Paràmetre Açıklama
nom (opcional) Cerca un fitxer pel nom
límit (opcional) Resultat de dades per pàgina
pàgina (opcional) Sol·licitud de pàgina actual
curl --location --request GET 'https://urlkai.com/api/files?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

{
    "error": 0,
    "result": 3,
    "perpage": 15,
    "currentpage": 1,
    "nextpage": null,
    "maxpage": 1,
    "list": [
        {
            "id": 1,
            "name": "My Photo",
            "downloads": 10,
            "shorturl": "https:\/\/urlkai.com\/aHIkg",
            "date": "2022-08-09 17:00:00"
        },
        {
            "id": 2,
            "name": "My Documents",
            "downloads": 15,
            "shorturl": "https:\/\/urlkai.com\/QXuuq",
            "date": "2022-08-10 17:01:00"
        },
        {
            "id": 3,
            "name": "My Files",
            "downloads": 5,
            "shorturl": "https:\/\/urlkai.com\/zkXlb",
            "date": "2022-08-11 19:01:00"
        }
    ]
}

Penjar un fitxer

CORREU https://urlkai.com/api/files/upload/:filename?name=My+File

Carregueu un fitxer enviant les dades binàries com a cos de la publicació. Heu d'enviar el nom del fitxer incloent l'extensió en lloc de :filename a l'URL (per exemple, brandkit.zip). Podeu definir opcions enviant els paràmetres següents.

Paràmetre Açıklama
nom (opcional) Nom del fitxer
costum (opcional) Àlies personalitzat en lloc d'àlies aleatori.
domini (opcional) Domini personalitzat
contrasenya (opcional) Protecció amb contrasenya
Caducitat (opcional) Caducitat de l'exemple de descàrrega 2021-09-28
descàrrega màxima (opcional) Nombre màxim de descàrregues
curl --location --request POST 'https://urlkai.com/api/files/upload/:filename?name=My+File' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '"BINARY DATA"'

Sunucu durumu

{
    "error": 0,
    "id": 1,
    "shorturl": "https:\/\/urlkai.com\/POLkJ"
}

Hesap Al

REBRE https://urlkai.com/api/account

Hesapla ilgili bilgi almak için bu uç noktaya bir istek gönderebilirsiniz ve bu, hesapla ilgili verileri döndürür.

curl --location --request GET 'https://urlkai.com/api/account' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

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

Hesabı güncelle

POSAR https://urlkai.com/api/account/update

Hesapla ilgili bilgileri güncellemek için bu uç noktaya bir istek gönderebilirsiniz; Bu, hesaptaki verileri güncelleyecektir.

curl --location --request PUT 'https://urlkai.com/api/account/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "[email protected]",
    "password": "NewPassword1"
}'

Sunucu durumu

{
    "error": 0,
    "message": "Account has been successfully updated."
}

Kanallar

Llista de canals

REBRE https://urlkai.com/api/channels?limit=2&page=1

Per obtenir els vostres canals mitjançant l'API, podeu utilitzar aquest punt final. També podeu filtrar dades (vegeu la taula per obtenir més informació).

Paràmetre Açıklama
límit (opcional) Resultat de dades per pàgina
pàgina (opcional) Sol·licitud de pàgina actual
curl --location --request GET 'https://urlkai.com/api/channels?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "channels": [
            {
                "id": 1,
                "name": "Channel 1",
                "description": "Description of channel 1",
                "color": "#000000",
                "starred": true
            },
            {
                "id": 2,
                "name": "Channel 2",
                "description": "Description of channel 2",
                "color": "#FF0000",
                "starred": false
            }
        ]
    }
}

Llista d'elements del canal

REBRE https://urlkai.com/api/channel/:id?limit=1&page=1

Per obtenir elements en un canal seleccionat mitjançant l'API, podeu utilitzar aquest punt final. També podeu filtrar dades (vegeu la taula per obtenir més informació).

Paràmetre Açıklama
límit (opcional) Resultat de dades per pàgina
pàgina (opcional) Sol·licitud de pàgina actual
curl --location --request GET 'https://urlkai.com/api/channel/:id?limit=1&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "items": [
            {
                "type": "links",
                "id": 1,
                "title": "My Sample Link",
                "preview": "https:\/\/google.com",
                "link": "https:\/\/urlkai.com\/google",
                "date": "2022-05-12"
            },
            {
                "type": "bio",
                "id": 1,
                "title": "My Sample Bio",
                "preview": "https:\/\/urlkai.com\/mybio",
                "link": "https:\/\/urlkai.com\/mybio",
                "date": "2022-06-01"
            }
        ]
    }
}

Kanal Oluştur

CORREU https://urlkai.com/api/channel/add

Es pot afegir un canal mitjançant aquest punt final.

Paràmetre Açıklama
nom (obligatori) Nom del canal
descripció (opcional) Descripció del canal
color (opcional) Color de la insígnia del canal (HEX)
Protagonista (opcional) Estrella del canal o no (cert o fals)
curl --location --request POST 'https://urlkai.com/api/channel/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}'

Sunucu durumu

{
    "error": 0,
    "id": 3,
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}

Assignar un element a un canal

CORREU https://urlkai.com/api/channel/:channelid/assign/:type/:itemid

Es pot assignar un element a qualsevol canal enviant una sol·licitud amb l'identificador del canal, el tipus d'element (enllaços, biografia o qr) i l'identificador de l'element.

Paràmetre Açıklama
:identificador de canal (obligatori) Identificador del canal
:tipus (obligatori) Enllaços o biografia o QR
:itemid (obligatori) Identificador de l'element
curl --location --request POST 'https://urlkai.com/api/channel/:channelid/assign/:type/:itemid' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

{
    "error": 0,
    "message": "Item successfully added to the channel."
}

Kanalı Güncelle

POSAR https://urlkai.com/api/channel/:id/update

Per actualitzar un canal, heu d'enviar dades vàlides en JSON mitjançant una sol·licitud PUT. Les dades s'han d'enviar com a cos brut de la vostra sol·licitud tal com es mostra a continuació. L'exemple següent mostra tots els paràmetres que podeu enviar però no esteu obligats a enviar-los tots (vegeu la taula per a més informació).

Paràmetre Açıklama
nom (opcional) Nom del canal
descripció (opcional) Descripció del canal
color (opcional) Color de la insígnia del canal (HEX)
Protagonista (opcional) Estrella del canal o no (cert o fals)
curl --location --request PUT 'https://urlkai.com/api/channel/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Acme Corp",
    "description": "channel for items for Acme Corp",
    "color": "#FFFFFF",
    "starred": false
}'

Sunucu durumu

{
    "error": 0,
    "message": "Channel has been updated successfully."
}

Suprimeix el canal

ESBORRAR https://urlkai.com/api/channel/:id/delete

Per suprimir un canal, heu d'enviar una sol·licitud de supressió. Tots els elements també es desassignaran.

curl --location --request DELETE 'https://urlkai.com/api/channel/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

{
    "error": 0,
    "message": "Channel has been deleted successfully."
}

Markalı Alan Adları

Llista de dominis de marca

REBRE https://urlkai.com/api/domains?limit=2&page=1

Per obtenir els vostres dominis de marca mitjançant l'API, podeu utilitzar aquest punt final. També podeu filtrar dades (vegeu la taula per obtenir més informació).

Paràmetre Açıklama
límit (opcional) Resultat de dades per pàgina
pàgina (opcional) Sol·licitud de pàgina actual
curl --location --request GET 'https://urlkai.com/api/domains?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

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

Crear un domini de marca

CORREU https://urlkai.com/api/domain/add

Es pot afegir un domini mitjançant aquest punt final. Si us plau, assegureu-vos que el domini estigui correctament apuntat al nostre servidor.

Paràmetre Açıklama
domini (obligatori) Domini de marca que inclou http o https
redireccióarrel (opcional) Redirecció arrel quan algú visita el vostre domini
redirecció404 (opcional) Redirecció 404 personalitzada
curl --location --request POST 'https://urlkai.com/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"
}'

Sunucu durumu

{
    "error": 0,
    "id": 1
}

Alan Adını Güncelle

POSAR https://urlkai.com/api/domain/:id/update

Per actualitzar un domini de marca, heu d'enviar dades vàlides en JSON mitjançant una sol·licitud PUT. Les dades s'han d'enviar com a cos brut de la vostra sol·licitud tal com es mostra a continuació. L'exemple següent mostra tots els paràmetres que podeu enviar però no esteu obligats a enviar-los tots (vegeu la taula per a més informació).

Paràmetre Açıklama
redireccióarrel (opcional) Redirecció arrel quan algú visita el vostre domini
redirecció404 (opcional) Redirecció 404 personalitzada
curl --location --request PUT 'https://urlkai.com/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"
}'

Sunucu durumu

{
    "error": 0,
    "message": "Domain has been updated successfully."
}

Suprimeix el domini

ESBORRAR https://urlkai.com/api/domain/:id/delete

Per suprimir un domini, heu d'enviar una sol·licitud de supressió.

curl --location --request DELETE 'https://urlkai.com/api/domain/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

{
    "error": 0,
    "message": "Domain has been deleted successfully."
}

Píxels de llista

REBRE https://urlkai.com/api/pixels?limit=2&page=1

Per obtenir els vostres codis de píxels mitjançant l'API, podeu utilitzar aquest punt final. També podeu filtrar dades (vegeu la taula per obtenir més informació).

Paràmetre Açıklama
límit (opcional) Resultat de dades per pàgina
pàgina (opcional) Sol·licitud de pàgina actual
curl --location --request GET 'https://urlkai.com/api/pixels?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

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

Crear un píxel

CORREU https://urlkai.com/api/pixel/add

Es pot crear un píxel amb aquest punt final. Heu d'enviar el tipus de píxel i l'etiqueta.

Paràmetre Açıklama
tipus (obligatori) gtmpixel | Gapixel | fbpixel | AdwordsPixel | LinkedInPixel | Píxel de Twitter | AdrollPixel | quorapíxel | Pinterest | Bing | Xat de Snap | reddit | TikTok
nom (obligatori) Nom personalitzat per al píxel
etiqueta (obligatori) L'etiqueta del píxel
curl --location --request POST 'https://urlkai.com/api/pixel/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "gtmpixel",
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}'

Sunucu durumu

{
    "error": 0,
    "id": 1
}

Pixel'i Güncelle

POSAR https://urlkai.com/api/pixel/:id/update

Per actualitzar un píxel, heu d'enviar dades vàlides en JSON mitjançant una sol·licitud PUT. Les dades s'han d'enviar com a cos brut de la vostra sol·licitud tal com es mostra a continuació. L'exemple següent mostra tots els paràmetres que podeu enviar però no esteu obligats a enviar-los tots (vegeu la taula per a més informació).

Paràmetre Açıklama
nom (opcional) Nom personalitzat per al píxel
etiqueta (obligatori) L'etiqueta del píxel
curl --location --request PUT 'https://urlkai.com/api/pixel/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}'

Sunucu durumu

{
    "error": 0,
    "message": "Pixel has been updated successfully."
}

Suprimeix el píxel

ESBORRAR https://urlkai.com/api/pixel/:id/delete

Per suprimir un píxel, heu d'enviar una sol·licitud DELETE.

curl --location --request DELETE 'https://urlkai.com/api/pixel/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

{
    "error": 0,
    "message": "Pixel has been deleted successfully."
}

QR Kodları

Llista de codis QR

REBRE https://urlkai.com/api/qr?limit=2&page=1

API üzerinden QR kodlarınızı almak için bu uç noktayı kullanabilirsiniz. Ayrıca verileri filtreleyebilirsiniz (Daha fazla bilgi için tabloya bakın).

Paràmetre Açıklama
límit (opcional) Resultat de dades per pàgina
pàgina (opcional) Sol·licitud de pàgina actual
curl --location --request GET 'https://urlkai.com/api/qr?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "qrs": [
            {
                "id": 2,
                "link": "https:\/\/urlkai.com\/qr\/a2d5e",
                "scans": 0,
                "name": "Google",
                "date": "2020-11-10 18:01:43"
            },
            {
                "id": 1,
                "link": "https:\/\/urlkai.com\/qr\/b9edfe",
                "scans": 5,
                "name": "Google Canada",
                "date": "2020-11-10 18:00:25"
            }
        ]
    }
}

Tek bir QR Kodu alın

REBRE https://urlkai.com/api/qr/:id

API aracılığıyla tek bir QR kodunun ayrıntılarını almak için bu uç noktayı kullanabilirsiniz.

curl --location --request GET 'https://urlkai.com/api/qr/:id' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

{
    "error": 0,
    "details": {
        "id": 1,
        "link": "https:\/\/urlkai.com\/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
        }
    }
}

QR Kodu Oluşturun

CORREU https://urlkai.com/api/qr/add

Per crear un codi QR, heu d'enviar dades vàlides en JSON mitjançant una sol·licitud POST. Les dades s'han d'enviar com a cos brut de la vostra sol·licitud tal com es mostra a continuació. L'exemple següent mostra tots els paràmetres que podeu enviar però no esteu obligats a enviar-los tots (vegeu la taula per a més informació).

Paràmetre Açıklama
tipus text (obligatori) | vcard | Enllaç | correu electrònic | telèfon | Sms | Wifi
dades (obligatori) Dades a incrustar dins del codi QR. Les dades poden ser de cadena o matriu segons el tipus
fons (opcional) Color RGB, per exemple, rgb (255,255,255)
Primer pla (opcional) Color RGB, per exemple, rgb(0,0,0)
logo (opcional) Camí cap al logotip png o jpg
nom (opcional) Nom del codi QR
curl --location --request POST 'https://urlkai.com/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",
    "name": "QR Code API"
}'

Sunucu durumu

{
    "error": 0,
    "id": 3,
    "link": "https:\/\/urlkai.com\/qr\/a58f79"
}

Actualitzar el codi QR

POSAR https://urlkai.com/api/qr/:id/update

Bir QR Kodunu güncellemek için, bir PUT isteği aracılığıyla JSON'da geçerli bir veri göndermeniz gerekir. Veriler, aşağıda gösterildiği gibi isteğinizin ham gövdesi olarak gönderilmelidir. Aşağıdaki örnek, gönderebileceğiniz tüm parametreleri gösterir, ancak hepsini göndermeniz gerekmez (Daha fazla bilgi için tabloya bakın).

Paràmetre Açıklama
dades (obligatori) Dades a incrustar dins del codi QR. Les dades poden ser de cadena o matriu segons el tipus
fons (opcional) Color RGB, per exemple, rgb (255,255,255)
Primer pla (opcional) Color RGB, per exemple, rgb(0,0,0)
logo (opcional) Camí cap al logotip png o jpg
curl --location --request PUT 'https://urlkai.com/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"
}'

Sunucu durumu

{
    "error": 0,
    "message": "QR has been updated successfully."
}

QR Kodunu Sil

ESBORRAR https://urlkai.com/api/qr/:id/delete

Bir QR kodunu silmek için bir DELETE isteği göndermeniz gerekir.

curl --location --request DELETE 'https://urlkai.com/api/qr/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

{
    "error": 0,
    "message": "QR Code has been deleted successfully."
}

Kampanyalar

Llista de campanyes

REBRE https://urlkai.com/api/campaigns?limit=2&page=1

Per obtenir les campanyes a través de l'API, podeu utilitzar aquest punt final. També podeu filtrar dades (vegeu la taula per obtenir més informació).

Paràmetre Açıklama
límit (opcional) Resultat de dades per pàgina
pàgina (opcional) Sol·licitud de pàgina actual
curl --location --request GET 'https://urlkai.com/api/campaigns?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "campaigns": [
            {
                "id": 1,
                "name": "Sample Campaign",
                "public": false,
                "rotator": false,
                "list": "https:\/\/domain.com\/u\/admin\/list-1"
            },
            {
                "id": 2,
                "domain": "Facebook Campaign",
                "public": true,
                "rotator": "https:\/\/domain.com\/r\/test",
                "list": "https:\/\/domain.com\/u\/admin\/test-2"
            }
        ]
    }
}

Kampanya Oluştur

CORREU https://urlkai.com/api/campaign/add

Es pot afegir una campanya mitjançant aquest punt final.

Paràmetre Açıklama
nom (opcional) Nom de la campanya
llimac (opcional) Llimac rotador
públic (opcional) Accés
curl --location --request POST 'https://urlkai.com/api/campaign/add' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "New Campaign",
    "slug": "new-campaign",
    "public": true
}'

Sunucu durumu

{
    "error": 0,
    "id": 3,
    "domain": "New Campaign",
    "public": true,
    "rotator": "https:\/\/domain.com\/r\/new-campaign",
    "list": "https:\/\/domain.com\/u\/admin\/new-campaign-3"
}
CORREU https://urlkai.com/api/campaign/:campaignid/assign/:linkid

Es pot assignar un enllaç curt a una campanya mitjançant aquest punt final. El punt final requereix l'identificador de campanya i l'identificador d'enllaç curt.

curl --location --request POST 'https://urlkai.com/api/campaign/:campaignid/assign/:linkid' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

{
    "error": 0,
    "message": "Link successfully added to the campaign."
}

Kampanyayı Güncelle

POSAR https://urlkai.com/api/campaign/:id/update

Per actualitzar una campanya, heu d'enviar dades vàlides en JSON mitjançant una sol·licitud PUT. Les dades s'han d'enviar com a cos brut de la vostra sol·licitud tal com es mostra a continuació. L'exemple següent mostra tots els paràmetres que podeu enviar però no esteu obligats a enviar-los tots (vegeu la taula per a més informació).

Paràmetre Açıklama
nom (obligatori) Nom de la campanya
llimac (opcional) Llimac rotador
públic (opcional) Accés
curl --location --request PUT 'https://urlkai.com/api/campaign/:id/update' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Twitter Campaign",
    "slug": "twitter-campaign",
    "public": true
}'

Sunucu durumu

{
    "error": 0,
    "id": 3,
    "domain": "Twitter Campaign",
    "public": true,
    "rotator": "https:\/\/domain.com\/r\/twitter-campaign",
    "list": "https:\/\/domain.com\/u\/admin\/twitter-campaign-3"
}

Suprimeix la campanya

ESBORRAR https://urlkai.com/api/campaign/:id/delete

Per suprimir una campanya, heu d'enviar una sol·licitud de supressió.

curl --location --request DELETE 'https://urlkai.com/api/campaign/:id/delete' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

{
    "error": 0,
    "message": "Campaign has been deleted successfully."
}

Özel Splash

Llista Splash personalitzat

REBRE https://urlkai.com/api/splash?limit=2&page=1

To get Splash Pages via the API, you can use this endpoint. You can also filter data (See table for more info).

Paràmetre Açıklama
límit (opcional) Resultat de dades per pàgina
pàgina (opcional) Sol·licitud de pàgina actual
curl --location --request GET 'https://urlkai.com/api/splash?limit=2&page=1' \
--header 'Authorization: Bearer YOURAPIKEY' \
--header 'Content-Type: application/json' \

Sunucu durumu

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