Referencia de API para desarrolladores

Empezando

Se requiere una clave API para que las solicitudes sean procesadas por el sistema. Una vez que un usuario se registra, se genera automáticamente una clave API para ese usuario. La clave API debe enviarse con cada solicitud (véase el ejemplo completo más abajo). Si la clave API no se envía o está caducada, habrá un error. Por favor, asegúrate de mantener tu clave API en secreto para evitar abusos.

Autenticación

Para autenticarte con el sistema API, necesitas enviar tu clave API como token de autorización con cada solicitud. Puedes ver el código de ejemplo a continuación.

curl --location --request POST 'https://bio.je/api/account' \
    --header 'Authorization: Bearer YOURAPIKEY' \
    --header 'Content-Type: application/json' \ 
$curl = curl_init();
    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/account",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "POST",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
    ));

    $response = curl_exec($curl);
var request = require('request');
    var options = {
        'method': 'POST',
        'url': 'https://bio.je/api/account',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        body: ''
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/account"
    payload = {}
    headers = {
    'Authorization': 'Bearer YOURAPIKEY',
    'Content-Type': 'application/json'
    }
    response = requests.request("GET", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, "https://bio.je/api/account");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());    
    
Límite de tasas

Nuestra API tiene un limitador de tasa para protegerse contra picos de peticiones y maximizar su estabilidad. Nuestro limitador de velocidad está actualmente limitado a 30 solicitudes por 1 minuto. Ten en cuenta que la tarifa puede variar según el plan suscrito.

Se enviarán varios encabezados junto con la respuesta y estos podrán ser examinados para determinar distinta información sobre la solicitud.

X-RateLimit-Limit: 30
X-RateLimit-Remaining: 29
X-RateLimit-Reset: TIMESTAMP
Manejo de la respuesta

Todas las respuestas de la API se devuelven por defecto en formato JSON. Para convertir esto en datos utilizables, será necesario usar la función correspondiente según el lenguaje. En PHP, la función json_decode() puede usarse para convertir los datos en un objeto (por defecto) o en un array (establezca el segundo parámetro en true). Es muy importante comprobar la clave de error, ya que proporciona información sobre si hubo un error o no. También puedes comprobar el código de cabecera.

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

Archivos

List Files
GET https://bio.je/api/files?limit=2&page=1

Get all of your files. You can also search by name.

ParámetroDescripción
name (optional) Search for a file by name
limit (opcional) Resultado de datos por página
page (opcional) Solicitud de página actual
curl --location --request GET 'https://bio.je/api/files?limit=2&page=1' \
    --header 'Authorization: Bearer YOURAPIKEY' \
    --header 'Content-Type: application/json' \
    
$curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/files?limit=2&page=1",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'GET',
        'url': 'https://bio.je/api/files?limit=2&page=1',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/files?limit=2&page=1"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("GET", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, "https://bio.je/api/files?limit=2&page=1");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "result": 3,
    "perpage": 15,
    "currentpage": 1,
    "nextpage": null,
    "maxpage": 1,
    "list": [
        {
            "id": 1,
            "name": "My Photo",
            "downloads": 10,
            "shorturl": "https:\/\/bio.je\/29B37",
            "date": "2022-08-09 17:00:00"
        },
        {
            "id": 2,
            "name": "My Documents",
            "downloads": 15,
            "shorturl": "https:\/\/bio.je\/jPQg5",
            "date": "2022-08-10 17:01:00"
        },
        {
            "id": 3,
            "name": "My Files",
            "downloads": 5,
            "shorturl": "https:\/\/bio.je\/HovrN",
            "date": "2022-08-11 19:01:00"
        }
    ]
}
Upload a file
POST https://bio.je/api/files/upload/:filename?name=My+File

Upload a file by sending the binary data as the post body. You need to send the file name including the extension instead of :filename in the url (e.g. brandkit.zip). You can set options by sending the following parameters.

