Skip to content

Update employee

employees.update(stremployee_id, EmployeeUpdateParams**kwargs) -> 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.

ParametersExpand Collapse
employee_id: str

Unique employee identifier (empl_*)

effective_date: Union[null, null]

Past or present date applied to each tracked employment field included in this request

formatdate
address: Optional[Address]

Employee’s residential address

city: str

City name

state: str

Two-letter state code

maxLength2
minLength2
street_1: str

Primary street address

zip_code: str

ZIP code

country: Optional[str]

Country code

street_2: Optional[str]

Secondary street address

compensation_type: Optional[Literal["Salary", "Hourly"]]
  • Salary - Salary
  • Hourly - Hourly
One of the following:
"Salary"
"Hourly"
email: Optional[str]

Email address

formatemail
employee_class: Optional[EmployeeClass]
  • Full Time - Full Time
  • Part Time - Part Time
  • Temporary - Temporary
  • Intern - Intern
  • Seasonal - Seasonal
  • Individual Contractor - Individual Contractor
One of the following:
"Full Time"
"Part Time"
"Temporary"
"Intern"
"Seasonal"
"Individual Contractor"
gender: Optional[Literal["Male", "Female", "Transgender", 2 more]]
  • Male - Male
  • Female - Female
  • Transgender - Transgender
  • Non-binary - Non Binary
  • Prefer not to respond - Prefer Not To Respond
One of the following:
"Male"
"Female"
"Transgender"
"Non-binary"
"Prefer not to respond"
phone: Optional[str]

Phone number

start_date: Optional[Union[null, null, null]]

Employment start date

formatdate
ReturnsExpand Collapse
class EmployeeUpdateResponse:

Response containing a single employee resource.

data: Employee
id: str

Unique employee identifier with ‘empl_’ prefix

classification_effective_date: date

Date the employee’s current classification took effect

formatdate
compensation_type: Optional[Literal["Salary", "Hourly"]]
  • Salary - Salary
  • Hourly - Hourly
One of the following:
"Salary"
"Hourly"
compensation_type_effective_date: date

Date the employee’s current compensation type took effect

formatdate
created_at: datetime

Timestamp when the employee was created

formatdate-time
date_of_birth: date

Date of birth (YYYY-MM-DD)

formatdate
deductions: List[Deduction]

Payroll deductions from the most recent statement period. Replaced when a new statement is generated.

benefit_name: str

Name of the benefit plan

deduction_amount_in_cents: int

Employee deduction amount in cents

deduction_category: Optional[str]

Deduction category (reserved for future use)

frequency: Literal["weekly", "bi_weekly", "semi_monthly", "monthly"]
  • weekly - Weekly
  • bi_weekly - Bi Weekly
  • semi_monthly - Semi Monthly
  • monthly - Monthly
One of the following:
"weekly"
"bi_weekly"
"semi_monthly"
"monthly"
period_end_date: date

Period end date (YYYY-MM-DD)

formatdate
period_start_date: date

Period start date (YYYY-MM-DD)

formatdate
tax_classification: Literal["Unknown", "Pre-tax", "Post-tax"]
  • Unknown - Unknown
  • Pre-tax - Pre Tax
  • Post-tax - Post Tax
One of the following:
"Unknown"
"Pre-tax"
"Post-tax"
email: str

Email address

formatemail
employee_class: EmployeeClass
  • Full Time - Full Time
  • Part Time - Part Time
  • Temporary - Temporary
  • Intern - Intern
  • Seasonal - Seasonal
  • Individual Contractor - Individual Contractor
One of the following:
"Full Time"
"Part Time"
"Temporary"
"Intern"
"Seasonal"
"Individual Contractor"
employer_id: str

Unique identifier of the employer this employment is with (empr_*)

first_name: str

Employee’s legal first name

last_name: str

Employee’s legal last name

member_id: str

Unique member identifier with ‘mbr_’ prefix

phone: Optional[str]

Phone number (10-digit US domestic string)

start_date: date

Employee’s start date with the employer

formatdate
status: Literal["active", "terminated"]

Employee status (active or terminated)

One of the following:
"active"
"terminated"
updated_at: datetime

Timestamp when the employee was last updated

formatdate-time
address: Optional[Address]

Employee’s residential address

address_line_1: str

Primary street address

city: str

City name

state: str

Two-letter state code (e.g., CA, NY)

zipcode: str

ZIP code (5 or 9 digit)

address_line_2: Optional[str]

Secondary street address (apt, suite, etc.)

employer_name: Optional[str]

Name of the employer this employment is with

gender: Optional[str]

Gender identity, if provided

reference_id: Optional[str]

Partner-assigned reference ID for the employee

suffix: Optional[str]

Name suffix (e.g., Jr., Sr., III)

termination_date: Optional[date]

Employee’s termination date, if terminated

formatdate

Update employee

import os
from datetime import date
from vitable_connect import VitableConnect

client = VitableConnect(
    api_key=os.environ.get("VITABLE_CONNECT_API_KEY"),  # This is the default and can be omitted
)
employee = client.employees.update(
    employee_id="empl_abc123def456",
    effective_date=date.fromisoformat("2023-03-01"),
    compensation_type="Salary",
    employee_class="Full Time",
    start_date=date.fromisoformat("2023-01-15"),
)
print(employee.data)
{
  "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"
  }
}
Returns Examples
{
  "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"
  }
}