Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Nieto2020/portalhub/llms.txt

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

Advisors (asesores) are the primary service providers in PortalHub. Once an administrator assigns a client to an advisor, the advisor gains a dedicated view of that client’s documents, appointments, and payment activity, and becomes the client’s main point of contact for all accounting matters. This guide covers every workflow an advisor will encounter on the platform.

Capabilities Overview

Client Portfolio

View the full list of clients assigned to you and access each client’s profile and activity.

Appointment Management

Review upcoming appointments, reschedule sessions, and cancel with a documented reason.

Document Review

Browse, download, and validate client-uploaded fiscal documents including CFDI XML files.

Reports

Author Mensual, Trimestral, Anual, and Especial reports that follow the Borrador → Publicado → Archivado lifecycle.

Messaging

Communicate with assigned clients via direct messages, including bulk messages to multiple clients at once.

Profile

Keep your professional profile — specialty, biography, and contact details — up to date.

Client Portfolio

Your client list is automatically populated by administrator-created assignments. You cannot add or remove clients yourself; contact an administrator to update your assignments.

Viewing Your Clients

GET /backend/modules/asignaciones/listar.php
The endpoint returns all active (estado = 'activo') cliente_asesor records where id_asesor matches your session. Each record includes the client’s id_usuario, their numero_cliente reference, the assignment start date, and the motivo_cambio recorded at the time of assignment.
GET /backend/modules/usuarios/listar.php
Use this endpoint (also available to advisors) to resolve client IDs into full email and status details. The response returns every user you are authorised to see, including their nombre_rol, estado, and fecha_registro.
FieldDescription
id_asignacionUnique identifier for the assignment record
id_clienteThe client’s id_usuario
id_asesorYour id_usuario
motivo_cambioReason the admin recorded when making the assignment
estadoactivo — only active assignments are shown in your view
fecha_asignacionWhen the assignment was created

Appointment Management

All appointments are scoped to your advisor ID. The system only returns citas where id_asesor matches your session, so you always see a focused view of your own schedule.

Listing Your Appointments

GET /backend/modules/citas/listar.php
Returns appointments ordered by fecha_hora descending. Each record includes:
FieldTypeDescription
id_citaintAppointment identifier
id_clienteintClient who booked the appointment
fecha_horadatetimeScheduled date and time
estadoenumProgramada · Reprogramada · Cancelada
motivo_cancelaciontextPopulated when an appointment is cancelled

Rescheduling an Appointment

When a client needs to move their session, use the modify endpoint to update fecha_hora. The backend automatically checks for scheduling conflicts before accepting the change.
1

Identify the appointment

Note the id_cita from your appointment list.
2

Submit the new date and time

// POST /backend/modules/citas/modificar.php
{
  "id_cita": 42,
  "fecha_hora": "2025-09-15 10:00:00"
}
3

Confirm the change

A 200 OK response with "Cita modificada correctamente" confirms success. If the new slot conflicts with another appointment in your calendar, you will receive HTTP 409 and must choose a different time.
Cancelled appointments (estado = 'Cancelada') cannot be rescheduled. If a client needs to reinstate a cancelled session, they must book a new appointment from their dashboard.

Cancelling an Appointment

// POST /backend/modules/citas/cancelar.php
{
  "id_cita": 42,
  "motivo_cancelacion": "El cliente solicitó cancelación por viaje imprevisto."
}
The motivo_cancelacion field is stored on the record and visible to the client. Provide a clear, professional reason whenever you cancel a session.

Document Review

Clients upload fiscal documents directly through their dashboard. As their advisor, you can browse, validate, and download any document in their expediente.

Listing Client Documents

GET /backend/modules/documentos/listar.php
The response is filtered to documents belonging to your assigned clients. Each document record includes:
FieldDescription
id_documentoUnique document ID
nombre_originalThe filename the client uploaded
id_tipo_docFK into cat_tipos_documentos catalog
versionInteger version counter — increments automatically when a new file with the same name and type is uploaded
validacion_cfdi1 if the file is an XML document (auto-detected); 0 otherwise
fecha_subidaUpload timestamp

Document Types

Document types are defined in the cat_tipos_documentos catalog table and determine how documents are categorised in the portal. Common types include tax returns, invoices, supporting receipts, and legal records. Advisors see the human-readable nombre_tipo label resolved from the catalog.

