Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/sistemashm24/pagos_hotspot_api/llms.txt

Use this file to discover all available pages before exploring further.

Companies (empresas) are the top-level tenants of the Pagos Hotspot platform. Each company can have multiple routers, products, and cliente_admin users. Only super_admin users can create or list companies. Every request in this section must carry a valid session token for a user with the super_admin role.
All endpoints in this section require Authorization: Bearer <session_token> for a user with role super_admin.

POST /admin/empresas

Creates a new tenant company. The id is auto-generated in the format EMP_ followed by 10 uppercase hex characters.
Company IDs are generated server-side as EMP_ + 10 uppercase hex characters (e.g. EMP_3A9F1C0B2D). You cannot specify a custom ID.
cURL
curl -X POST "https://api.example.com/admin/empresas" \
  -H "Authorization: Bearer <session_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "nombre": "WiFi Parque Central",
    "contacto_email": "[email protected]",
    "contacto_telefono": "+52 55 1234 5678",
    "conekta_private_key": "key_test_xxxxxxxxxx",
    "conekta_public_key": "key_pub_test_xxxxxxxxxx",
    "conekta_mode": "test"
  }'

Request Body

nombre
string
required
Company display name shown in the admin panel and captive portal.
contacto_email
string
required
Primary contact email for the company. Used for platform notifications.
contacto_telefono
string
Optional contact phone number.
conekta_private_key
string
default:"key_test_default"
Conekta secret key (starts with key_test_ or key_live_). Can be updated later by the cliente_admin user via POST /api/v1/admin/mi-empresa/configurar-conekta.
conekta_public_key
string
default:"key_test_default_pub"
Conekta public key. Can be updated later by the cliente_admin user.
conekta_mode
string
default:"test"
Initial Conekta gateway mode. "test" or "live".

Response (HTTP 200)

id
string
required
Auto-generated company identifier. Format: EMP_ + 10 uppercase hex characters, e.g. EMP_3A9F1C0B2D.
nombre
string
required
Company display name.
contacto_email
string
required
Primary contact email.
contacto_telefono
string
Contact phone number, or null if not provided.
conekta_mode
string
required
Conekta mode set at creation: "test" or "live".
activa
boolean
required
Always true on creation. Companies are created in active state.
creada_en
string (ISO 8601)
required
Timestamp of company creation.
Example Response
{
  "id": "EMP_3A9F1C0B2D",
  "nombre": "WiFi Parque Central",
  "contacto_email": "[email protected]",
  "contacto_telefono": "+52 55 1234 5678",
  "conekta_mode": "test",
  "activa": true,
  "creada_en": "2025-01-15T09:00:00.123456"
}

GET /admin/empresas

Returns all registered companies in the system. No pagination is applied — all records are returned in a single response.
cURL
curl -X GET "https://api.example.com/admin/empresas" \
  -H "Authorization: Bearer <session_token>"

Response

Returns an array of EmpresaResponse objects. See POST /admin/empresas for field descriptions.
Example Response
[
  {
    "id": "EMP_3A9F1C0B2D",
    "nombre": "WiFi Parque Central",
    "contacto_email": "[email protected]",
    "contacto_telefono": "+52 55 1234 5678",
    "conekta_mode": "live",
    "activa": true,
    "creada_en": "2025-01-10T09:00:00"
  },
  {
    "id": "EMP_7B2E4F1A9C",
    "nombre": "Internet Café Los Pinos",
    "contacto_email": "[email protected]",
    "contacto_telefono": null,
    "conekta_mode": "test",
    "activa": true,
    "creada_en": "2025-01-12T11:30:00"
  }
]

GET /admin/dashboard

Returns platform-wide aggregate statistics. Use this for a global operations overview across all tenant companies.
cURL
curl -X GET "https://api.example.com/admin/dashboard" \
  -H "Authorization: Bearer <session_token>"

Response

estadisticas
object
required
timestamp
string (ISO 8601)
required
UTC timestamp of when the dashboard query was executed.
Example Response
{
  "estadisticas": {
    "total_empresas": 15,
    "empresas_activas": 13,
    "total_usuarios": 28
  },
  "timestamp": "2025-01-15T14:00:00.123456"
}

GET /admin/empresas//stats

Returns detailed operational statistics for a single company: router counts, admin user counts, and active API key counts.
cURL
curl -X GET "https://api.example.com/admin/empresas/EMP_3A9F1C0B2D/stats" \
  -H "Authorization: Bearer <session_token>"

Path Parameters

empresa_id
string
required
Company ID, e.g. EMP_3A9F1C0B2D.

Response

empresa
object
required
estadisticas
object
required
Example Response
{
  "empresa": {
    "id": "EMP_3A9F1C0B2D",
    "nombre": "WiFi Parque Central",
    "activa": true,
    "creada_en": "2025-01-10T09:00:00",
    "contacto_email": "[email protected]"
  },
  "estadisticas": {
    "total_routers": 3,
    "routers_activos": 3,
    "routers_inactivos": 0,
    "total_usuarios_admin": 2,
    "api_keys_activas": 3
  }
}

Build docs developers (and LLMs) love