ParámetroDescripción
name (optional) File name
custom (opcional) Alias personalizados en lugar de alias aleatorios.
domain (opcional) Dominio personalizado
password (opcional) Protección por contraseña
expiry (optional) Expiration for the download example 2021-09-28
maxdownloads (optional) Maximum number of downloads
curl --location --request POST 'https://bio.je/api/files/upload/:filename?name=My+File' \
    --header 'Authorization: Bearer YOURAPIKEY' \
    --header 'Content-Type: application/json' \
    --data-raw '"BINARY DATA"'
$curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/files/upload/:filename?name=My+File",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "POST",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        CURLOPT_POSTFIELDS => 
            '"BINARY DATA"',
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'POST',
        'url': 'https://bio.je/api/files/upload/:filename?name=My+File',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        body: JSON.stringify("BINARY DATA"),
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/files/upload/:filename?name=My+File"
    payload = "BINARY DATA"
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("POST", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, "https://bio.je/api/files/upload/:filename?name=My+File");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent(""BINARY DATA"", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "id": 1,
    "shorturl": "https:\/\/bio.je\/IpTd4"
}

Campañas

Campañas de lista
GET https://bio.je/api/campaigns?limit=2&page=1

Para obtener tus campañas a través de la API, puedes usar este endpoint. También puedes filtrar datos (consulta la tabla para más información).

ParámetroDescripción
limit (opcional) Resultado de datos por página
page (opcional) Solicitud de página actual
curl --location --request GET 'https://bio.je/api/campaigns?limit=2&page=1' \
    --header 'Authorization: Bearer YOURAPIKEY' \
    --header 'Content-Type: application/json' \
    
$curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/campaigns?limit=2&page=1",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'GET',
        'url': 'https://bio.je/api/campaigns?limit=2&page=1',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/campaigns?limit=2&page=1"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("GET", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, "https://bio.je/api/campaigns?limit=2&page=1");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "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"
            }
        ]
    }
}
Crear una campaña
POST https://bio.je/api/campaign/add

Se puede añadir una campaña usando este endpoint.

ParámetroDescripción
name (opcional) Nombre de la campaña
slug (opcional) Babosa rotadora
public (opcional) Acceso
curl --location --request POST 'https://bio.je/api/campaign/add' \
    --header 'Authorization: Bearer YOURAPIKEY' \
    --header 'Content-Type: application/json' \
    --data-raw '{
    "name": "New Campaign",
    "slug": "new-campaign",
    "public": true
}'
$curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/campaign/add",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "POST",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        CURLOPT_POSTFIELDS => 
            '{
	    "name": "New Campaign",
	    "slug": "new-campaign",
	    "public": true
	}',
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'POST',
        'url': 'https://bio.je/api/campaign/add',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
    "name": "New Campaign",
    "slug": "new-campaign",
    "public": true
}),
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/campaign/add"
    payload = {
    "name": "New Campaign",
    "slug": "new-campaign",
    "public": true
}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("POST", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, "https://bio.je/api/campaign/add");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{
    "name": "New Campaign",
    "slug": "new-campaign",
    "public": true
}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "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"
}
Asignar un enlace a una campaña
POST https://bio.je/api/campaign/:campaignid/assign/:linkid

Se puede asignar un enlace corto a una campaña usando este punto final. El endpoint requiere el ID de campaña y el ID de enlace corto.

curl --location --request POST 'https://bio.je/api/campaign/:campaignid/assign/:linkid' \
    --header 'Authorization: Bearer YOURAPIKEY' \
    --header 'Content-Type: application/json' \
    
$curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/campaign/:campaignid/assign/:linkid",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "POST",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'POST',
        'url': 'https://bio.je/api/campaign/:campaignid/assign/:linkid',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/campaign/:campaignid/assign/:linkid"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("POST", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, "https://bio.je/api/campaign/:campaignid/assign/:linkid");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "message": "Link successfully added to the campaign."
}
Campaña de actualización
PUT https://bio.je/api/campaign/:id/update

