Get User Profile
Retrieve user profile information by user ID or email.
Query Parameters
Email address to retrieve
Provide either userId or email, not both.
Response
User profile object with location
Request Example
curl -X GET "https://76.13.114.194/auth/profile.php?userId=456" \
-H "Accept: application/json"
Response Example
{
"success": true,
"user": {
"id": 456,
"uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"nombre": "Carlos",
"apellido": "Rodríguez",
"email": "carlos.rodriguez@example.com",
"telefono": "+573001234567",
"tipo_usuario": "pasajero",
"calificacion": 4.8,
"creado_en": "2024-01-15T10:30:00.000Z",
"actualizado_en": "2024-03-15T14:30:00.000Z",
"location": {
"id": 89,
"usuario_id": 456,
"direccion": "Carrera 15 #85-30",
"latitud": 4.6814,
"longitud": -74.0479,
"ciudad": "Bogotá",
"departamento": "Cundinamarca",
"pais": "Colombia",
"codigo_postal": null,
"es_principal": true
}
}
}
Update User Profile
POST /auth/profile_update.php
Update user profile information.
Request Body
Updated location latitude
Updated location longitude
Alternative latitude field
Alternative longitude field
Response
Request Example
curl -X POST https://76.13.114.194/auth/profile_update.php \
-H "Content-Type: application/json" \
-d '{
"userId": 456,
"name": "Carlos Alberto",
"phone": "+573009876543"
}'
Response Example
{
"success": true,
"message": "Perfil actualizado exitosamente",
"user": {
"id": 456,
"uuid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"nombre": "Carlos Alberto",
"apellido": "Rodríguez Gómez",
"email": "carlos.rodriguez@example.com",
"telefono": "+573009876543",
"tipo_usuario": "pasajero",
"actualizado_en": "2024-03-15T16:45:00.000Z"
}
}
Error Responses
Invalid request parameters
Notes
Location updates (address, coordinates, city, etc.) will update the user’s primary location record.
The email address cannot be changed through this endpoint for security reasons.
See Also