Skip to main content
GET
/
api
/
v1
/
consumption
/
statistics
Get consumption statistics for current month
curl --request GET \
  --url https://api.raul.ugps.io/api/v1/consumption/statistics \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://api.raul.ugps.io/api/v1/consumption/statistics"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://api.raul.ugps.io/api/v1/consumption/statistics', 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.raul.ugps.io/api/v1/consumption/statistics",
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.raul.ugps.io/api/v1/consumption/statistics"

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.raul.ugps.io/api/v1/consumption/statistics")
.header("Authorization", "Bearer <token>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.raul.ugps.io/api/v1/consumption/statistics")

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
{
  "totalConsumption": 125.5,
  "totalDownloadGb": 20.3,
  "totalUploadGb": 105.2,
  "avgPerDevice": 850.3,
  "devicesOverLimit": 5,
  "topRiskClients": [
    {
      "clientId": 1,
      "clientName": "Cliente ABC S.A.",
      "consumption": 1500.5,
      "expected": 1000,
      "percentageUsed": 150.05
    }
  ],
  "monthOverMonth": 12.5,
  "lastUpdated": "2026-01-15T10:30:00Z"
}
{
"error": "<string>",
"message": "<string>",
"details": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer token authentication

Response

totalConsumption
number
required

Consumo total en GB

Example:

125.5

totalDownloadGb
number
required

Total descarga (RX) en GB — datos recibidos por el dispositivo

Example:

20.3

totalUploadGb
number
required

Total subida (TX) en GB — datos enviados por el dispositivo (telemetría GPS)

Example:

105.2

avgPerDevice
number
required

Promedio de consumo por dispositivo en MB

Example:

850.3

devicesOverLimit
number
required

Cantidad de dispositivos que exceden el 100% del límite esperado

Example:

5

topRiskClients
object[]
required

Top 5 clientes en riesgo (>80% del límite)

monthOverMonth
number
required

Porcentaje de cambio vs mes anterior (negativo = reducción)

Example:

12.5

lastUpdated
string
required

Fecha y hora de última actualización (ISO 8601)

Example:

"2026-01-15T10:30:00Z"