---
title: "Start Tracking"
method: POST
path: "/api/hogarSolarApp/tracking/start"
tags: ["hogarSolarApp", "Map Tracking"]
---

# Start Tracking

`POST /api/hogarSolarApp/tracking/start`

Inicia el tracking para una cita.
Genera token y lo guarda en Redis.
Consulta HubSpot para obtener información del cliente.
Envía notificación RCS al cliente (bloquea si falla).

## Request body

- StartTrackingRequest — Request para iniciar tracking (desde app móvil).
  - `comercial_id` integer, nullable — ID del comercial
  - `comercial_name` string, nullable — Nombre del comercial
  - `email_cliente` string, required — Email del cliente en HubSpot
  - `tipo_visita` 'visita' | 'previsualizacion' | 'instalacion' | 'mantenimiento', required — Tipos de visita soportados.
  - `appointment_date` string, nullable — Fecha de la cita (YYYY-MM-DD)
  - `appointment_time` string, nullable — Hora de la cita (HH:MM)
  - `dest_lat` number, nullable — Latitud del destino
  - `dest_lng` number, nullable — Longitud del destino
  - `dest_address` string, nullable — Dirección del destino (fallback si no hay coords)
  - `client_phone` string, required — Teléfono del cliente (de citas[].clienteTelefono)
  - `client_name` string, nullable — Nombre del cliente

## Response `200`

Successful Response

- StartTrackingResponse — Respuesta al iniciar tracking.
  - `token` string, required
  - `tracking_url` string, required
  - `tracking_id` string, required
  - `rcs_sent` boolean — Si el RCS fue enviado correctamente

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/hogarsolar/apis/hogarsolar-backend-api.md) · [All operations](https://skmtc.dev/hogarsolar/apis/hogarsolar-backend-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hogarsolar/hogarsolar-backend-api/revisions/d9861e46bef8/schema)
