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
{
  "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