Skip to content

Submit census sync

employers.submit_census_sync(employer_id, **kwargs) -> 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.

ParametersExpand Collapse
employer_id: String

Unique employer identifier (empr_*)

employees: Array[{ date_of_birth, email, first_name, 7 more}]
date_of_birth: Date
formatdate
email: String
formatemail
first_name: String
maxLength255
last_name: String
maxLength255
phone: String
address: { address_line_1, city, state, 2 more}
address_line_1: String
maxLength255
city: String
maxLength255
state: :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: String
maxLength10
address_line_2: String
maxLength255
compensation_type: :Salary | :Hourly
  • Salary - Salary
  • Hourly - Hourly
One of the following:
:Salary
:Hourly
employee_class: 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: String
maxLength255
start_date: Date
formatdate
ReturnsExpand Collapse
class EmployerSubmitCensusSyncResponse { data }

Response containing a single census sync detail resource.

data: { accepted_at, employer_id}
accepted_at: Time
formatdate-time
employer_id: String

Submit census sync

require "vitable_connect"

vitable_connect = VitableConnect::Client.new(
  api_key: "My API Key",
  environment: "environment_1" # defaults to "production"
)

response = vitable_connect.employers.submit_census_sync(
  "empr_abc123def456",
  employees: [
    {date_of_birth: "1990-05-15", email: "jane.doe@acme.com", first_name: "Jane", last_name: "Doe", phone: "4155550100"},
    {
      date_of_birth: "1985-11-20",
      email: "john.smith@acme.com",
      first_name: "John",
      last_name: "Smith",
      phone: "4155550101"
    }
  ]
)

puts(response)
{
  "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"
  }
}