Create an employee
external_idis your worker ID. It’s unique within the employer, and Hammock rejects a second employee with the same one (external_id_taken). Look an employee up withGET /employees?employer=...&external_id=....emailmust be unique within the employer.date_of_birth,ssnandaddressare optional. Opening an account requires them, so sending them saves the employee from typing them again.ssnis write-only: Hammock returnsssn_last4and never the full number.
Invitations
send_invitation decides who tells the employee about their benefits.
You can combine them: invite by email and also link from your product. To send an invitation
later, update the employee with
"send_invitation": true.
Link an employee into enrollment
Enrollment is hosted by Hammock. It covers eligibility questions, the elections themselves, and the signatures and identity details that opening an account requires.url. The link signs them in
as that employee, so treat it like a credential: it’s single-use, it expires within minutes, and
it must only be created for the signed-in worker it belongs to.
The same call works after enrollment. An enrolled employee who follows a new link lands on their
benefits, where they can change an election when the plan allows it.
Track enrollment
Each employee has anenrollment_status:
When an employee elects a benefit you receive
election.created, and deduction.created when
that benefit withholds from payroll. See benefits and elections.
Update and terminate
Send only the fields that changed.termination_date has these effects:
- The employee’s
statusbecomesterminatedon that date. - Their deductions get an
end_dateand you receivededuction.ended. Withhold through the last payday on or before the end date. - They keep access to the money already in their accounts.
"termination_date": null to reinstate someone. Employees are never deleted.