Skip to content

Submit census sync

employers.submit_census_sync(stremployer_id, EmployerSubmitCensusSyncParams**kwargs) -> EmployerSubmitCensusSyncResponse
POST/v1/employers/{employer_id}/census-sync

Submits a census sync payload for the specified employer. The employees in the payload will be queued for processing. Returns an accepted response with the timestamp of acceptance.

ParametersExpand Collapse
employer_id: str

Unique employer identifier (empr_*)

employees: Iterable[Employee]
date_of_birth: Union[null, null]
formatdate
email: str
formatemail
first_name: str
maxLength255
last_name: str
maxLength255
phone: str
address: Optional[EmployeeAddress]
address_line_1: str
maxLength255
city: str
maxLength255
state: Literal["AL", "AK", "AZ", 59 more]
  • AL - AL
  • AK - AK
  • AZ - AZ
  • AR - AR
  • CA - CA
  • CO - CO
  • CT - CT
  • DC - DC
  • DE - DE
  • FL - FL
  • GA - GA
  • HI - HI
  • ID - ID
  • IL - IL
  • IN - IN
  • IA - IA
  • KS - KS
  • KY - KY
  • LA - LA
  • ME - ME
  • MD - MD
  • MA - MA
  • MI - MI
  • MN - MN
  • MS - MS
  • MO - MO
  • MT - MT
  • NE - NE
  • NV - NV
  • NH - NH
  • NJ - NJ
  • NM - NM
  • NY - NY
  • NC - NC
  • ND - ND
  • OH - OH
  • OK - OK
  • OR - OR
  • PA - PA
  • RI - RI
  • SC - SC
  • SD - SD
  • TN - TN
  • TX - TX
  • UT - UT
  • VT - VT
  • VA - VA
  • WA - WA
  • WI - WI
  • WV - WV
  • WY - WY
  • PR - PR
  • GU - GU
  • AS - AS
  • VI - VI
  • MP - MP
  • MH - MH
  • PW - PW
  • FM - FM
  • AE - AE
  • AA - AA
  • AP - AP
One of the following:
"AL"
"AK"
"AZ"
"AR"
"CA"
"CO"
"CT"
"DC"
"DE"
"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"
"WI"
"WV"
"WY"
"PR"
"GU"
"AS"
"VI"
"MP"
"MH"
"PW"
"FM"
"AE"
"AA"
"AP"
zipcode: str
maxLength10
address_line_2: Optional[str]
maxLength255
compensation_type: Optional[Literal["Salary", "Hourly"]]
  • Salary - Salary
  • Hourly - Hourly
One of the following:
"Salary"
"Hourly"
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"
reference_id: Optional[str]
maxLength255
start_date: Optional[Union[null, null, null]]
formatdate
ReturnsExpand Collapse
class EmployerSubmitCensusSyncResponse:

Response containing a single census sync detail resource.

data: Data
accepted_at: datetime
formatdate-time
employer_id: str

Submit census sync

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
)
response = client.employers.submit_census_sync(
    employer_id="empr_abc123def456",
    employees=[{
        "reference_id": "EMP-001",
        "first_name": "Jane",
        "last_name": "Doe",
        "date_of_birth": date.fromisoformat("1990-05-15"),
        "email": "jane.doe@acme.com",
        "phone": "4155550100",
        "address": {
            "address_line_1": "123 Main Street",
            "address_line_2": "Apt 4B",
            "city": "San Francisco",
            "state": "CA",
            "zipcode": "94102",
        },
        "start_date": date.fromisoformat("2024-01-15"),
        "employee_class": "Full Time",
        "compensation_type": "Salary",
    }, {
        "first_name": "John",
        "last_name": "Smith",
        "date_of_birth": date.fromisoformat("1985-11-20"),
        "email": "john.smith@acme.com",
        "phone": "4155550101",
        "start_date": date.fromisoformat("2024-03-01"),
        "employee_class": "Part Time",
        "compensation_type": "Hourly",
    }],
)
print(response.data)
{
  "data": {
    "accepted_at": "2019-12-27T18:11:19.117Z",
    "employer_id": "employer_id"
  }
}
Returns Examples
{
  "data": {
    "accepted_at": "2019-12-27T18:11:19.117Z",
    "employer_id": "employer_id"
  }
}