Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/CLINTONARMANDO/apiregistropendientes/llms.txt

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

Time tracking allows you to record the exact duration each technician spends working on a pendiente. A session (tiempo) has an open horaInicio and is closed by setting horaFin. Multiple sessions can be open simultaneously if more than one technician is working on the same order. Base path: All session endpoints are nested under /api/pendientes.

Session lifecycle

POST /tiempos          →  session created (horaInicio set, horaFin = null)
PUT  /tiempos/{id}     →  update description or adjust times
PUT  /tiempos/{id}/cerrar-ultimo  →  close the latest open session (sets horaFin)
DELETE /tiempos/{id}   →  remove session if created in error
PUT /tiempos/{id}/cerrar-ultimo closes the most recent open session for the given pendiente, not necessarily the session identified by {id}. Verify which session will be closed before calling this endpoint if multiple sessions are open.

GET /api/pendientes//tiempos

List all time sessions recorded for a specific work order, ordered by horaInicio ascending.

Path parameters

id
number
required
ID of the pendiente whose sessions you want to retrieve.

Response — 200 OK

Returns an array of PendienteTiempoResponse objects.
id
number
Session ID.
pendienteId
number
Parent work order ID.
empleadoId
number
ID of the technician who owns this session.
horaInicio
string
ISO 8601 datetime when the session started.
horaFin
string
ISO 8601 datetime when the session ended. null if the session is still open.
descripcion
string
Free-text description of the work performed during this session.

Example

cURL
curl --request GET \
  --url https://api.example.com/api/pendientes/42/tiempos \
  --header 'Authorization: Bearer <token>'
Response:
[
  {
    "id": 1,
    "pendienteId": 42,
    "empleadoId": 9,
    "horaInicio": "2026-06-15T08:30:00",
    "horaFin": "2026-06-15T10:45:00",
    "descripcion": "Instalación del splitter y tendido de fibra."
  },
  {
    "id": 2,
    "pendienteId": 42,
    "empleadoId": 9,
    "horaInicio": "2026-06-15T11:00:00",
    "horaFin": null,
    "descripcion": "Configuración del ONT y pruebas de velocidad."
  }
]

POST /api/pendientes/tiempos

Start a new time session for a work order. The session’s horaInicio is set to the current server time.

Request body

pendienteId
number
required
ID of the work order this session belongs to.
empleadoId
number
required
ID of the technician starting the session.
descripcion
string
Optional description of the planned work. Can be updated later with PUT /tiempos/{id}.

Response — 200 OK

Returns the newly created PendienteTiempoResponse with horaFin: null.
Call this endpoint when a technician arrives on-site or begins working on the order remotely. Close the session with PUT /tiempos/{id}/cerrar-ultimo when they finish.

Example

cURL
curl --request POST \
  --url https://api.example.com/api/pendientes/tiempos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "pendienteId": 42,
    "empleadoId": 9,
    "descripcion": "Inicio de instalación en domicilio del cliente."
  }'

PUT /api/pendientes/tiempos/

Update an existing session — for example, to correct the description or adjust timestamps.

Path parameters

id
number
required
ID of the session to update.

Request body

Send only the fields you want to update. All fields are optional.
descripcion
string
Updated description of work performed.
horaInicio
string
Corrected start time in ISO 8601 format.
horaFin
string
Corrected end time in ISO 8601 format. Setting this closes the session.

Example

cURL
curl --request PUT \
  --url https://api.example.com/api/pendientes/tiempos/2 \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "descripcion": "Configuración del ONT, pruebas de velocidad y entrega a cliente."
  }'

PUT /api/pendientes/tiempos//cerrar-ultimo

Close the most recent open session associated with the pendiente. Sets horaFin to the current server time.

Path parameters

id
number
required
ID used to identify the pendiente context. The server closes the latest open session for this pendiente.

Response — 200 OK

Returns the updated session with horaFin populated.
If no open session exists for the pendiente, the API returns a 404 Not Found. Ensure a session was opened with POST /tiempos before calling this endpoint.

Example

cURL
curl --request PUT \
  --url https://api.example.com/api/pendientes/tiempos/2/cerrar-ultimo \
  --header 'Authorization: Bearer <token>'

DELETE /api/pendientes/tiempos/

Delete a time session. Use this to remove sessions created by mistake.

Path parameters

id
number
required
ID of the session to delete.

Response — 200 OK

Returns no body on success.
Deleting a session permanently removes it from the work order’s time log. This action cannot be undone.
cURL
curl --request DELETE \
  --url https://api.example.com/api/pendientes/tiempos/2 \
  --header 'Authorization: Bearer <token>'

Build docs developers (and LLMs) love