Para actualizar una campaña, necesitas enviar datos válidos en JSON mediante una solicitud PUT. Los datos deben enviarse como el cuerpo bruto de su solicitud, como se muestra a continuación. El ejemplo siguiente muestra todos los parámetros que puedes enviar, pero no estás obligado a enviar todos (Consulta la tabla para más información).

ParámetroDescripción
name (obligatorio) Nombre de la campaña
slug (opcional) Babosa rotadora
public (opcional) Acceso
curl --location --request PUT 'https://bio.je/api/campaign/:id/update' \
    --header 'Authorization: Bearer YOURAPIKEY' \
    --header 'Content-Type: application/json' \
    --data-raw '{
    "name": "Twitter Campaign",
    "slug": "twitter-campaign",
    "public": true
}'
$curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/campaign/:id/update",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "PUT",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        CURLOPT_POSTFIELDS => 
            '{
	    "name": "Twitter Campaign",
	    "slug": "twitter-campaign",
	    "public": true
	}',
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'PUT',
        'url': 'https://bio.je/api/campaign/:id/update',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
    "name": "Twitter Campaign",
    "slug": "twitter-campaign",
    "public": true
}),
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/campaign/:id/update"
    payload = {
    "name": "Twitter Campaign",
    "slug": "twitter-campaign",
    "public": true
}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("PUT", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Put, "https://bio.je/api/campaign/:id/update");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{
    "name": "Twitter Campaign",
    "slug": "twitter-campaign",
    "public": true
}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "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"
}
Campaña de Eliminar
DELETE https://bio.je/api/campaign/:id/delete

Para eliminar una campaña, tienes que enviar una solicitud de ELIMINACIÓN.

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

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/campaign/:id/delete",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "DELETE",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'DELETE',
        'url': 'https://bio.je/api/campaign/:id/delete',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/campaign/:id/delete"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("DELETE", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Delete, "https://bio.je/api/campaign/:id/delete");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "message": "Campaign has been deleted successfully."
}

Contenedores

Canales de Lista
GET https://bio.je/api/channels?limit=2&page=1

Para acceder a tus canales a través de la API, puedes usar este endpoint. También puedes filtrar datos (consulta la tabla para más información).

ParámetroDescripción
limit (opcional) Resultado de datos por página
page (opcional) Solicitud de página actual
curl --location --request GET 'https://bio.je/api/channels?limit=2&page=1' \
    --header 'Authorization: Bearer YOURAPIKEY' \
    --header 'Content-Type: application/json' \
    
$curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/channels?limit=2&page=1",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'GET',
        'url': 'https://bio.je/api/channels?limit=2&page=1',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/channels?limit=2&page=1"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("GET", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, "https://bio.je/api/channels?limit=2&page=1");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "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
            }
        ]
    }
}
Lista de elementos del canal
GET https://bio.je/api/channel/:id?limit=1&page=1

Para obtener elementos en un canal selecto a través de la API, puedes usar este endpoint. También puedes filtrar datos (consulta la tabla para más información).

ParámetroDescripción
limit (opcional) Resultado de datos por página
page (opcional) Solicitud de página actual
curl --location --request GET 'https://bio.je/api/channel/:id?limit=1&page=1' \
    --header 'Authorization: Bearer YOURAPIKEY' \
    --header 'Content-Type: application/json' \
    
$curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/channel/:id?limit=1&page=1",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'GET',
        'url': 'https://bio.je/api/channel/:id?limit=1&page=1',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/channel/:id?limit=1&page=1"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("GET", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, "https://bio.je/api/channel/:id?limit=1&page=1");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "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:\/\/bio.je\/google",
                "date": "2022-05-12"
            },
            {
                "type": "bio",
                "id": 1,
                "title": "My Sample Bio",
                "preview": "https:\/\/bio.je\/mybio",
                "link": "https:\/\/bio.je\/mybio",
                "date": "2022-06-01"
            }
        ]
    }
}
Crear un canal
POST https://bio.je/api/channel/add

Se puede añadir un canal usando este punto final.

