Create employer
client.employers.create(EmployerCreateParams { address, ein, email, 4 more } body, RequestOptionsoptions?): EmployerResponse { data }
POST/v1/employers
Creates a new employer for the authenticated organization. Requires employer name, legal name, EIN, email, and address information. Returns the created employer with its assigned ID.
Create employer
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 employerResponse = await client.employers.create({
address: {
address_line_1: '789 Business Blvd',
address_line_2: 'Floor 5',
city: 'Seattle',
state: 'WA',
zipcode: '98101',
},
ein: '12-3456789',
email: 'hr@newco.com',
legal_name: 'NewCo Industries LLC',
name: 'NewCo Industries',
phone_number: '2065550100',
reference_id: 'partner-emp-001',
});
console.log(employerResponse.data);{
"data": {
"id": "empr_new123abc",
"organization_id": "org_xyz789",
"name": "NewCo Industries",
"legal_name": "NewCo Industries LLC",
"ein": "XX-XXX6789",
"reference_id": null,
"email": "hr@newco.com",
"phone_number": "2065550100",
"active": true,
"address": {
"address_line_1": "789 Business Blvd",
"address_line_2": "Floor 5",
"city": "Seattle",
"state": "WA",
"zipcode": "98101"
},
"eligibility_policy_id": null,
"created_at": "2024-11-26T10:00:00Z",
"updated_at": "2024-11-26T10:00:00Z"
}
}Returns Examples
{
"data": {
"id": "empr_new123abc",
"organization_id": "org_xyz789",
"name": "NewCo Industries",
"legal_name": "NewCo Industries LLC",
"ein": "XX-XXX6789",
"reference_id": null,
"email": "hr@newco.com",
"phone_number": "2065550100",
"active": true,
"address": {
"address_line_1": "789 Business Blvd",
"address_line_2": "Floor 5",
"city": "Seattle",
"state": "WA",
"zipcode": "98101"
},
"eligibility_policy_id": null,
"created_at": "2024-11-26T10:00:00Z",
"updated_at": "2024-11-26T10:00:00Z"
}
}