Employment Changes

Benbase provides API endpoints to handle employment lifecycle events including new hires, terminations, demographic updates and compensation changes.

New Hire

This endpoint should be called whenever a new employee is added to an existing employer.

POST /employee-changes/new-hire

Request Payload

{
  "employer_id": "emp_123456789",
  "employee_id": "emp_LRgFZ2uXBSVsR6Q0g9Q54",
  "first_name": "John",
  "last_name": "Doe",
  "dob": "1990-01-15",
  "address": {
    "line1": "123 Main Street",
    "line2": "Apt 4B",
    "city": "New York",
    "state": "NY",
    "zip_code": "10001"
  },
  "hire_date": "2024-01-15",
  "ssn": "123-45-6789",
  "email": "john.doe@example.com",
  "phone_number": "5551234567",
  "biological_sex": "male",
  "hours_worked": "40",
  "pay_frequency": "biweekly",
  "pay_rate": [
    {
      "amount": "25.50",
      "period": "hourly",
      "effective_start": "2024-01-15"
    }
  ],
  "employment_status": "full_time",
  "job_title": "Software Engineer"
}

Required Fields

FieldTypeDescriptionValidation
employer_idstringUnique identifier for the employerRequired, min 1 character
employee_idstringUnique identifier for the employeeRequired, min 1 character
first_namestringEmployee's first nameRequired, max 255 characters
last_namestringEmployee's last nameRequired, max 255 characters
dobstringDate of birthRequired, YYYY-MM-DD format
employerstringEmployer nameRequired, min 1 character
addressobjectEmployee's addressRequired, see Address fields below
hire_datestringEmployee's hire dateRequired, YYYY-MM-DD format
emailstringEmployee's email addressRequired, valid email format, max 254 characters
hours_workedstringHours worked per weekRequired
pay_ratearrayEmployee's pay rate informationRequired, array of pay rate objects
employment_statusstringEmployment statusRequired, full_time or part_time

Optional Fields

FieldTypeDescriptionValidation
ssnstringSocial Security NumberOptional
phone_numberstringEmployee's phone numberOptional, max 10 characters
termination_datestringEmployee's termination dateOptional, YYYY-MM-DD format
biological_sexstringEmployee's biological sexOptional, male or female
pay_frequencystringPay frequencyOptional, weekly, biweekly, semimonthly, or monthly
job_titlestringEmployee's job titleOptional, max 255 characters

Address Fields

FieldTypeRequiredDescription
line1stringYesPrimary address line
line2stringNoSecondary address line (apartment, suite, etc.)
citystringYesCity name
statestringYesState code: AL AK AZ AR CA CO CT DE DC FL GA HI ID IL IN IA KS KY LA ME MD MA MI MN MS MO MT NE NV NH NJ NM NY NC ND OH OK OR PA RI SC SD TN TX UT VT VA WA WV WI WY
zip_codestringYesZIP code

Pay Rate Fields

FieldTypeRequiredDescriptionValidation
amountstringYesPay rate amountRequired, must be 0 or more, rounded to 2 decimal places (e.g., 2.55)
periodstringYesPay rate periodRequired, see Period options below
effective_startstringYesWhen the pay rate becomes effectiveRequired, YYYY-MM-DD format

Period Options

PeriodDescription
hourlyHourly rate
annuallyAnnual rate

Sample Code

curl -X POST {{API_BASE_URL}}/employee-changes/new-hire \
  -H "Authorization: Bearer {{API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "employer_id": "emp_123456789",
    "employee_id": "emp_LRgFZ2uXBSVsR6Q0g9Q54",
    "first_name": "John",
    "last_name": "Doe",
    "dob": "1990-01-15",
    "address": {
      "line1": "123 Main Street",
      "city": "New York",
      "state": "NY",
      "zip_code": "10001"
    },
    "hire_date": "2024-01-15",
    "email": "john.doe@example.com",
    "hours_worked": "40",
    "pay_frequency": "biweekly",
    "pay_rate": [
      {
        "amount": "25.50",
        "period": "hourly",
        "effective_start": "2024-01-15"
      }
    ],
    "employment_status": "full_time"
  }'

Termination

Should be used to notify when an existing employee is going to be terminated. All post-termination processes are handled automatically by Benbase.

POST /employee-changes/termination

Request Payload

{
  "employee_id": "emp_LRgFZ2uXBSVsR6Q0g9Q54",
  "termination_date": "2024-12-31"
}

Fields

FieldTypeRequiredDescriptionValidation
employee_idstringYesEmployee IDRequired, min 1 character
termination_datestringYesEmployee's termination dateRequired, YYYY-MM-DD format

Sample Code

curl -X POST {{API_BASE_URL}}/employee-changes/termination \
  -H "Authorization: Bearer {{API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "employee_id": "emp_LRgFZ2uXBSVsR6Q0g9Q54",
    "termination_date": "2024-12-31"
  }'

Demographic Update

Update an existing employee's address information. This endpoint is used when an employee moves to a different address or state.

POST /employee-changes/demographic

Request Payload

{
  "employee_id": "emp_LRgFZ2uXBSVsR6Q0g9Q54",
  "address": {
    "line1": "456 New Street",
    "line2": "Unit 7C",
    "city": "Los Angeles",
    "state": "CA",
    "zip_code": "90210"
  }
}

Fields

FieldTypeRequiredDescriptionValidation
employee_idstringYesEmployee IDRequired, min 1 character
addressobjectYesUpdated address informationRequired, see Address fields above

Sample Code

curl -X POST {{API_BASE_URL}}/employee-changes/demographic \
  -H "Authorization: Bearer {{API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "employee_id": "emp_LRgFZ2uXBSVsR6Q0g9Q54",
    "address": {
      "line1": "456 New Street",
      "city": "Los Angeles",
      "state": "CA",
      "zip_code": "90210"
    }
  }'

Compensation Change

Update an existing employee's compensation information including pay frequency, pay rate, or employment status.

POST /employee-changes/compensation-change

Request Payload

{
  "employee_id": "emp_LRgFZ2uXBSVsR6Q0g9Q54",
  "pay_frequency": "biweekly",
  "pay_rate": {
    "amount": "75000.00",
    "period": "annually",
    "effective_start": "2025-01-01"
  },
  "employment_status": "full_time"
}

Fields

FieldTypeRequiredDescriptionValidation
employee_idstringYesEmployee IDRequired, min 1 character
pay_frequencystringNoPay frequencyOptional, weekly, biweekly, semimonthly, or monthly
pay_rateobjectNoUpdated pay rate informationOptional, see Pay Rate fields below
employment_statusstringNoEmployment statusOptional, full_time, part_time, or variable_hours

Pay Rate Fields

FieldTypeRequiredDescriptionValidation
amountstringYesPay rate amountRequired, must be 0 or more, rounded to 2 decimal places (e.g., "75000.00")
periodstringYesPay rate periodRequired, annually or hourly
effective_startstringYesWhen the pay rate becomes effectiveRequired, YYYY-MM-DD format

Sample Code

curl -X POST {{API_BASE_URL}}/employee-changes/compensation-change \
  -H "Authorization: Bearer {{API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "employee_id": "emp_LRgFZ2uXBSVsR6Q0g9Q54",
    "pay_frequency": "biweekly",
    "pay_rate": {
      "amount": "75000.00",
      "period": "annually",
      "effective_start": "2025-01-01"
    },
    "employment_status": "full_time"
  }'

Was this page helpful?