Submit census sync
client.employers.submitCensusSync(stringemployerID, EmployerSubmitCensusSyncParams { employees } body, RequestOptionsoptions?): EmployerSubmitCensusSyncResponse { data }
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 VitableConnect from '@vitable-inc/vitable-connect';
const client = new VitableConnect({
apiKey: process.env['VITABLE_CONNECT_API_KEY'], // This is the default and can be omitted
});
const response = await client.employers.submitCensusSync('empr_abc123def456', {
employees: [
{
reference_id: 'EMP-001',
first_name: 'Jane',
last_name: 'Doe',
date_of_birth: '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: '2024-01-15',
employee_class: 'Full Time',
compensation_type: 'Salary',
},
{
first_name: 'John',
last_name: 'Smith',
date_of_birth: '1985-11-20',
email: 'john.smith@acme.com',
phone: '4155550101',
start_date: '2024-03-01',
employee_class: 'Part Time',
compensation_type: 'Hourly',
},
],
});
console.log(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"
}
}