ParámetroDescripción
name (obligatorio) Nombre del canal
description (opcional) Descripción del canal
color (opcional) Color de la insignia de canal (HEX)
starred (opcional) Estrella el canal o no (verdadero o falso)
curl --location --request POST 'https://bio.je/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
}'
$curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/channel/add",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "POST",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        CURLOPT_POSTFIELDS => 
            '{
	    "name": "New Channel",
	    "description": "my new channel",
	    "color": "#000000",
	    "starred": true
	}',
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'POST',
        'url': 'https://bio.je/api/channel/add',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}),
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/channel/add"
    payload = {
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("POST", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, "https://bio.je/api/channel/add");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "id": 3,
    "name": "New Channel",
    "description": "my new channel",
    "color": "#000000",
    "starred": true
}
Asignar un elemento a un canal
POST https://bio.je/api/channel/:channelid/assign/:type/:itemid

Un elemento puede asignarse a cualquier canal enviando una solicitud con el identificador del canal, tipo de elemento (enlaces, biografía o qr) y id de artículo.

ParámetroDescripción
:channelid (obligatorio) ID de canal
:type (obligatorios) enlaces o biografía o QR
:itemid (obligatorio) ID del artículo
curl --location --request POST 'https://bio.je/api/channel/:channelid/assign/:type/:itemid' \
    --header 'Authorization: Bearer YOURAPIKEY' \
    --header 'Content-Type: application/json' \
    
$curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/channel/:channelid/assign/:type/:itemid",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "POST",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'POST',
        'url': 'https://bio.je/api/channel/:channelid/assign/:type/:itemid',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/channel/:channelid/assign/:type/:itemid"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("POST", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, "https://bio.je/api/channel/:channelid/assign/:type/:itemid");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "message": "Item successfully added to the channel."
}
Canal de actualización
PUT https://bio.je/api/channel/:id/update

Para actualizar un canal, necesitas enviar datos válidos en JSON mediante una solicitud PUT. Los datos deben enviarse como el cuerpo bruto de su solicitud, como se muestra a continuación. El ejemplo siguiente muestra todos los parámetros que puedes enviar, pero no estás obligado a enviar todos (Consulta la tabla para más información).

ParámetroDescripción
name (opcional) Nombre del canal
description (opcional) Descripción del canal
color (opcional) Color de la insignia de canal (HEX)
starred (opcional) Estrella el canal o no (verdadero o falso)
curl --location --request PUT 'https://bio.je/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
}'
$curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/channel/:id/update",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "PUT",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        CURLOPT_POSTFIELDS => 
            '{
	    "name": "Acme Corp",
	    "description": "channel for items for Acme Corp",
	    "color": "#FFFFFF",
	    "starred": false
	}',
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'PUT',
        'url': 'https://bio.je/api/channel/:id/update',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
    "name": "Acme Corp",
    "description": "channel for items for Acme Corp",
    "color": "#FFFFFF",
    "starred": false
}),
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/channel/:id/update"
    payload = {
    "name": "Acme Corp",
    "description": "channel for items for Acme Corp",
    "color": "#FFFFFF",
    "starred": false
}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("PUT", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Put, "https://bio.je/api/channel/:id/update");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{
    "name": "Acme Corp",
    "description": "channel for items for Acme Corp",
    "color": "#FFFFFF",
    "starred": false
}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "message": "Channel has been updated successfully."
}
Eliminar canal
DELETE https://bio.je/api/channel/:id/delete

Para eliminar un canal, tienes que enviar una solicitud de ELIMINACIÓN. Todos los elementos también estarán sin asignar.

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

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/channel/:id/delete",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "DELETE",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'DELETE',
        'url': 'https://bio.je/api/channel/:id/delete',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/channel/:id/delete"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("DELETE", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Delete, "https://bio.je/api/channel/:id/delete");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "message": "Channel has been deleted successfully."
}

Cuenta

Obtener cuenta
GET https://bio.je/api/account

