XC Status Histories#
Endpoints for reading the status change history of an XC (Cross-Connect) request. This module is read-only — status history records are created internally by the system whenever an XC request's status changes; there is no endpoint to create or edit them directly.Concepts#
Status history record: one row per status change on an XC request, stored in xc_status_histories. It captures the old status, the new status, who/what triggered the change, an optional reason, and the timestamp.
Source: where the change originated — KIO_LINK (made through this app), SALESFORCE (synced from Salesforce), or SYSTEM (automated).
Business time: elapsed time is measured only during business hours in America/Mexico_City (Mon–Fri, 09:00–18:00), excluding Mexican public holidays. This is used to compute the time summary and to flag delayed stages.
Delay threshold: a request's current stage is considered delayed once it has accumulated more than 72 business hours without progressing to the next status.
Required permission#
All endpoints in this folder require the xc-status-history-read permission (access.permit('xc-status-history-read')).Endpoints#
List XC status histories#
GET /v1/xc/requests/{id}/status-historyReturns the full, chronologically ordered (changed_at ASC) list of status changes for the given request, with the old_status and new_status relations expanded.List XC status history time summary#
GET /v1/xc/requests/{id}/status-history/summaryReturns aggregated business-time metrics for the request:total_time: total business time from request creation to completion (or to now, if still in progress).
stages: per-stage breakdown (recibido, revision, firma, implementacion, acta_entrega) with time spent, percentage of total, and a delayed flag for the current stage.
Returns 404 if the XC request does not exist.Get a XC status history record#
GET /v1/xc/requests/{id}/status-history/{statusHistoryId}Returns a single status history record by its ID, including the related XC request and status details. Returns 404 if the record does not exist.Path parameters#
| Param | Format | Description |
|---|
id | xcr_ + 16 alphanumeric chars | ID of the XC request the history belongs to. |
statusHistoryId | xcsh_ + 16 alphanumeric chars | ID of a specific status history record. |
Source#
Router: routes/v1/xc/status-histories.router.js
Controller: controllers/xc/status-histories.controller.js
Service: services/xc/status-histories.service.js
Business-time logic: services/xc/status-time.js
Entity: entities/xc-status-history.js
Modified at 2026-09-25 18:15:39