## Create employer `employers.create(**kwargs) -> EmployerResponse` **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. ### Parameters - `address: { address_line_1, city, state, 2 more}` Employer address - `address_line_1: String` Primary street address - `city: String` City name - `state: String` Two-letter state code - `zipcode: String` ZIP code - `address_line_2: String` Secondary street address - `ein: String` Employer Identification Number (format: XX-XXXXXXX) - `email: String` Email address for billing and communications - `legal_name: String` Legal business name - `name: String` Employer display name - `phone_number: String` Employer phone number (10-digit US format, e.g. 5551234567) - `reference_id: String` External reference ID for this employer ### Returns - `class EmployerResponse` Response containing a single employer resource. - `data: Employer` Serializer for Employer entity in public API responses. - `id: String` Unique employer identifier with 'empr_' prefix - `active: bool` Whether the employer is currently active in the system - `address: { address_line_1, city, state, 2 more}` Nested address within EmployerSerializer. - `address_line_1: String` Primary street address - `city: String` City name - `state: String` Two-letter state code (e.g., CA, NY) - `zipcode: String` ZIP code (5 or 9 digit) - `address_line_2: String` Secondary street address (apt, suite, etc.) - `created_at: Time` Timestamp when the employer was created - `ein: String` Employer Identification Number (masked in responses) - `eligibility_policy_id: String` ID of the benefit eligibility policy (epol_*), if assigned - `legal_name: String` Legal business name for compliance and tax purposes - `name: String` Display name of the employer - `organization_id: String` ID of the parent organization (org_*) - `updated_at: Time` Timestamp when the employer was last updated - `email: String` Email address for billing and communications - `phone_number: String` Employer phone number (E.164 format recommended) - `reference_id: String` Partner-assigned reference ID for the employer ### Example ```ruby require "vitable_connect" vitable_connect = VitableConnect::Client.new( api_key: "My API Key", environment: "environment_1" # defaults to "production" ) employer_response = vitable_connect.employers.create( address: {address_line_1: "789 Business Blvd", city: "Seattle", state: "WA", zipcode: "98101"}, ein: "12-3456789", email: "hr@newco.com", legal_name: "NewCo Industries LLC", name: "NewCo Industries" ) puts(employer_response) ``` #### Response ```json { "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" } } ```