Para obtener información sobre la cuenta, puedes enviar una solicitud a este endpoint y devolverá los datos de la cuenta.

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

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/account",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'GET',
        'url': 'https://bio.je/api/account',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/account"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("GET", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, "https://bio.je/api/account");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "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"
    }
}
Actualizar cuenta
PUT https://bio.je/api/account/update

Para actualizar la información de la cuenta, puedes enviar una solicitud a este endpoint y actualizará los datos de la cuenta.

curl --location --request PUT 'https://bio.je/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://bio.je/api/account/update",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "PUT",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        CURLOPT_POSTFIELDS => 
            '{
	    "email": "newemail@google.com",
	    "password": "newpassword"
	}',
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'PUT',
        'url': 'https://bio.je/api/account/update',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
    "email": "newemail@google.com",
    "password": "newpassword"
}),
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/account/update"
    payload = {
    "email": "newemail@google.com",
    "password": "newpassword"
}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("PUT", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Put, "https://bio.je/api/account/update");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{
    "email": "newemail@google.com",
    "password": "newpassword"
}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "message": "Account has been successfully updated."
}

Códigos QR

Códigos QR de lista
GET https://bio.je/api/qr?limit=2&page=1

Para obtener tus códigos QR a través de la API, puedes usar este endpoint. También puedes filtrar datos (consulta la tabla para más información).

ParámetroDescripción
limit (opcional) Resultado de datos por página
page (opcional) Solicitud de página actual
curl --location --request GET 'https://bio.je/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://bio.je/api/qr?limit=2&page=1",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'GET',
        'url': 'https://bio.je/api/qr?limit=2&page=1',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/qr?limit=2&page=1"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("GET", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, "https://bio.je/api/qr?limit=2&page=1");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": "0",
    "data": {
        "result": 2,
        "perpage": 2,
        "currentpage": 1,
        "nextpage": 1,
        "maxpage": 1,
        "qrs": [
            {
                "id": 2,
                "link": "https:\/\/bio.je\/qr\/a2d5e",
                "scans": 0,
                "name": "Google",
                "date": "2020-11-10 18:01:43"
            },
            {
                "id": 1,
                "link": "https:\/\/bio.je\/qr\/b9edfe",
                "scans": 5,
                "name": "Google Canada",
                "date": "2020-11-10 18:00:25"
            }
        ]
    }
}
Consigue un solo código QR
GET https://bio.je/api/qr/:id

Para obtener detalles de un único código QR a través de la API, puedes usar este endpoint.

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

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/qr/:id",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'GET',
        'url': 'https://bio.je/api/qr/:id',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/qr/:id"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("GET", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, "https://bio.je/api/qr/:id");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "details": {
        "id": 1,
        "link": "https:\/\/bio.je\/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
        }
    }
}
Crea un código QR
POST https://bio.je/api/qr/add

Para crear un código QR, necesitas enviar datos válidos en JSON mediante una solicitud POST. Los datos deben enviarse como el cuerpo bruto de su solicitud, como se muestra a continuación. El ejemplo siguiente muestra todos los parámetros que puedes enviar, pero no estás obligado a enviar todos (Consulta la tabla para más información).

ParámetroDescripción
type (requerido) texto
data (obligatorio) Datos que se incrustarán dentro del código QR. Los datos pueden ser cadena o array dependiendo del tipo
background (opcional) Color RGB, por ejemplo, rgb(255,255,255)
foreground (opcional) Color RGB, por ejemplo, rgb(0,0,0)
logo (opcional) Ruta hacia el logo, ya sea png o jpg
name (opcional) Nombre del código QR
curl --location --request POST 'https://bio.je/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"
}'
$curl = curl_init();

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/qr/add",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "POST",
        CURLOPT_HTTPHEADER => [
            "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",
	    "name": "QR Code API"
	}',
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'POST',
        'url': 'https://bio.je/api/qr/add',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
    "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"
}),
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/qr/add"
    payload = {
    "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"
}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("POST", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, "https://bio.je/api/qr/add");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{
    "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"
}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "id": 3,
    "link": "https:\/\/bio.je\/qr\/a58f79"
}
Actualizar código QR
PUT https://bio.je/api/qr/:id/update

