Get billing summary for a period
curl --request GET \
--url https://api.raul.ugps.io/api/v1/facturacion-2/summaryimport requests
url = "https://api.raul.ugps.io/api/v1/facturacion-2/summary"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.raul.ugps.io/api/v1/facturacion-2/summary', 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/facturacion-2/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/facturacion-2/summary"
req, _ := http.NewRequest("GET", url, nil)
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/facturacion-2/summary")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/facturacion-2/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"periodo": "2026-01",
"valor_uf": 38000,
"subscripciones": 1500000.5,
"visitas": 250000,
"ventas_dispositivos": 0,
"total_neto": 1750000.5,
"total_clients": 45,
"prorrateos": [],
"facturas_detalladas": [
{
"client_id": "123e4567-e89b-12d3-a456-426614174000",
"client_name": "Cliente Ejemplo S.A.",
"total_subs": 150000.5,
"total_visits": 25000,
"total_device_sales": 0,
"total_factura": 175000.5,
"subs_count": 5,
"visits_count": 2,
"sales_count": 0,
"subscriptions_by_plan": [
{
"plan_name": "Básico GPS",
"price_uf": 0.38,
"price_clp": 15088,
"count": 10,
"total_clp": 150880,
"avg_days": 30
}
]
}
],
"source": "calculo_tiempo_real",
"warnings": [
"SOSPECHOSO: Plan \"Premium\" (ID:123) tiene precio 50 UF - Verificar"
],
"metadata": {
"totalPlansProcessed": 150,
"plansSkipped": 5,
"plansWithWarnings": 10
}
}Facturacion 2.0
Get billing summary for a period
Get billing summary for a specific period. If client_id is provided, returns detailed data for that client. Otherwise, returns aggregated summary for all clients.
GET
/
api
/
v1
/
facturacion-2
/
summary
Get billing summary for a period
curl --request GET \
--url https://api.raul.ugps.io/api/v1/facturacion-2/summaryimport requests
url = "https://api.raul.ugps.io/api/v1/facturacion-2/summary"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.raul.ugps.io/api/v1/facturacion-2/summary', 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/facturacion-2/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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/facturacion-2/summary"
req, _ := http.NewRequest("GET", url, nil)
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/facturacion-2/summary")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.raul.ugps.io/api/v1/facturacion-2/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"periodo": "2026-01",
"valor_uf": 38000,
"subscripciones": 1500000.5,
"visitas": 250000,
"ventas_dispositivos": 0,
"total_neto": 1750000.5,
"total_clients": 45,
"prorrateos": [],
"facturas_detalladas": [
{
"client_id": "123e4567-e89b-12d3-a456-426614174000",
"client_name": "Cliente Ejemplo S.A.",
"total_subs": 150000.5,
"total_visits": 25000,
"total_device_sales": 0,
"total_factura": 175000.5,
"subs_count": 5,
"visits_count": 2,
"sales_count": 0,
"subscriptions_by_plan": [
{
"plan_name": "Básico GPS",
"price_uf": 0.38,
"price_clp": 15088,
"count": 10,
"total_clp": 150880,
"avg_days": 30
}
]
}
],
"source": "calculo_tiempo_real",
"warnings": [
"SOSPECHOSO: Plan \"Premium\" (ID:123) tiene precio 50 UF - Verificar"
],
"metadata": {
"totalPlansProcessed": 150,
"plansSkipped": 5,
"plansWithWarnings": 10
}
}Query Parameters
Period in format YYYY-MM
Example:
"2026-01"
Client ID (optional, if not provided returns summary for all clients)
Example:
"123e4567-e89b-12d3-a456-426614174000"
Response
Billing summary retrieved successfully
Example:
"2026-01"
Example:
38000
Total subscriptions in CLP
Example:
1500000.5
Total visits in CLP
Example:
250000
Total device sales in CLP
Example:
0
Net total in CLP
Example:
1750000.5
Example:
45
Example:
[]
Show child attributes
Show child attributes
Source of data: facturas_generadas or calculo_tiempo_real
Available options:
facturas_generadas, calculo_tiempo_real Example:
"calculo_tiempo_real"
Array of warning messages for suspicious or critical data issues
Example:
[
"SOSPECHOSO: Plan \"Premium\" (ID:123) tiene precio 50 UF - Verificar"
]
Metadata about processing statistics
Show child attributes
Show child attributes