CFDI Validation

When a client uploads an .xml file the system automatically sets validacion_cfdi = 1, flagging it as a potential CFDI electronic invoice. As the advisor, you should review XML documents promptly to confirm they are well-formed CFDI files before processing the client’s returns.

Downloading a Document

GET /backend/modules/documentos/descargar.php?id=88
The server streams the file with the original filename in the Content-Disposition header. Your session must correspond to the assigned advisor of the document’s owner, otherwise the endpoint returns HTTP 403.

Uploading a Document on Behalf of a Client

Advisors can also upload documents to a client’s expediente directly, provided the active assignment exists.
# multipart/form-data
POST /backend/modules/documentos/subir.php
  archivo    = <file>
  id_tipo_doc = 2
  id_cliente  = 15        # Required for asesor uploads
Accepted formats: PDF, XML, DOC, DOCX, XLS, XLSX, JPG, PNG (maximum 10 MB per file). After a successful upload the client receives an automatic in-portal notification.

Reports

Advisors are the only users who can author reports. Reports follow a defined lifecycle and are visible to administrators once published.

Creating a Report

// POST /backend/modules/reportes/crear.php
{
  "titulo": "Cierre Trimestral Q3 2025",
  "descripcion": "Resumen ejecutivo del tercer trimestre para el cliente Grupo Nieto S.A.",
  "contenido": "Durante el tercer trimestre se procesaron 48 facturas de ingreso...",
  "tipo": "Trimestral",
  "estado": "Borrador"
}

Valid Values

FieldAccepted values
tipoMensual · Trimestral · Anual · Especial
estadoBorrador · Publicado
Both titulo and descripcion are required. contenido is optional extended text. tipo defaults to Mensual and estado defaults to Borrador if omitted.

Report Lifecycle

1

Borrador

The initial state. The report is saved but not yet visible to administrators in the reports listing. Use this state while you are still drafting.
2

Publicado

The report becomes visible to admins in /backend/modules/reportes/listar.php. Set estado = 'Publicado' when the report is final and ready for review.
3

Archivado

Reports that are no longer actively referenced can be archived. Archived reports are retained for historical purposes but filtered out of the default listing view.

Viewing Your Reports

GET /backend/modules/reportes/listar.php
Returns reports where id_asesor matches your session. The admin-facing version of this endpoint returns reports from all advisors.

Messaging

Direct Messages

Send a message to any client in your portfolio through the internal inbox:
// POST /backend/modules/mensajes/enviar.php
{
  "id_destinatario": 15,
  "contenido_texto": "Su declaración mensual de agosto ya está lista para revisión."
}
Messages are stored in the mensajes table with tipo = 'Chat interno'. To retrieve a conversation thread:
GET /backend/modules/mensajes/conversacion.php?id_contacto=15

Bulk Messages to Multiple Clients

If you need to send the same message to several of your clients simultaneously, use the same endpoint the admin uses but scope the roles to clients only:
Direct bulk-to-all messaging via enviar_masivo.php is restricted to ROL_ADMIN. To message multiple specific clients, send individual messages to each id_destinatario, or ask an administrator to send a system-wide broadcast.
Keep an eye on the unread message badge (🔴) that appears on the Inbox icon in the sidebar navigation. The badge count is driven by GET /backend/modules/mensajes/no_leidos.php and refreshes automatically. Clients expect timely responses, so clear your unread messages regularly.

Profile

Your profile is visible to clients and administrators and represents your professional identity in the portal.

Updating Your Profile

// POST /backend/modules/perfil/actualizar.php
{
  "nombre_completo": "Lic. Carmen Soto Vega",
  "telefono": "+52 55 4321 8765",
  "especialidad": "Contabilidad Fiscal y Nómina",
  "biografia": "Contadora pública certificada con 12 años de experiencia en fiscalización de PYMES."
}
FieldRequiredNotes
nombre_completoDisplayed across all advisor-facing pages
telefonoContact number shown to assigned clients
especialidadYour accounting specialisation
biografiaShort professional bio displayed on your profile card
Profile data is upserted: if no profile row exists for your id_usuario it is created; subsequent calls update the existing record. Upload a profile photo via POST /backend/modules/perfil/actualizar.php using a multipart/form-data request that includes a foto_perfil file field.

Build docs developers (and LLMs) love