# Get a single worker Retrieves detailed information about a specific worker by unique identifier or worker_id. Features: - Requires JWT token authentication in the Authorization header - Company context is inferred from the authenticated user - Can fetch by unique identifier or by worker_id (e.g., "JS0315") - Returns full worker details including all fields Endpoint: GET /api/control/workers/{worker} Version: 2.0.0 Security: bearerAuth ## Path parameters: - `worker` (string, required) Worker identifier (unique id or worker_id like "JS0315") ## Query parameters: - `auth0Id` (string, required) User identifier (internal use, can be derived from JWT token) Example: "user_123456789" ## Response 200 fields (application/json): - `status` (string) Example: "success" - `data` (object) - `data.workerId` (string) Worker unique identifier Example: "6507f1e3c9d8e2a4b1f9c3d5" - `data.worker_id` (string) Worker business ID (INITIALS + MMDD of hire date) Example: "JS0315" - `data.first_name` (string) Worker first name Example: "John" - `data.last_name` (string) Worker last name Example: "Smith" - `data.phone` (string) Worker phone number Example: "+1234567890" - `data.email` (string) Worker email address Example: "john.smith@example.com" - `data.position` (string) Worker position Example: "field_worker" - `data.employment_type` (string) Employment type Example: "full_time" - `data.hire_date` (string) Hire date in YYYY-MM-DD format Example: "2025-03-15" - `data.termination_date` (string,null) Termination date in YYYY-MM-DD format (null if still employed) - `data.status` (string) Worker status Example: "active" - `data.hourly_rate` (number) Hourly rate (if applicable) Example: 18.5 - `data.emergency_contact_name` (string) Emergency contact name Example: "Jane Smith" - `data.emergency_contact_phone` (string) Emergency contact phone number Example: "+1234567891" - `data.skills` (array) Worker skills Example: ["irrigation","pruning"] - `data.notes` (string) Additional notes about the worker Example: "Experienced in avocado cultivation" - `data.photo` (string,null) URL of worker photo Example: "https://storage.example.com/photos/worker-photo.jpg" - `data._id` (string) unique identifier Example: "6507f1e3c9d8e2a4b1f9c3d5" - `data.name` (string) Full name (first + last) Example: "John Smith" - `data.companyId` (string) Example: "comp_12345" - `data.companyName` (string) Example: "Hydrobit Client SA" - `data.createdAt` (string) Example: "2025-03-15T10:30:00.000Z" - `data.updatedAt` (string) Example: "2025-03-15T10:30:00.000Z" ## Response 400 fields (application/json): - `status` (string) Example: "error" - `message` (string) Example: "Error message description" - `error` (string) Example: "Detailed error information" ## Response 401 fields (application/json): - `status` (string) Example: "error" - `message` (string) Example: "Error message description" - `error` (string) Example: "Detailed error information" ## Response 404 fields (application/json): - `status` (string) Example: "error" - `message` (string) Example: "Error message description" - `error` (string) Example: "Detailed error information" ## Response 500 fields (application/json): - `status` (string) Example: "error" - `message` (string) Example: "Error message description" - `error` (string) Example: "Detailed error information"