Create a new employee
curl --request POST \
--url https://api.vitablehealth.com/v1/companies/{company_id}/employees \
--header 'Content-Type: application/json' \
--header 'X-Partner-API-Key: <api-key>' \
--data '
{
"grant_benefit_eligibility_in": true,
"email": "jsmith@example.com",
"phone": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"address": {
"address_line_1": "<string>",
"city": "<string>",
"zipcode": "<string>",
"state": "<string>",
"address_line_2": "<string>"
},
"employee_start_date": "2023-12-25",
"middle_name": "<string>"
}
'import requests
url = "https://api.vitablehealth.com/v1/companies/{company_id}/employees"
payload = {
"grant_benefit_eligibility_in": True,
"email": "jsmith@example.com",
"phone": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"address": {
"address_line_1": "<string>",
"city": "<string>",
"zipcode": "<string>",
"state": "<string>",
"address_line_2": "<string>"
},
"employee_start_date": "2023-12-25",
"middle_name": "<string>"
}
headers = {
"X-Partner-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Partner-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
grant_benefit_eligibility_in: true,
email: 'jsmith@example.com',
phone: '<string>',
first_name: '<string>',
last_name: '<string>',
date_of_birth: '2023-12-25',
address: {
address_line_1: '<string>',
city: '<string>',
zipcode: '<string>',
state: '<string>',
address_line_2: '<string>'
},
employee_start_date: '2023-12-25',
middle_name: '<string>'
})
};
fetch('https://api.vitablehealth.com/v1/companies/{company_id}/employees', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vitablehealth.com/v1/companies/{company_id}/employees",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'grant_benefit_eligibility_in' => true,
'email' => 'jsmith@example.com',
'phone' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'date_of_birth' => '2023-12-25',
'address' => [
'address_line_1' => '<string>',
'city' => '<string>',
'zipcode' => '<string>',
'state' => '<string>',
'address_line_2' => '<string>'
],
'employee_start_date' => '2023-12-25',
'middle_name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Partner-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vitablehealth.com/v1/companies/{company_id}/employees"
payload := strings.NewReader("{\n \"grant_benefit_eligibility_in\": true,\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"address\": {\n \"address_line_1\": \"<string>\",\n \"city\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"state\": \"<string>\",\n \"address_line_2\": \"<string>\"\n },\n \"employee_start_date\": \"2023-12-25\",\n \"middle_name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Partner-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vitablehealth.com/v1/companies/{company_id}/employees")
.header("X-Partner-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"grant_benefit_eligibility_in\": true,\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"address\": {\n \"address_line_1\": \"<string>\",\n \"city\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"state\": \"<string>\",\n \"address_line_2\": \"<string>\"\n },\n \"employee_start_date\": \"2023-12-25\",\n \"middle_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vitablehealth.com/v1/companies/{company_id}/employees")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Partner-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"grant_benefit_eligibility_in\": true,\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"address\": {\n \"address_line_1\": \"<string>\",\n \"city\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"state\": \"<string>\",\n \"address_line_2\": \"<string>\"\n },\n \"employee_start_date\": \"2023-12-25\",\n \"middle_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_active_in": true,
"created": "2023-11-07T05:31:56Z",
"benefit_eligibility_start_date": "2023-11-07T05:31:56Z",
"enrolled_in_benefits_in": true,
"member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address": {
"street_address": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>"
},
"address_str_format": "<string>",
"first_name": "<string>",
"full_name": "<string>",
"date_of_birth": "2023-12-25",
"email": "<string>",
"age": 123,
"company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_name": "<string>",
"hris_id": "<string>",
"active_in": true,
"employee_start_date": "2023-12-25",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"middle_name": "<string>",
"last_name": "<string>",
"phone_number": "<string>",
"phone": "<string>",
"profile_picture_url": "<string>",
"preferred_language": "en",
"public_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"individual_income_in_cents": 123,
"household_income_in_cents": 123,
"tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"tag_color": "<string>",
"description": "<string>"
}
]
}
}Employees
Create a new employee
Create a new employee record for a company. This endpoint allows payroll providers to add new employees to the system with complete demographic and employment information.
POST
/
v1
/
companies
/
{company_id}
/
employees
Create a new employee
curl --request POST \
--url https://api.vitablehealth.com/v1/companies/{company_id}/employees \
--header 'Content-Type: application/json' \
--header 'X-Partner-API-Key: <api-key>' \
--data '
{
"grant_benefit_eligibility_in": true,
"email": "jsmith@example.com",
"phone": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"address": {
"address_line_1": "<string>",
"city": "<string>",
"zipcode": "<string>",
"state": "<string>",
"address_line_2": "<string>"
},
"employee_start_date": "2023-12-25",
"middle_name": "<string>"
}
'import requests
url = "https://api.vitablehealth.com/v1/companies/{company_id}/employees"
payload = {
"grant_benefit_eligibility_in": True,
"email": "jsmith@example.com",
"phone": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"date_of_birth": "2023-12-25",
"address": {
"address_line_1": "<string>",
"city": "<string>",
"zipcode": "<string>",
"state": "<string>",
"address_line_2": "<string>"
},
"employee_start_date": "2023-12-25",
"middle_name": "<string>"
}
headers = {
"X-Partner-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Partner-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
grant_benefit_eligibility_in: true,
email: 'jsmith@example.com',
phone: '<string>',
first_name: '<string>',
last_name: '<string>',
date_of_birth: '2023-12-25',
address: {
address_line_1: '<string>',
city: '<string>',
zipcode: '<string>',
state: '<string>',
address_line_2: '<string>'
},
employee_start_date: '2023-12-25',
middle_name: '<string>'
})
};
fetch('https://api.vitablehealth.com/v1/companies/{company_id}/employees', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.vitablehealth.com/v1/companies/{company_id}/employees",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'grant_benefit_eligibility_in' => true,
'email' => 'jsmith@example.com',
'phone' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'date_of_birth' => '2023-12-25',
'address' => [
'address_line_1' => '<string>',
'city' => '<string>',
'zipcode' => '<string>',
'state' => '<string>',
'address_line_2' => '<string>'
],
'employee_start_date' => '2023-12-25',
'middle_name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Partner-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vitablehealth.com/v1/companies/{company_id}/employees"
payload := strings.NewReader("{\n \"grant_benefit_eligibility_in\": true,\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"address\": {\n \"address_line_1\": \"<string>\",\n \"city\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"state\": \"<string>\",\n \"address_line_2\": \"<string>\"\n },\n \"employee_start_date\": \"2023-12-25\",\n \"middle_name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Partner-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.vitablehealth.com/v1/companies/{company_id}/employees")
.header("X-Partner-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"grant_benefit_eligibility_in\": true,\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"address\": {\n \"address_line_1\": \"<string>\",\n \"city\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"state\": \"<string>\",\n \"address_line_2\": \"<string>\"\n },\n \"employee_start_date\": \"2023-12-25\",\n \"middle_name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vitablehealth.com/v1/companies/{company_id}/employees")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Partner-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"grant_benefit_eligibility_in\": true,\n \"email\": \"jsmith@example.com\",\n \"phone\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"date_of_birth\": \"2023-12-25\",\n \"address\": {\n \"address_line_1\": \"<string>\",\n \"city\": \"<string>\",\n \"zipcode\": \"<string>\",\n \"state\": \"<string>\",\n \"address_line_2\": \"<string>\"\n },\n \"employee_start_date\": \"2023-12-25\",\n \"middle_name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_active_in": true,
"created": "2023-11-07T05:31:56Z",
"benefit_eligibility_start_date": "2023-11-07T05:31:56Z",
"enrolled_in_benefits_in": true,
"member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address": {
"street_address": "<string>",
"city": "<string>",
"state": "<string>",
"zip_code": "<string>"
},
"address_str_format": "<string>",
"first_name": "<string>",
"full_name": "<string>",
"date_of_birth": "2023-12-25",
"email": "<string>",
"age": 123,
"company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"company_name": "<string>",
"hris_id": "<string>",
"active_in": true,
"employee_start_date": "2023-12-25",
"user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"middle_name": "<string>",
"last_name": "<string>",
"phone_number": "<string>",
"phone": "<string>",
"profile_picture_url": "<string>",
"preferred_language": "en",
"public_company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"individual_income_in_cents": 123,
"household_income_in_cents": 123,
"tags": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"tag_color": "<string>",
"description": "<string>"
}
]
}
}Authorizations
Partner API key for external integrations
Path Parameters
Unique identifier for the company
Body
application/json
Whether to grant benefit eligibility to the employee
Employee email address
Maximum string length:
256Employee phone number
Maximum string length:
256Employee first name
Maximum string length:
64Employee last name
Maximum string length:
64Employee date of birth
Show child attributes
Show child attributes
Employment classification
Available options:
Full Time, Part Time, Temporary, Intern, Seasonal, Individual Contractor Employee start date
Compensation type
Available options:
Salary, Hourly Employee middle name
Maximum string length:
200Name suffix
Available options:
Sr, Jr, I, II, III, IV, V Employee biological sex
Available options:
Male, Female, Other, Unknown Employee preferred language
Available options:
en, es, zh, ru, sw, th Response
201 - application/json
Employee created successfully
Show child attributes
Show child attributes
⌘I