Para actualizar un código QR, necesitas enviar un dato válido en JSON mediante una solicitud PUT. Los datos deben enviarse como el cuerpo bruto de su solicitud, como se muestra a continuación. El ejemplo siguiente muestra todos los parámetros que puedes enviar, pero no estás obligado a enviar todos (Consulta la tabla para más información).

ParámetroDescripción
data (obligatorio) Datos que se incrustarán dentro del código QR. Los datos pueden ser cadena o array dependiendo del tipo
background (opcional) Color RGB, por ejemplo, rgb(255,255,255)
foreground (opcional) Color RGB, por ejemplo, rgb(0,0,0)
logo (opcional) Ruta hacia el logo, ya sea png o jpg
curl --location --request PUT 'https://bio.je/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://bio.je/api/qr/:id/update",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "PUT",
        CURLOPT_HTTPHEADER => [
            "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;
var request = require('request');
    var options = {
        'method': 'PUT',
        'url': 'https://bio.je/api/qr/:id/update',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
    "type": "link",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}),
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/qr/:id/update"
    payload = {
    "type": "link",
    "data": "https://google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https://site.com/logo.png"
}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("PUT", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Put, "https://bio.je/api/qr/:id/update");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{
    "type": "link",
    "data": "https:\/\/google.com",
    "background": "rgb(255,255,255)",
    "foreground": "rgb(0,0,0)",
    "logo": "https:\/\/site.com\/logo.png"
}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "message": "QR has been updated successfully."
}
Eliminar un código QR
DELETE https://bio.je/api/qr/:id/delete

Para eliminar un código QR, tienes que enviar una solicitud de ELIMINACIÓN.

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

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/qr/:id/delete",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "DELETE",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'DELETE',
        'url': 'https://bio.je/api/qr/:id/delete',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/qr/:id/delete"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("DELETE", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Delete, "https://bio.je/api/qr/:id/delete");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "message": "QR Code has been deleted successfully."
}

Dominios con marca

Listar dominios con marca
GET https://bio.je/api/domains?limit=2&page=1

Para obtener tus dominios de marca a través de la API, puedes usar este endpoint. También puedes filtrar datos (consulta la tabla para más información).

ParámetroDescripción
limit (opcional) Resultado de datos por página
page (opcional) Solicitud de página actual
curl --location --request GET 'https://bio.je/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://bio.je/api/domains?limit=2&page=1",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'GET',
        'url': 'https://bio.je/api/domains?limit=2&page=1',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/domains?limit=2&page=1"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("GET", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, "https://bio.je/api/domains?limit=2&page=1");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "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 dominio de marca
POST https://bio.je/api/domain/add

Se puede añadir un dominio usando este punto final. Por favor, asegúrate de que el dominio esté correctamente apuntado a nuestro servidor.

ParámetroDescripción
domain (obligatorio) Dominio de marca que incluye http o https
redirectroot (opcional) Redirección raíz cuando alguien visita tu dominio
redirect404 (opcional) Redirección personalizada 404
curl --location --request POST 'https://bio.je/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://bio.je/api/domain/add",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "POST",
        CURLOPT_HTTPHEADER => [
            "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;
var request = require('request');
    var options = {
        'method': 'POST',
        'url': 'https://bio.je/api/domain/add',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
    "domain": "https:\/\/domain1.com",
    "redirectroot": "https:\/\/rootdomain.com",
    "redirect404": "https:\/\/rootdomain.com\/404"
}),
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/domain/add"
    payload = {
    "domain": "https://domain1.com",
    "redirectroot": "https://rootdomain.com",
    "redirect404": "https://rootdomain.com/404"
}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("POST", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, "https://bio.je/api/domain/add");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{
    "domain": "https:\/\/domain1.com",
    "redirectroot": "https:\/\/rootdomain.com",
    "redirect404": "https:\/\/rootdomain.com\/404"
}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "id": 1
}
Actualizar dominio
PUT https://bio.je/api/domain/:id/update

