Skip to main content
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/summary
import 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

periodo
string
required

Period in format YYYY-MM

Example:

"2026-01"

client_id
string

Client ID (optional, if not provided returns summary for all clients)

Example:

"123e4567-e89b-12d3-a456-426614174000"

Response

Billing summary retrieved successfully

periodo
string
required
Example:

"2026-01"

valor_uf
number
required
Example:

38000

subscripciones
number

Total subscriptions in CLP

Example:

1500000.5

visitas
number

Total visits in CLP

Example:

250000

ventas_dispositivos
number

Total device sales in CLP

Example:

0

total_neto
number

Net total in CLP

Example:

1750000.5

total_clients
number
Example:

45

prorrateos
object[]
Example:
[]
facturas_detalladas
object[]
source
enum<string>

Source of data: facturas_generadas or calculo_tiempo_real

Available options:
facturas_generadas,
calculo_tiempo_real
Example:

"calculo_tiempo_real"

warnings
string[]

Array of warning messages for suspicious or critical data issues

Example:
[
"SOSPECHOSO: Plan \"Premium\" (ID:123) tiene precio 50 UF - Verificar"
]
metadata
object

Metadata about processing statistics