Skip to main content
GET
/
api
/
employees
/
:id
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"
    }
  }
}

Authentication

Authorization
string
required
Bearer token for authentication

Path Parameters

id
string
required
The unique MongoDB identifier of the employee

Response

success
boolean
Indicates if the request was successful
message
string
Success message
data
object
Response data
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"
    }
  }
}

Use Cases

View Employee Profile

Retrieve complete employee information to display in a profile page or dashboard:
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}`);

Monitor Wellness Status

Check an employee’s current wellness metrics:
const { wellnessMetrics } = await getEmployee(employeeId);

if (wellnessMetrics.riskLevel === 'alto') {
  console.log('Alert: Employee at high burnout risk');
  // Trigger intervention workflow
}

Track Gamification Progress

View an employee’s engagement and achievements:
const { gamification } = await getEmployee(employeeId);

console.log(`Level ${gamification.level}`);
console.log(`Current Streak: ${gamification.currentStreak} days`);
console.log(`Badges: ${gamification.badges.length}`);

Build docs developers (and LLMs) love