Para actualizar un dominio de marca, necesitas enviar datos válidos en JSON mediante una solicitud PUT. Los datos deben enviarse como el cuerpo bruto de su solicitud, como se muestra a continuación. El ejemplo siguiente muestra todos los parámetros que puedes enviar, pero no estás obligado a enviar todos (Consulta la tabla para más información).

ParámetroDescripción
redirectroot (opcional) Redirección raíz cuando alguien visita tu dominio
redirect404 (opcional) Redirección personalizada 404
curl --location --request PUT 'https://bio.je/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://bio.je/api/domain/:id/update",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "PUT",
        CURLOPT_HTTPHEADER => [
            "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;
var request = require('request');
    var options = {
        'method': 'PUT',
        'url': 'https://bio.je/api/domain/:id/update',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
    "redirectroot": "https:\/\/rootdomain-new.com",
    "redirect404": "https:\/\/rootdomain-new.com\/404"
}),
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/domain/:id/update"
    payload = {
    "redirectroot": "https://rootdomain-new.com",
    "redirect404": "https://rootdomain-new.com/404"
}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("PUT", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Put, "https://bio.je/api/domain/:id/update");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{
    "redirectroot": "https:\/\/rootdomain-new.com",
    "redirect404": "https:\/\/rootdomain-new.com\/404"
}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "message": "Domain has been updated successfully."
}
Eliminar dominio
DELETE https://bio.je/api/domain/:id/delete

Para eliminar un dominio, tienes que enviar una solicitud de ELIMINACIÓN.

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

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/domain/:id/delete",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "DELETE",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'DELETE',
        'url': 'https://bio.je/api/domain/:id/delete',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/domain/:id/delete"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("DELETE", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Delete, "https://bio.je/api/domain/:id/delete");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "message": "Domain has been deleted successfully."
}

Enlaces


Píxeles

Píxeles de lista
GET https://bio.je/api/pixels?limit=2&page=1

Para obtener tus códigos de píxeles a través de la API, puedes usar este endpoint. También puedes filtrar datos (consulta la tabla para más información).

ParámetroDescripción
limit (opcional) Resultado de datos por página
page (opcional) Solicitud de página actual
curl --location --request GET 'https://bio.je/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://bio.je/api/pixels?limit=2&page=1",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'GET',
        'url': 'https://bio.je/api/pixels?limit=2&page=1',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/pixels?limit=2&page=1"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("GET", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, "https://bio.je/api/pixels?limit=2&page=1");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "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
POST https://bio.je/api/pixel/add

Se puede crear un píxel usando este punto final. Tienes que enviar el tipo de píxel y la etiqueta.

ParámetroDescripción
type (required) gtmpixel | gapixel | fbpixel | adwordspixel | linkedinpixel | twitterpixel | adrollpixel | quorapixel | pinterest | bing | snapchat | reddit | tiktok
name (obligatorio) Nombre personalizado para tu píxel
tag (obligatorio) La etiqueta del píxel
curl --location --request POST 'https://bio.je/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://bio.je/api/pixel/add",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "POST",
        CURLOPT_HTTPHEADER => [
            "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;
var request = require('request');
    var options = {
        'method': 'POST',
        'url': 'https://bio.je/api/pixel/add',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
    "type": "gtmpixel",
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}),
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/pixel/add"
    payload = {
    "type": "gtmpixel",
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("POST", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, "https://bio.je/api/pixel/add");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{
    "type": "gtmpixel",
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "id": 1
}
Actualizar Pixel
PUT https://bio.je/api/pixel/:id/update

Para actualizar un píxel, necesitas enviar un dato válido en JSON mediante una solicitud PUT. Los datos deben enviarse como el cuerpo bruto de su solicitud, como se muestra a continuación. El ejemplo siguiente muestra todos los parámetros que puedes enviar, pero no estás obligado a enviar todos (Consulta la tabla para más información).

ParámetroDescripción
name (opcional) Nombre personalizado para tu píxel
tag (obligatorio) La etiqueta del píxel
curl --location --request PUT 'https://bio.je/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://bio.je/api/pixel/:id/update",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "PUT",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        CURLOPT_POSTFIELDS => 
            '{
	    "name": "My GTM",
	    "tag": "GTM-ABCDE"
	}',
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'PUT',
        'url': 'https://bio.je/api/pixel/:id/update',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        body: JSON.stringify({
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}),
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/pixel/:id/update"
    payload = {
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("PUT", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Put, "https://bio.je/api/pixel/:id/update");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{
    "name": "My GTM",
    "tag": "GTM-ABCDE"
}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "message": "Pixel has been updated successfully."
}
Eliminar píxel
DELETE https://bio.je/api/pixel/:id/delete

