## Update employee `client.employees.update(stringemployeeID, EmployeeUpdateParamsbody, RequestOptionsoptions?): EmployeeUpdateResponse` **patch** `/v1/employees/{employee_id}` Updates employee personal, contact, address, and employment fields. This endpoint currently supports email, phone, gender, address, employee_class, start_date, and compensation_type. effective_date is required and applies to employee_class and compensation_type when those fields are included in the request. ### Parameters - `employeeID: string` Unique employee identifier (empl_*) - `body: EmployeeUpdateParams` - `effective_date: string` Past or present date applied to each tracked employment field included in this request - `address?: Address | null` Employee's residential address - `city: string` City name - `state: string` Two-letter state code - `street_1: string` Primary street address - `zip_code: string` ZIP code - `country?: string` Country code - `street_2?: string | null` Secondary street address - `compensation_type?: "Salary" | "Hourly" | null` * `Salary` - Salary * `Hourly` - Hourly - `"Salary"` - `"Hourly"` - `email?: string | null` Email address - `employee_class?: EmployeeClass | null` * `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?: "Male" | "Female" | "Transgender" | 2 more | null` * `Male` - Male * `Female` - Female * `Transgender` - Transgender * `Non-binary` - Non Binary * `Prefer not to respond` - Prefer Not To Respond - `"Male"` - `"Female"` - `"Transgender"` - `"Non-binary"` - `"Prefer not to respond"` - `phone?: string | null` Phone number - `start_date?: string | null` Employment start date ### Returns - `EmployeeUpdateResponse` Response containing a single employee resource. - `data: Employee` - `id: string` Unique employee identifier with 'empl_' prefix - `classification_effective_date: string` Date the employee's current classification took effect - `compensation_type: "Salary" | "Hourly" | null` * `Salary` - Salary * `Hourly` - Hourly - `"Salary"` - `"Hourly"` - `compensation_type_effective_date: string` Date the employee's current compensation type took effect - `created_at: string` Timestamp when the employee was created - `date_of_birth: string` Date of birth (YYYY-MM-DD) - `deductions: Array` Payroll deductions from the most recent statement period. Replaced when a new statement is generated. - `benefit_name: string` Name of the benefit plan - `deduction_amount_in_cents: number` Employee deduction amount in cents - `deduction_category: string | null` Deduction category (reserved for future use) - `frequency: "weekly" | "bi_weekly" | "semi_monthly" | "monthly"` * `weekly` - Weekly * `bi_weekly` - Bi Weekly * `semi_monthly` - Semi Monthly * `monthly` - Monthly - `"weekly"` - `"bi_weekly"` - `"semi_monthly"` - `"monthly"` - `period_end_date: string` Period end date (YYYY-MM-DD) - `period_start_date: string` Period start date (YYYY-MM-DD) - `tax_classification: "Unknown" | "Pre-tax" | "Post-tax"` * `Unknown` - Unknown * `Pre-tax` - Pre Tax * `Post-tax` - Post Tax - `"Unknown"` - `"Pre-tax"` - `"Post-tax"` - `email: string` Email address - `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"` - `employer_id: string` Unique identifier of the employer this employment is with (empr_*) - `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 - `phone: string | null` Phone number (10-digit US domestic string) - `start_date: string` Employee's start date with the employer - `status: "active" | "terminated"` Employee status (active or terminated) - `"active"` - `"terminated"` - `updated_at: string` Timestamp when the employee was last updated - `address?: Address | null` 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 | null` Secondary street address (apt, suite, etc.) - `employer_name?: string | null` Name of the employer this employment is with - `gender?: string | null` Gender identity, if provided - `reference_id?: string | null` Partner-assigned reference ID for the employee - `suffix?: string | null` Name suffix (e.g., Jr., Sr., III) - `termination_date?: string | null` Employee's termination date, if terminated ### Example ```typescript import VitableConnect from '@vitable-inc/vitable-connect'; const client = new VitableConnect({ apiKey: process.env['VITABLE_CONNECT_API_KEY'], // This is the default and can be omitted }); const employee = await client.employees.update('empl_abc123def456', { effective_date: '2023-03-01', compensation_type: 'Salary', employee_class: 'Full Time', start_date: '2023-01-15', }); console.log(employee.data); ``` #### Response ```json { "data": { "id": "id", "classification_effective_date": "2019-12-27", "compensation_type": "Salary", "compensation_type_effective_date": "2019-12-27", "created_at": "2019-12-27T18:11:19.117Z", "date_of_birth": "2019-12-27", "deductions": [ { "benefit_name": "benefit_name", "deduction_amount_in_cents": 0, "deduction_category": "deduction_category", "frequency": "weekly", "period_end_date": "2019-12-27", "period_start_date": "2019-12-27", "tax_classification": "Unknown" } ], "email": "dev@stainless.com", "employee_class": "Full Time", "employer_id": "employer_id", "first_name": "first_name", "last_name": "last_name", "member_id": "member_id", "phone": "phone", "start_date": "2019-12-27", "status": "active", "updated_at": "2019-12-27T18:11:19.117Z", "address": { "address_line_1": "address_line_1", "city": "city", "state": "state", "zipcode": "zipcode", "address_line_2": "address_line_2" }, "employer_name": "employer_name", "gender": "gender", "reference_id": "reference_id", "suffix": "suffix", "termination_date": "2019-12-27" } } ```