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.
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"
}
}