curl --request GET \
--url https://api.ugps.io/api/notifications \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ugps.io/api/notifications"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ugps.io/api/notifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ugps.io/api/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ugps.io/api/notifications"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ugps.io/api/notifications")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ugps.io/api/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"notifications": [
{
"id": "<string>",
"type": "speed_limit",
"name": "<string>",
"alertTrigger": {
"_id": "<string>",
"name": "<string>",
"label": "<string>"
},
"asset": {
"_id": "<string>",
"name": "<string>",
"plate": "<string>",
"icon": {
"id": "<string>",
"color": "<string>"
}
},
"location": "<string>",
"address": "<string>",
"status": "unreviewed",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"calculatorId": 123
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 45,
"totalPages": 3
},
"unreviewedCount": 12
}
}{
"error": "El email es requerido"
}{
"error": "Token inválido o expirado"
}{
"message": "Error interno del servidor"
}Obtener listado paginado de notificaciones
Retorna notificaciones del cliente en formato simplificado (NotificationBase) con paginación offset-based. Soporta filtros multi-valor por tipo de alerta, estado y activo, además de rango de fechas. Si no se especifica rango de fechas, retorna los últimos 30 días. Incluye conteo global de notificaciones no revisadas independiente de los filtros activos.
curl --request GET \
--url https://api.ugps.io/api/notifications \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.ugps.io/api/notifications"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.ugps.io/api/notifications', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.ugps.io/api/notifications",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.ugps.io/api/notifications"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.ugps.io/api/notifications")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ugps.io/api/notifications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "success",
"data": {
"notifications": [
{
"id": "<string>",
"type": "speed_limit",
"name": "<string>",
"alertTrigger": {
"_id": "<string>",
"name": "<string>",
"label": "<string>"
},
"asset": {
"_id": "<string>",
"name": "<string>",
"plate": "<string>",
"icon": {
"id": "<string>",
"color": "<string>"
}
},
"location": "<string>",
"address": "<string>",
"status": "unreviewed",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"calculatorId": 123
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 45,
"totalPages": 3
},
"unreviewedCount": 12
}
}{
"error": "El email es requerido"
}{
"error": "Token inválido o expirado"
}{
"message": "Error interno del servidor"
}Authorizations
Token de sesión Better Auth o API token (atk_...) en el header Authorization: Bearer <token>. Los JWT legacy ya no son válidos.
Query Parameters
Número de página (mínimo 1)
x >= 1Cantidad de resultados por página (máximo 50)
1 <= x <= 50Filtrar por tipo de alerta. Repetible: ?types=speed_limit&types=geofence. Acepta también un solo valor escalar.
speed_limit, geofence, ignition, lost_connection, road_speed_limit, sos_alarm, temperature Filtrar por estado de la notificación. Repetible: ?status=unreviewed&status=false_positive. Acepta también un solo valor escalar.
unreviewed, reviewed, false_positive Filtrar por ID(s) de activo (ObjectId de 24 caracteres hexadecimales). Repetible: ?assetIds=ID1&assetIds=ID2. Acepta también un solo valor escalar.
^[a-fA-F0-9]{24}$["507f1f77bcf86cd799439011"]
Fecha de inicio del rango (ISO 8601)
Fecha de fin del rango (ISO 8601)