Skip to main content

Overview

The Proveedores module lets you register and maintain the upstream ISP providers (carriers) that sell bandwidth to your organization. Every bandwidth service (ServicioProveedor) and every network connection (EnlaceRed) traces back to a provider record. Keeping provider data accurate ensures that capacity reports, SLA tracking, and support escalations all have a valid reference.

Data Model

type Proveedor = {
  proveedor_id:      number;          // auto-increment primary key
  nombre:            string;          // legal name or trade name, e.g. "BITEL S.A.C."
  ruc:               string | null;   // Peruvian tax ID (RUC), 11 digits
  contacto_soporte:  string | null;   // support contact (email, phone, or NOC name)
  sla_soporte:       number | null;   // agreed support SLA in hours
};

Providers List Page

When you navigate to Proveedores, you see a paginated table of all providers. The page loads 10 providers per page by default.

Filters

  • Búsqueda — free-text search by nombre or contacto_soporte. Press Enter or click Buscar to apply. Updates are debounced.
  • Estado — filter by active (is_active = 1), inactive (is_active = 0), or all. Defaults to active.

Table columns

ColumnField
Nombre / Razon socialnombre
Contactocontacto_soporte
RUCruc
AccionesEdit button + Crear Servicio shortcut

Row actions

Each row has three actions:
  • Visibility icon — expands an inline sub-table showing all services (ServicioProveedor) linked to this provider. The sub-table columns are: CID, Tipo de enlace, Capacidad Comprada, Capacidad Vendida, Capacidad Utilizada, Capacidad Disponible, and Condición.
  • Crear Servicio — navigates to /servicios/crear with proveedor_id pre-filled in router state.
  • Edit icon — opens the edit modal for this provider.

Create Provider

Click Nuevo proveedor in the top-right corner to navigate to the provider creation form.
1

Fill in the provider details

Complete the form fields:
FieldRequiredNotes
nombreYesLegal or commercial name. Cannot be empty.
rucNo11-character Peruvian tax ID. Leave blank if not applicable.
contacto_soporteNoEmail address, phone number, or NOC team name.
sla_soporteNoSLA commitment in hours (must be a number ≥ 0 or left blank).
2

Save

Click Guardar. The form validates that nombre is non-empty and that sla_soporte, if provided, is a finite number ≥ 0. On success, the providers list is invalidated and refreshed.

Create API call

POST /v1/proveedores/crear
Content-Type: application/json

{
  "nombre": "BITEL S.A.C.",
  "ruc": "20600227461",
  "contacto_soporte": "noc@bitel.com.pe",
  "sla_soporte": 4
}
{
  "ok": true,
  "message": "Proveedor creado correctamente.",
  "proveedor_id": 42
}

Edit Provider

Click the edit icon on any row to open the edit modal. The same four fields are available: nombre, ruc, contacto_soporte, and sla_soporte.
The edit form detects when no fields have changed and shows a “No hay cambios para guardar” warning instead of making an unnecessary API call.

Edit API call

PUT /v1/proveedores/editar
Content-Type: application/json

{
  "proveedor_id": 42,
  "nombre": "BITEL S.A.C.",
  "ruc": "20600227461",
  "contacto_soporte": "noc-escalation@bitel.com.pe",
  "sla_soporte": 2,
  "is_active": 1
}

Soft Delete

Providers are never permanently deleted. Clicking delete on a provider (via eliminarProveedor) calls:
DELETE /v1/proveedores/eliminar/{proveedor_id}
This marks the provider as inactive (is_active = 0). The provider will no longer appear in the default list (which filters by estado = 1) but remains in the database and can be retrieved by setting the Estado filter to Inactivos or Todos.
You cannot deactivate a provider that still has active services linked to it. The API returns HTTP 400 or 409 with a message containing “no se puede desactivar”, and the form displays the warning inline without closing.

Select Endpoint (for Dropdowns)

When creating a service or connection, other modules use a lightweight endpoint to populate provider dropdowns. This endpoint returns each provider together with a summary of its services:
GET /v1/proveedores/listar/select
type ProveedorSelect = {
  proveedor_id: number;
  nombre:       string;
  servicios: {
    servicio_id:        number | null;
    ubicacion_servicio: string | null;
    condicion:          string | null;
  }[];
};

API Reference

MethodEndpointDescription
GET/v1/proveedores/listarPaginated list with optional busqueda, estado, limit, offset.
GET/v1/proveedores/{proveedor_id}Single provider by ID.
POST/v1/proveedores/crearCreate a new provider.
PUT/v1/proveedores/editarUpdate an existing provider.
DELETE/v1/proveedores/eliminar/{proveedor_id}Soft-delete (set is_active = 0).
GET/v1/proveedores/listar/selectLightweight list for dropdown use, includes nested services.

Provider Services

Create and manage bandwidth contracts purchased from providers.

Capacity Dashboard

View contracted vs. assigned capacity and risk levels per connection.