# Employees ## Get employee `employees.retrieve(employee_id) -> EmployeeRetrieveResponse` **get** `/v1/employees/{employee_id}` Retrieves detailed information for a specific employee by ID. Returns employee details including personal information and employment status. ### Parameters - `employee_id: String` Unique employee identifier (empl_*) ### Returns - `class EmployeeRetrieveResponse` Response containing a single employee resource. - `data: Employee` - `id: String` Unique employee identifier with 'empl_' prefix - `created_at: Time` Timestamp when the employee was created - `date_of_birth: Date` Date of birth (YYYY-MM-DD) - `email: String` Email address - `enrollments: Array[{ id, status, answered_at}]` Benefit enrollments for this employee - `id: String` Unique enrollment identifier with 'enrl_' prefix - `status: EnrollmentStatus` * `pending` - Pending * `enrolled` - Enrolled * `waived` - Waived * `inactive` - Inactive - `:pending` - `:enrolled` - `:waived` - `:inactive` - `answered_at: Time` Timestamp when the enrollment decision was made - `first_name: String` Employee's legal first name - `last_name: String` Employee's legal last name - `member_id: String` Unique member identifier with 'mbr_' prefix - `status: String` Employee status (active or terminated) - `updated_at: Time` Timestamp when the employee was last updated - `address: { address_line_1, city, state, 2 more}` Employee's residential address - `address_line_1: String` Primary street address - `city: String` City name - `state: String` Two-letter state code (e.g., CA, NY) - `zipcode: String` ZIP code (5 or 9 digit) - `address_line_2: String` Secondary street address (apt, suite, etc.) - `employee_class: EmployeeClass` * `Full Time` - Full Time * `Part Time` - Part Time * `Temporary` - Temporary * `Intern` - Intern * `Seasonal` - Seasonal * `Individual Contractor` - Individual Contractor - `:"Full Time"` - `:"Part Time"` - `:Temporary` - `:Intern` - `:Seasonal` - `:"Individual Contractor"` - `gender: String` Gender identity, if provided - `hire_date: Date` Employee's hire date with the employer - `phone: String` Phone number (10-digit US domestic string) - `reference_id: String` Partner-assigned reference ID for the employee - `suffix: String` Name suffix (e.g., Jr., Sr., III) - `termination_date: Date` Employee's termination date, if terminated ### Example ```ruby require "vitable_connect" vitable_connect = VitableConnect::Client.new( api_key: "My API Key", environment: "environment_1" # defaults to "production" ) employee = vitable_connect.employees.retrieve("empl_abc123def456") puts(employee) ``` #### Response ```json { "data": { "id": "empl_abc123", "member_id": "mbr_xyz789", "reference_id": "partner-ee-001", "first_name": "John", "last_name": "Doe", "suffix": null, "email": "john.doe@example.com", "date_of_birth": "1985-06-15", "gender": null, "phone": "4155551234", "employee_class": "Full Time", "status": "active", "hire_date": "2023-01-15", "termination_date": null, "address": { "address_line_1": "456 Oak Avenue", "address_line_2": "Apt 2B", "city": "San Francisco", "state": "CA", "zipcode": "94102" }, "enrollments": [ { "id": "enrl_abc123", "status": "enrolled", "answered_at": "2023-01-20T10:00:00Z" } ], "created_at": "2023-01-15T09:00:00Z", "updated_at": "2024-06-01T14:30:00Z" } } ``` ## List employee enrollments `employees.list_enrollments(employee_id, **kwargs) -> PageNumberPage` **get** `/v1/employees/{employee_id}/enrollments` Retrieves a paginated list of benefit enrollments for an employee. ### Parameters - `employee_id: String` Unique employee identifier (empl_*) - `limit: Integer` Items per page (default: 20, max: 100) - `page: Integer` Page number (default: 1) ### Returns - `class Enrollment` - `id: String` Unique enrollment identifier (enrl_*) - `answered_at: Time` When the employee enrolled or waived - `benefit: { id, category, name, product_code}` Nested benefit product summary - `id: String` Benefit product ID (bprd_*) - `category: :Medical | :Dental | :Vision | :Hospital` * `Medical` - Medical * `Dental` - Dental * `Vision` - Vision * `Hospital` - Hospital - `:Medical` - `:Dental` - `:Vision` - `:Hospital` - `name: String` Display name of the benefit product - `product_code: :EBA | :VPC | :VPC_CORE | 12 more` * `EBA` - Eba Mec * `VPC` - Vpc Enhanced * `VPC_CORE` - Vpc Core * `MEC` - Vpc Mec * `MEC2` - Mec2 * `MEC_PLUS` - Mec Plus * `MVP` - Mvp * `MVP2` - Mvp2 * `MVPSL` - Mvpsl * `MVPSL2` - Mvpsl2 * `VD` - Dental * `VV` - Vision * `ICHRA` - Ichra * `ICHRA_PREMIUM_PLUS` - Ichra Premium Plus * `ICHRA_REIMBURSEMENT_ONLY` - Ichra Reimbursement Only - `:EBA` - `:VPC` - `:VPC_CORE` - `:MEC` - `:MEC2` - `:MEC_PLUS` - `:MVP` - `:MVP2` - `:MVPSL` - `:MVPSL2` - `:VD` - `:VV` - `:ICHRA` - `:ICHRA_PREMIUM_PLUS` - `:ICHRA_REIMBURSEMENT_ONLY` - `coverage_end: Date` Coverage period end date - `coverage_start: Date` Coverage period start date - `created_at: Time` When the enrollment was created - `employee_deduction_in_cents: Integer` Employee monthly payroll deduction in cents - `employee_id: String` Employee ID (empl_*) - `employer_contribution_in_cents: Integer` Employer monthly contribution in cents - `employer_id: String` Employer ID (empr_*) - `status: EnrollmentStatus` * `pending` - Pending * `enrolled` - Enrolled * `waived` - Waived * `inactive` - Inactive - `:pending` - `:enrolled` - `:waived` - `:inactive` - `terminated_at: Time` When coverage was terminated - `updated_at: Time` When the enrollment was last updated ### Example ```ruby require "vitable_connect" vitable_connect = VitableConnect::Client.new( api_key: "My API Key", environment: "environment_1" # defaults to "production" ) page = vitable_connect.employees.list_enrollments("empl_abc123def456") puts(page) ``` #### Response ```json { "data": [ { "id": "enrl_abc123def456", "employee_id": "empl_xyz789ghi012", "employer_id": "empr_def456ghi789", "benefit": { "id": "bprd_medical456", "name": "MEC Plus", "product_code": "MEC_PLUS", "category": "Medical" }, "status": "enrolled", "coverage_start": "2026-04-01", "coverage_end": "2027-03-31", "employee_deduction_in_cents": 5000, "employer_contribution_in_cents": 25000, "answered_at": "2026-01-20T14:30:00Z", "terminated_at": null, "created_at": "2026-01-15T10:30:00Z", "updated_at": "2026-01-15T10:30:00Z" } ], "pagination": { "page": 1, "limit": 20, "total": 1, "total_pages": 1 } } ``` ## Domain Types ### Employee - `class Employee` - `id: String` Unique employee identifier with 'empl_' prefix - `created_at: Time` Timestamp when the employee was created - `date_of_birth: Date` Date of birth (YYYY-MM-DD) - `email: String` Email address - `enrollments: Array[{ id, status, answered_at}]` Benefit enrollments for this employee - `id: String` Unique enrollment identifier with 'enrl_' prefix - `status: EnrollmentStatus` * `pending` - Pending * `enrolled` - Enrolled * `waived` - Waived * `inactive` - Inactive - `:pending` - `:enrolled` - `:waived` - `:inactive` - `answered_at: Time` Timestamp when the enrollment decision was made - `first_name: String` Employee's legal first name - `last_name: String` Employee's legal last name - `member_id: String` Unique member identifier with 'mbr_' prefix - `status: String` Employee status (active or terminated) - `updated_at: Time` Timestamp when the employee was last updated - `address: { address_line_1, city, state, 2 more}` Employee's residential address - `address_line_1: String` Primary street address - `city: String` City name - `state: String` Two-letter state code (e.g., CA, NY) - `zipcode: String` ZIP code (5 or 9 digit) - `address_line_2: String` Secondary street address (apt, suite, etc.) - `employee_class: EmployeeClass` * `Full Time` - Full Time * `Part Time` - Part Time * `Temporary` - Temporary * `Intern` - Intern * `Seasonal` - Seasonal * `Individual Contractor` - Individual Contractor - `:"Full Time"` - `:"Part Time"` - `:Temporary` - `:Intern` - `:Seasonal` - `:"Individual Contractor"` - `gender: String` Gender identity, if provided - `hire_date: Date` Employee's hire date with the employer - `phone: String` Phone number (10-digit US domestic string) - `reference_id: String` Partner-assigned reference ID for the employee - `suffix: String` Name suffix (e.g., Jr., Sr., III) - `termination_date: Date` Employee's termination date, if terminated ### Employee Class - `EmployeeClass = :"Full Time" | :"Part Time" | :Temporary | 3 more` * `Full Time` - Full Time * `Part Time` - Part Time * `Temporary` - Temporary * `Intern` - Intern * `Seasonal` - Seasonal * `Individual Contractor` - Individual Contractor - `:"Full Time"` - `:"Part Time"` - `:Temporary` - `:Intern` - `:Seasonal` - `:"Individual Contractor"` ### Pagination - `class Pagination` Pagination metadata for list responses. - `limit: Integer` Items per page - `page: Integer` Current page number - `total: Integer` Total number of items - `total_pages: Integer` Total number of pages