Skip to main content
POST
/
mision
curl -X POST "https://api.example.com/mision" \
  -H "Content-Type: application/json" \
  -d '{
    "idSolicitud": 1,
    "idLugarOrigen": 1,
    "idLugarDestino": 2,
    "descripcion": "Traslado de personal al aeropuerto",
    "fechaProgramada": "2025-06-15",
    "horaSalidaProgramada": "08:00:00",
    "horaLlegadaEstimada": "09:30:00",
    "observaciones": "Llevar documentos",
    "paradas": []
  }'
{
  "success": true,
  "message": "Misión creada exitosamente",
  "data": {
    "idMision": 1,
    "idSolicitud": 1,
    "idLugarOrigen": 1,
    "idLugarDestino": 2,
    "descripcion": "Traslado de personal al aeropuerto",
    "fechaProgramada": "2025-06-15",
    "horaSalidaProgramada": "08:00:00",
    "horaLlegadaEstimada": "09:30:00",
    "observaciones": "Llevar documentos",
    "idEstadoMision": 1,
    "codigoEstado": "PROGRAMADA",
    "paradas": []
  }
}

Create Mission

Creates a new mission associated with an approved request. The mission is created in PROGRAMADA (scheduled) state.

Request Body

idSolicitud
integer
required
ID of the associated request. The request must exist and be in APROBADA or EN_PROCESO state.
fechaProgramada
date
required
Scheduled date for the mission in YYYY-MM-DD format.
horaSalidaProgramada
string
required
Scheduled departure time in HH:MM:SS or HH:MM format.
idLugarOrigen
integer
ID of the origin location. Must exist if provided.
idLugarDestino
integer
ID of the main destination location. Must exist if provided.
descripcion
string
Description of the mission. Maximum 500 characters.
horaLlegadaEstimada
string
Estimated arrival time in HH:MM:SS or HH:MM format.
observaciones
string
General observations about the mission.
paradas
array
List of stops for the mission.

Response

success
boolean
Indicates if the request was successful.
message
string
Response message: “Misión creada exitosamente”
data
object
The created mission object with all details including stops.

Validations

  • idSolicitud: Required and must exist in APROBADA or EN_PROCESO state
  • fechaProgramada: Required
  • horaSalidaProgramada: Required
  • Optional locations must exist if provided
  • Initial state is always PROGRAMADA
curl -X POST "https://api.example.com/mision" \
  -H "Content-Type: application/json" \
  -d '{
    "idSolicitud": 1,
    "idLugarOrigen": 1,
    "idLugarDestino": 2,
    "descripcion": "Traslado de personal al aeropuerto",
    "fechaProgramada": "2025-06-15",
    "horaSalidaProgramada": "08:00:00",
    "horaLlegadaEstimada": "09:30:00",
    "observaciones": "Llevar documentos",
    "paradas": []
  }'
{
  "success": true,
  "message": "Misión creada exitosamente",
  "data": {
    "idMision": 1,
    "idSolicitud": 1,
    "idLugarOrigen": 1,
    "idLugarDestino": 2,
    "descripcion": "Traslado de personal al aeropuerto",
    "fechaProgramada": "2025-06-15",
    "horaSalidaProgramada": "08:00:00",
    "horaLlegadaEstimada": "09:30:00",
    "observaciones": "Llevar documentos",
    "idEstadoMision": 1,
    "codigoEstado": "PROGRAMADA",
    "paradas": []
  }
}

Build docs developers (and LLMs) love