List employers
client.employers.list(EmployerListParams { limit, page } query?, RequestOptionsoptions?): PageNumberPage<Employer { id, active, address, 10 more } >
GET/v1/employers
Retrieves a paginated list of all employers belonging to the authenticated organization. Results are sorted by creation date (newest first) and paginated using page and limit parameters.
List employers
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
});
// Automatically fetches more pages as needed.
for await (const employer of client.employers.list()) {
console.log(employer.id);
}{
"data": [
{
"id": "empr_abc123def456",
"organization_id": "org_xyz789",
"name": "Acme Corporation",
"legal_name": "Acme Corporation Inc.",
"ein": "XX-XXX1234",
"reference_id": "partner-emp-001",
"email": "hr@acme.com",
"phone_number": "4155550100",
"active": true,
"address": {
"address_line_1": "123 Main Street",
"address_line_2": "Suite 100",
"city": "San Francisco",
"state": "CA",
"zipcode": "94102"
},
"eligibility_policy_id": "epol_policy123",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-06-20T14:45:00Z"
},
{
"id": "empr_def456ghi789",
"organization_id": "org_xyz789",
"name": "TechStart Inc",
"legal_name": "TechStart Incorporated",
"ein": "XX-XXX5678",
"reference_id": null,
"email": "contact@techstart.com",
"phone_number": null,
"active": true,
"address": {
"address_line_1": "456 Innovation Drive",
"address_line_2": "",
"city": "Austin",
"state": "TX",
"zipcode": "78701"
},
"eligibility_policy_id": null,
"created_at": "2024-03-01T09:00:00Z",
"updated_at": "2024-03-01T09:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 2,
"total_pages": 1
}
}Returns Examples
{
"data": [
{
"id": "empr_abc123def456",
"organization_id": "org_xyz789",
"name": "Acme Corporation",
"legal_name": "Acme Corporation Inc.",
"ein": "XX-XXX1234",
"reference_id": "partner-emp-001",
"email": "hr@acme.com",
"phone_number": "4155550100",
"active": true,
"address": {
"address_line_1": "123 Main Street",
"address_line_2": "Suite 100",
"city": "San Francisco",
"state": "CA",
"zipcode": "94102"
},
"eligibility_policy_id": "epol_policy123",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-06-20T14:45:00Z"
},
{
"id": "empr_def456ghi789",
"organization_id": "org_xyz789",
"name": "TechStart Inc",
"legal_name": "TechStart Incorporated",
"ein": "XX-XXX5678",
"reference_id": null,
"email": "contact@techstart.com",
"phone_number": null,
"active": true,
"address": {
"address_line_1": "456 Innovation Drive",
"address_line_2": "",
"city": "Austin",
"state": "TX",
"zipcode": "78701"
},
"eligibility_policy_id": null,
"created_at": "2024-03-01T09:00:00Z",
"updated_at": "2024-03-01T09:00:00Z"
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 2,
"total_pages": 1
}
}