Employee Census

Benbase requires employee census data to ensure accurate benefits administration. When a census is needed, Benbase will send a webhook notification through Svix, and you'll need to respond with the current employee data.

How It Works

  1. Webhook Notification: Benbase sends a webhook when census data is needed
  2. Upload Census Data: You respond with the complete employee census via API
  3. Sync Completion: Benbase sends a confirmation webhook when processing is complete

Step 1: Sync Request Webhook Notification

When Benbase requires employee census data, you'll receive a webhook with the following event:

Event Type: employee-census.sync-request

Webhook Payload

{
  "data": {
    "employer_id": "emp_123456789"
  },
  "event_type": "employee-census.sync-request",
  "id": "wh_tqYaajv7yzbKX6m5Bf80P"
}

Step 2: Upload Census Data

After receiving the webhook, you must upload your complete employee census data using the API endpoint.

POST {{API_BASE_URL}}/employer/{id}/census

Request Payload

{
  "organization": {
    "legal_business_name": "Acme Corporation",
    "fein": "12-3456789",
    "entity_type": "C-Corp",
    "contact": {
      "first_name": "John",
      "last_name": "Smith",
      "email": "john.smith@acme.com"
    },
    "address": {
      "line1": "123 Business Street",
      "line2": "Suite 100",
      "city": "Austin",
      "state": "TX",
      "zip_code": "73301"
    }
  },
  "employees": [
    {
      "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",
      "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"
    },
    {
      "employee_id": "emp_987654321",
      "first_name": "Jane",
      "last_name": "Smith",
      "dob": "1985-05-20",
      "address": {
        "line1": "456 Oak Avenue",
        "city": "Los Angeles",
        "state": "CA",
        "zip_code": "90210"
      },
      "hire_date": "2023-06-01",
      "email": "jane.smith@example.com",
      "hours_worked": "40",
      "pay_frequency": "monthly",
      "pay_rate": [
        {
          "amount": "75000.00",
          "period": "annually",
          "effective_start": "2023-06-01"
        }
      ],
      "employment_status": "full_time"
    }
  ]
}

Required Fields

FieldTypeDescriptionValidation
organizationobjectOrganization informationRequired, see Organization fields below
employeesarrayArray of employee objectsRequired, minimum 1 employee

Organization Fields

FieldTypeRequiredDescriptionValidation
legal_business_namestringYesLegal business name of the organizationRequired
feinstringYesFederal Employer Identification NumberRequired
entity_typestringNoType of business entityOptional, see Entity Types below
contactobjectYesContact person informationRequired, see Contact fields below
addressobjectYesOrganization addressRequired, see Address fields below

Entity Types

Entity TypeDescription
C-CorpC Corporation
S-CorpS Corporation
B-CorpBenefit Corporation
LLCLimited Liability Company
Non-profitNon-profit Organization
Sole ProprietorSole Proprietorship

Contact Fields

FieldTypeRequiredDescriptionValidation
first_namestringYesContact person's first nameRequired
last_namestringYesContact person's last nameRequired
emailstringYesContact person's email addressRequired, valid email format

Employee Object Fields

Required Fields

FieldTypeDescriptionValidation
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
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 Request

curl -X POST {{API_BASE_URL}}/employer/emp_123456789/census \
  -H "Authorization: Bearer {{API_KEY}}" \
  -H "Content-Type: application/json" \
  -d '{
    "organization": {
      "legal_business_name": "Acme Corporation",
      "fein": "12-3456789",
      "entity_type": "C-Corp",
      "contact": {
        "first_name": "John",
        "last_name": "Smith",
        "email": "john.smith@acme.com"
      },
      "address": {
        "line1": "123 Business Street",
        "line2": "Suite 100",
        "city": "Austin",
        "state": "TX",
        "zip_code": "73301"
      }
    },
    "employees": [
      {
        "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"
      }
    ]
  }'

Step 3: Sync Completion Notification

After the census data is processed, Benbase will send a webhook notification confirming the sync is complete.

Event Type: employee-census.sync-complete

Webhook Payload

{
  "data": {
    "employer_id": "emp_123456789"
  },
  "event_type": "employee-census.sync-complete",
  "id": "wh_tqYaajv7yzbKX6m5Bf80P"
}

Best Practices

Was this page helpful?