Skip to main content
GET
/
api
/
v1
/
factura
/
consolidated
/
by-parent
/
{parentClientId}
Get consolidated billing by parent client with child breakdown
curl --request GET \
  --url https://api.raul.ugps.io/api/v1/factura/consolidated/by-parent/{parentClientId} \
  --header 'Authorization: Bearer <token>'
{
  "parent_client_id": "123e4567-e89b-12d3-a456-426614174000",
  "parent_name": "Empresa Matriz S.A.",
  "periodo": "2026-01",
  "valor_uf": 38000,
  "fecha_generada": "2026-01-15T10:30:00.000Z",
  "children_billing": [
    {
      "child_client_id": "123e4567-e89b-12d3-a456-426614174000",
      "child_name": "Sucursal Norte S.A.",
      "subscriptions_count": 10,
      "visits_count": 3,
      "sales_count": 1,
      "total_uf": 12.5,
      "total_clp": 475000,
      "color_index": 0
    }
  ],
  "direct_billing": {
    "subscriptions_count": 5,
    "total_uf": 6.25,
    "total_clp": 237500
  },
  "grand_total_uf": 25,
  "grand_total_clp": 950000,
  "total_subscriptions_count": 15,
  "total_visits_count": 6,
  "total_sales_count": 2,
  "children_count": 3
}

Authorizations

Authorization
string
header
required

Bearer token authentication

Path Parameters

parentClientId
string
required

Parent client ID

Query Parameters

periodo
string
required

Period in YYYY-MM format

Example:

"2026-01"

Response

parent_client_id
string
required

Parent client ID

Example:

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

parent_name
string
required

Parent client name

Example:

"Empresa Matriz S.A."

periodo
string
required

Billing period

Example:

"2026-01"

valor_uf
number
required

UF value used for calculations

Example:

38000

fecha_generada
string<date-time>
required

Date when this report was generated

Example:

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

children_billing
object[]
required

Billing breakdown by child companies

direct_billing
object
required

Billing for subscriptions directly under parent (no child assigned)

grand_total_uf
number
required

Grand total in UF (all children + direct)

Example:

25

grand_total_clp
number
required

Grand total in CLP (all children + direct)

Example:

950000

total_subscriptions_count
number

Total number of subscriptions across all children and direct

Example:

15

total_visits_count
number

Total number of visits across all children and direct

Example:

6

total_sales_count
number

Total number of sales across all children and direct

Example:

2

children_count
number

Number of child companies with billing

Example:

3