Para eliminar un píxel, tienes que enviar una solicitud de ELIMINACIÓN.

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

    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://bio.je/api/pixel/:id/delete",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "DELETE",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'DELETE',
        'url': 'https://bio.je/api/pixel/:id/delete',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/pixel/:id/delete"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("DELETE", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Delete, "https://bio.je/api/pixel/:id/delete");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "error": 0,
    "message": "Pixel has been deleted successfully."
}

Splash Personalizado

Lista de Splash Personalizado
GET https://bio.je/api/splash?limit=2&page=1

Para obtener páginas de inicio personalizadas a través de la API, puedes usar este endpoint. También puedes filtrar datos (consulta la tabla para más información).

ParámetroDescripción
limit (opcional) Resultado de datos por página
page (opcional) Solicitud de página actual
curl --location --request GET 'https://bio.je/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://bio.je/api/splash?limit=2&page=1",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'GET',
        'url': 'https://bio.je/api/splash?limit=2&page=1',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/splash?limit=2&page=1"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("GET", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, "https://bio.je/api/splash?limit=2&page=1");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "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"
            }
        ]
    }
}

Superposiciones CTA

Superposiciones de listas CTA
GET https://bio.je/api/overlay?limit=2&page=1

Para obtener superposiciones de CTA a través de la API, puedes usar este endpoint. También puedes filtrar datos (consulta la tabla para más información).

ParámetroDescripción
limit (opcional) Resultado de datos por página
page (opcional) Solicitud de página actual
curl --location --request GET 'https://bio.je/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://bio.je/api/overlay?limit=2&page=1",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_MAXREDIRS => 2,
        CURLOPT_TIMEOUT => 10,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_CUSTOMREQUEST => "GET",
        CURLOPT_HTTPHEADER => [
            "Authorization: Bearer YOURAPIKEY",
            "Content-Type: application/json",
        ],
        
    ));

    $response = curl_exec($curl);

    curl_close($curl);
    echo $response;
var request = require('request');
    var options = {
        'method': 'GET',
        'url': 'https://bio.je/api/overlay?limit=2&page=1',
        'headers': {
            'Authorization': 'Bearer YOURAPIKEY',
            'Content-Type': 'application/json'
        },
        
    };
    request(options, function (error, response) {
        if (error) throw new Error(error);
        console.log(response.body);
    });
import requests
    url = "https://bio.je/api/overlay?limit=2&page=1"
    payload = {}
    headers = {
        'Authorization': 'Bearer YOURAPIKEY',
        'Content-Type': 'application/json'
    }
    response = requests.request("GET", url, headers=headers, json=payload)
    print(response.text)
    
var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, "https://bio.je/api/overlay?limit=2&page=1");
    request.Headers.Add("Authorization", "Bearer YOURAPIKEY");
    var content = new StringContent("{}", System.Text.Encoding.UTF8, "application/json");
    request.Content = content;
    var response = await client.SendAsync(request);
    response.EnsureSuccessStatusCode();
    Console.WriteLine(await response.Content.ReadAsStringAsync());
    
Respuesta del servidor
{
    "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"
            }
        ]
    }
}