curl -X GET https://api.cuido.com/api/employees/60d5ec49f1b2c72b8c8e4f1a \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
"success": true,
"message": "Empleado obtenido exitosamente",
"data": {
"employee": {
"_id": "60d5ec49f1b2c72b8c8e4f1a",
"personalInfo": {
"name": "Dr. María García",
"email": "[email protected]",
"identification": "123456789",
"phoneNumber": "+57 300 123 4567"
},
"jobInfo": {
"position": "medico",
"department": "urgencias",
"startDate": "2024-01-15T00:00:00.000Z",
"shift": "noche"
},
"hospitalId": "HOSP001",
"wellnessMetrics": {
"currentMoodScore": 4,
"averageWorkload": 5,
"teamSupportScore": 4,
"satisfactionScore": 7,
"riskLevel": "medio"
},
"gamification": {
"totalPoints": 350,
"currentStreak": 7,
"maxStreak": 14,
"level": 4,
"badges": [
{
"name": "Primer Paso",
"earnedAt": "2024-01-16T08:00:00.000Z",
"description": "Completó su primer check-in de bienestar"
},
{
"name": "Constancia",
"earnedAt": "2024-01-23T08:00:00.000Z",
"description": "Mantuvo una racha de 7 días"
}
]
},
"isActive": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-03-05T14:20:00.000Z"
}
}
}
Retrieve detailed information about a specific employee
curl -X GET https://api.cuido.com/api/employees/60d5ec49f1b2c72b8c8e4f1a \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
"success": true,
"message": "Empleado obtenido exitosamente",
"data": {
"employee": {
"_id": "60d5ec49f1b2c72b8c8e4f1a",
"personalInfo": {
"name": "Dr. María García",
"email": "[email protected]",
"identification": "123456789",
"phoneNumber": "+57 300 123 4567"
},
"jobInfo": {
"position": "medico",
"department": "urgencias",
"startDate": "2024-01-15T00:00:00.000Z",
"shift": "noche"
},
"hospitalId": "HOSP001",
"wellnessMetrics": {
"currentMoodScore": 4,
"averageWorkload": 5,
"teamSupportScore": 4,
"satisfactionScore": 7,
"riskLevel": "medio"
},
"gamification": {
"totalPoints": 350,
"currentStreak": 7,
"maxStreak": 14,
"level": 4,
"badges": [
{
"name": "Primer Paso",
"earnedAt": "2024-01-16T08:00:00.000Z",
"description": "Completó su primer check-in de bienestar"
},
{
"name": "Constancia",
"earnedAt": "2024-01-23T08:00:00.000Z",
"description": "Mantuvo una racha de 7 días"
}
]
},
"isActive": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-03-05T14:20:00.000Z"
}
}
}
Show data properties
Show employee properties
curl -X GET https://api.cuido.com/api/employees/60d5ec49f1b2c72b8c8e4f1a \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
{
"success": true,
"message": "Empleado obtenido exitosamente",
"data": {
"employee": {
"_id": "60d5ec49f1b2c72b8c8e4f1a",
"personalInfo": {
"name": "Dr. María García",
"email": "[email protected]",
"identification": "123456789",
"phoneNumber": "+57 300 123 4567"
},
"jobInfo": {
"position": "medico",
"department": "urgencias",
"startDate": "2024-01-15T00:00:00.000Z",
"shift": "noche"
},
"hospitalId": "HOSP001",
"wellnessMetrics": {
"currentMoodScore": 4,
"averageWorkload": 5,
"teamSupportScore": 4,
"satisfactionScore": 7,
"riskLevel": "medio"
},
"gamification": {
"totalPoints": 350,
"currentStreak": 7,
"maxStreak": 14,
"level": 4,
"badges": [
{
"name": "Primer Paso",
"earnedAt": "2024-01-16T08:00:00.000Z",
"description": "Completó su primer check-in de bienestar"
},
{
"name": "Constancia",
"earnedAt": "2024-01-23T08:00:00.000Z",
"description": "Mantuvo una racha de 7 días"
}
]
},
"isActive": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"updatedAt": "2024-03-05T14:20:00.000Z"
}
}
}
const employeeId = '60d5ec49f1b2c72b8c8e4f1a';
const employee = await getEmployee(employeeId);
console.log(`Name: ${employee.personalInfo.name}`);
console.log(`Position: ${employee.jobInfo.position}`);
console.log(`Risk Level: ${employee.wellnessMetrics.riskLevel}`);
console.log(`Total Points: ${employee.gamification.totalPoints}`);
const { wellnessMetrics } = await getEmployee(employeeId);
if (wellnessMetrics.riskLevel === 'alto') {
console.log('Alert: Employee at high burnout risk');
// Trigger intervention workflow
}
const { gamification } = await getEmployee(employeeId);
console.log(`Level ${gamification.level}`);
console.log(`Current Streak: ${gamification.currentStreak} days`);
console.log(`Badges: ${gamification.badges.length}`);