Skip to main content
POST
/
api
/
employees
curl -X POST https://api.cuido.com/api/employees \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "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"
  }'
{
  "success": true,
  "message": "Empleado creado 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": 3,
        "averageWorkload": 3,
        "teamSupportScore": 3,
        "satisfactionScore": 5,
        "riskLevel": "bajo"
      },
      "gamification": {
        "totalPoints": 0,
        "currentStreak": 0,
        "maxStreak": 0,
        "level": 1,
        "badges": []
      },
      "isActive": true,
      "createdAt": "2024-03-05T10:30:00.000Z",
      "updatedAt": "2024-03-05T10:30:00.000Z"
    }
  }
}

Authentication

Authorization
string
required
Bearer token for authentication
This endpoint requires admin privileges.

Request Body

personalInfo
object
required
Personal information about the employee
jobInfo
object
required
Employment and role information
hospitalId
string
required
Identifier of the hospital this employee belongs to
wellnessMetrics
object
Initial wellness metrics (optional, defaults provided)
gamification
object
Initial gamification data (optional, defaults provided)
isActive
boolean
Whether the employee is currently active (default: true)

Response

success
boolean
Indicates if the request was successful
message
string
Success message
data
object
Response data
curl -X POST https://api.cuido.com/api/employees \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "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"
  }'
{
  "success": true,
  "message": "Empleado creado 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": 3,
        "averageWorkload": 3,
        "teamSupportScore": 3,
        "satisfactionScore": 5,
        "riskLevel": "bajo"
      },
      "gamification": {
        "totalPoints": 0,
        "currentStreak": 0,
        "maxStreak": 0,
        "level": 1,
        "badges": []
      },
      "isActive": true,
      "createdAt": "2024-03-05T10:30:00.000Z",
      "updatedAt": "2024-03-05T10:30:00.000Z"
    }
  }
}

Build docs developers (and LLMs) love