Configure company benefit
curl --request POST \
--url https://api.vitablehealth.com/v1/company-benefits/{company_benefit_id}/configuration \
--header 'Content-Type: application/json' \
--header 'X-Partner-API-Key: <api-key>' \
--data '
{
"min_monthly_premium_in_cents": 1,
"open_enrollment_start_date": "2023-12-25",
"configured_eligibility_rules": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"location_value": "<string>"
}
],
"configured_tier_costs": [
{
"tier_cost_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_in_cents": 1,
"cost_per_dependent_in_cents": 1,
"pepm_in_cents": 1,
"pepm_per_dependent_in_cents": 1
}
],
"selected_eligible_expense_categories_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"open_enrollment_end_date": "2023-12-25",
"agency_of_record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.vitablehealth.com/v1/company-benefits/{company_benefit_id}/configuration"
payload = {
"min_monthly_premium_in_cents": 1,
"open_enrollment_start_date": "2023-12-25",
"configured_eligibility_rules": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"location_value": "<string>"
}
],
"configured_tier_costs": [
{
"tier_cost_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_in_cents": 1,
"cost_per_dependent_in_cents": 1,
"pepm_in_cents": 1,
"pepm_per_dependent_in_cents": 1
}
],
"selected_eligible_expense_categories_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"open_enrollment_end_date": "2023-12-25",
"agency_of_record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
min_monthly_premium_in_cents: 1,
open_enrollment_start_date: '2023-12-25',
configured_eligibility_rules: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', location_value: '<string>'}],
configured_tier_costs: [
{
tier_cost_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cost_in_cents: 1,
cost_per_dependent_in_cents: 1,
pepm_in_cents: 1,
pepm_per_dependent_in_cents: 1
}
],
selected_eligible_expense_categories_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
open_enrollment_end_date: '2023-12-25',
agency_of_record_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.vitablehealth.com/v1/company-benefits/{company_benefit_id}/configuration', 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/company-benefits/{company_benefit_id}/configuration",
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([
'min_monthly_premium_in_cents' => 1,
'open_enrollment_start_date' => '2023-12-25',
'configured_eligibility_rules' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'location_value' => '<string>'
]
],
'configured_tier_costs' => [
[
'tier_cost_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cost_in_cents' => 1,
'cost_per_dependent_in_cents' => 1,
'pepm_in_cents' => 1,
'pepm_per_dependent_in_cents' => 1
]
],
'selected_eligible_expense_categories_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'open_enrollment_end_date' => '2023-12-25',
'agency_of_record_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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/company-benefits/{company_benefit_id}/configuration"
payload := strings.NewReader("{\n \"min_monthly_premium_in_cents\": 1,\n \"open_enrollment_start_date\": \"2023-12-25\",\n \"configured_eligibility_rules\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_value\": \"<string>\"\n }\n ],\n \"configured_tier_costs\": [\n {\n \"tier_cost_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_in_cents\": 1,\n \"cost_per_dependent_in_cents\": 1,\n \"pepm_in_cents\": 1,\n \"pepm_per_dependent_in_cents\": 1\n }\n ],\n \"selected_eligible_expense_categories_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"open_enrollment_end_date\": \"2023-12-25\",\n \"agency_of_record_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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/company-benefits/{company_benefit_id}/configuration")
.header("X-Partner-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"min_monthly_premium_in_cents\": 1,\n \"open_enrollment_start_date\": \"2023-12-25\",\n \"configured_eligibility_rules\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_value\": \"<string>\"\n }\n ],\n \"configured_tier_costs\": [\n {\n \"tier_cost_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_in_cents\": 1,\n \"cost_per_dependent_in_cents\": 1,\n \"pepm_in_cents\": 1,\n \"pepm_per_dependent_in_cents\": 1\n }\n ],\n \"selected_eligible_expense_categories_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"open_enrollment_end_date\": \"2023-12-25\",\n \"agency_of_record_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vitablehealth.com/v1/company-benefits/{company_benefit_id}/configuration")
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 \"min_monthly_premium_in_cents\": 1,\n \"open_enrollment_start_date\": \"2023-12-25\",\n \"configured_eligibility_rules\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_value\": \"<string>\"\n }\n ],\n \"configured_tier_costs\": [\n {\n \"tier_cost_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_in_cents\": 1,\n \"cost_per_dependent_in_cents\": 1,\n \"pepm_in_cents\": 1,\n \"pepm_per_dependent_in_cents\": 1\n }\n ],\n \"selected_eligible_expense_categories_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"open_enrollment_end_date\": \"2023-12-25\",\n \"agency_of_record_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_bodyBenefits
Configure company benefit
Configure a company benefit with eligibility rules, tier costs, expense categories, and enrollment periods. This endpoint allows payroll providers to set up comprehensive benefit configurations including minimum premiums, eligibility criteria, and cost structures.
POST
/
v1
/
company-benefits
/
{company_benefit_id}
/
configuration
Configure company benefit
curl --request POST \
--url https://api.vitablehealth.com/v1/company-benefits/{company_benefit_id}/configuration \
--header 'Content-Type: application/json' \
--header 'X-Partner-API-Key: <api-key>' \
--data '
{
"min_monthly_premium_in_cents": 1,
"open_enrollment_start_date": "2023-12-25",
"configured_eligibility_rules": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"location_value": "<string>"
}
],
"configured_tier_costs": [
{
"tier_cost_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_in_cents": 1,
"cost_per_dependent_in_cents": 1,
"pepm_in_cents": 1,
"pepm_per_dependent_in_cents": 1
}
],
"selected_eligible_expense_categories_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"open_enrollment_end_date": "2023-12-25",
"agency_of_record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "https://api.vitablehealth.com/v1/company-benefits/{company_benefit_id}/configuration"
payload = {
"min_monthly_premium_in_cents": 1,
"open_enrollment_start_date": "2023-12-25",
"configured_eligibility_rules": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"location_value": "<string>"
}
],
"configured_tier_costs": [
{
"tier_cost_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"cost_in_cents": 1,
"cost_per_dependent_in_cents": 1,
"pepm_in_cents": 1,
"pepm_per_dependent_in_cents": 1
}
],
"selected_eligible_expense_categories_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"open_enrollment_end_date": "2023-12-25",
"agency_of_record_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
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({
min_monthly_premium_in_cents: 1,
open_enrollment_start_date: '2023-12-25',
configured_eligibility_rules: [{id: '3c90c3cc-0d44-4b50-8888-8dd25736052a', location_value: '<string>'}],
configured_tier_costs: [
{
tier_cost_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
cost_in_cents: 1,
cost_per_dependent_in_cents: 1,
pepm_in_cents: 1,
pepm_per_dependent_in_cents: 1
}
],
selected_eligible_expense_categories_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
open_enrollment_end_date: '2023-12-25',
agency_of_record_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'
})
};
fetch('https://api.vitablehealth.com/v1/company-benefits/{company_benefit_id}/configuration', 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/company-benefits/{company_benefit_id}/configuration",
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([
'min_monthly_premium_in_cents' => 1,
'open_enrollment_start_date' => '2023-12-25',
'configured_eligibility_rules' => [
[
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'location_value' => '<string>'
]
],
'configured_tier_costs' => [
[
'tier_cost_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'cost_in_cents' => 1,
'cost_per_dependent_in_cents' => 1,
'pepm_in_cents' => 1,
'pepm_per_dependent_in_cents' => 1
]
],
'selected_eligible_expense_categories_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'open_enrollment_end_date' => '2023-12-25',
'agency_of_record_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a'
]),
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/company-benefits/{company_benefit_id}/configuration"
payload := strings.NewReader("{\n \"min_monthly_premium_in_cents\": 1,\n \"open_enrollment_start_date\": \"2023-12-25\",\n \"configured_eligibility_rules\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_value\": \"<string>\"\n }\n ],\n \"configured_tier_costs\": [\n {\n \"tier_cost_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_in_cents\": 1,\n \"cost_per_dependent_in_cents\": 1,\n \"pepm_in_cents\": 1,\n \"pepm_per_dependent_in_cents\": 1\n }\n ],\n \"selected_eligible_expense_categories_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"open_enrollment_end_date\": \"2023-12-25\",\n \"agency_of_record_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\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/company-benefits/{company_benefit_id}/configuration")
.header("X-Partner-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"min_monthly_premium_in_cents\": 1,\n \"open_enrollment_start_date\": \"2023-12-25\",\n \"configured_eligibility_rules\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_value\": \"<string>\"\n }\n ],\n \"configured_tier_costs\": [\n {\n \"tier_cost_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_in_cents\": 1,\n \"cost_per_dependent_in_cents\": 1,\n \"pepm_in_cents\": 1,\n \"pepm_per_dependent_in_cents\": 1\n }\n ],\n \"selected_eligible_expense_categories_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"open_enrollment_end_date\": \"2023-12-25\",\n \"agency_of_record_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vitablehealth.com/v1/company-benefits/{company_benefit_id}/configuration")
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 \"min_monthly_premium_in_cents\": 1,\n \"open_enrollment_start_date\": \"2023-12-25\",\n \"configured_eligibility_rules\": [\n {\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"location_value\": \"<string>\"\n }\n ],\n \"configured_tier_costs\": [\n {\n \"tier_cost_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"cost_in_cents\": 1,\n \"cost_per_dependent_in_cents\": 1,\n \"pepm_in_cents\": 1,\n \"pepm_per_dependent_in_cents\": 1\n }\n ],\n \"selected_eligible_expense_categories_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"open_enrollment_end_date\": \"2023-12-25\",\n \"agency_of_record_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Partner API key for external integrations
Path Parameters
Unique identifier for the company benefit to configure
Body
application/json
Request to configure a company benefit
Minimum monthly premium amount in cents
Required range:
x >= 0Open enrollment period start date
Eligibility rules configuration
Show child attributes
Show child attributes
Tier cost configuration
Show child attributes
Show child attributes
Selected eligible expense category IDs
Open enrollment period end date
Agency of record identifier
Response
200
Company benefit configured successfully
⌘I
