# Area 3: Add and maintain workers

Generated 2026-12-01 from the Everee docs (branch v1.0). Part of https://files.everee.com/everee-payroll-infrastructure-explainer.md

```text
GOAL
Build worker management: add employees and contractors as complete records, show and edit their profiles, and handle separation, rehire and deletion.

READ FIRST (each page also has a Markdown version at the same URL with .md added; the docs index is https://developer.everee.com/llms.txt)
- https://developer.everee.com/docs/managing-workers
- https://developer.everee.com/docs/worker-data-and-onboarding
- https://developer.everee.com/reference/look-up-hiring-status-for-a-worker
- https://developer.everee.com/reference/add-a-complete-employee-record
- https://developer.everee.com/reference/add-a-complete-contractor-record
- https://developer.everee.com/reference/retrieve-a-worker
- https://developer.everee.com/reference/update-payment-preferences
- https://developer.everee.com/reference/separate-an-employee
- https://developer.everee.com/reference/rehire-a-worker

BUILD
- Before every create, POST /worker-hiring-status/search to learn whether the person already exists, was hired before or is a rehire, and follow the answer.
- A profile form that collects the full record (legal name, date of birth, contact, home address, tax identifiers, position, pay rate, hire date, work location, approval group, payroll calendar) and sends it to POST /workers/employee or /workers/contractor.
- A worker list and detail screen from GET /workers and /workers/{id}, edits through the update calls, a 'Process termination' action (PUT /workers/{id}/separate-employee), rehire, and delete only while still in onboarding.
- Handle worker.onboarding-completed, worker.profile-updated, worker.created and tin-verification-status-changed events by re-reading the worker.

OPERATIONS (all paths are under https://api.everee.com/integration/v1; each reference page, with .md added, lists its request and response fields)
- POST /worker-hiring-status/search | operationId post_integrationv1worker-hiring-statussearch | https://developer.everee.com/reference/look-up-hiring-status-for-a-worker.md
- POST /workers/employee | operationId add-a-complete-employee-record | https://developer.everee.com/reference/add-a-complete-employee-record.md
- POST /workers/contractor | operationId add-a-complete-contractor-record | https://developer.everee.com/reference/add-a-complete-contractor-record.md
- GET /workers | operationId list-workers | https://developer.everee.com/reference/list-workers.md
- GET /workers/{id} | operationId retrieve-a-worker | https://developer.everee.com/reference/retrieve-a-worker.md
- PUT /workers/{id}/payment-info | operationId update-payment-preferences | https://developer.everee.com/reference/update-payment-preferences.md
- PUT /workers/{id}/separate-employee | operationId separate-an-employee | https://developer.everee.com/reference/separate-an-employee.md
- POST /workers/{id}/rehire | operationId rehire-a-worker | https://developer.everee.com/reference/rehire-a-worker.md
- DELETE /workers/{id} | operationId delete-a-worker-in-onboarding | https://developer.everee.com/reference/delete-a-worker-in-onboarding.md

RULES
- Workers have no Everee account, claim, password or invitation (the invitation endpoint returns 403 and accountSetupEnabled is forced off in component sessions). Everee does not email or text them. Workers are paid by direct deposit only: the pay card components return 403, so offer no pay card option.
- Payroll Infra uses the full-record flow only (add-a-complete-employee-record and add-a-complete-contractor-record, with onboardingComplete true). Supply a stable externalWorkerId from my system and store Everee's worker id next to it.
- Effective dates matter: a hire date in the future or a change effective later must be respected, not applied now.
- A worker with any transacted payment can't be deleted, only separated.
- Build every flow as a loop around reads that tell you what is left: make a change, read the state again (readiness.missing for onboarding, a run's blockers and the requirements behind them for payroll, a funding's status and resolutionInstructions), and act on what is left. Never hard-code the steps: codes appear and disappear. Map each code you know to a screen, and show resolutionInstructions for any you don't. Use webhooks (company-onboarding.status-changed, requirement.created, payroll-run.status-changed) to know when to read again, not instead of the read. A requirement does NOT open when a worker is created or changed: it opens only when a payroll calculation or a returned deposit finds the problem, so calculate runs early.
- Base URL https://api.everee.com/integration/v1. The partner key is the HTTP Basic user name for the Company Onboarding API: the test key (zk_test_...) creates and reaches only Sandbox companies and the production key (zk_prod_...), issued after Everee approves the integration, only Production companies. A company in the other environment returns 404. The company key (tsk_...) is the HTTP Basic user name for everything else, plus an x-everee-tenant-id header holding the company's id.
- Keep every key on the server. Everee rejects browser requests. Read keys from a secrets store, never log them, never hard-code them.
- Rate limit: 100 operations per 5 seconds per key (see the RateLimit-Policy header). Back off on 429.
- Only payables and payroll run items have an idempotency key (externalId). Make other creates safe yourself: look first, keep the Everee ID next to your own record.
- Test against a sandbox instance (tsk_test_... keys) before production. Nothing in a URL selects the environment; the key does. Sandbox company creation is limited (25 alive at once, 50 created in any rolling 7 days; evaluation access before the agreement is signed: 1 and 2, 14 days, companies created without an agreement), and each Sandbox company is limited to 250 workers, 100 off-cycle runs in 7 days and 100 payroll calculations in 24 hours: a refused request returns 429 with when the next can be created, and a sandbox company you no longer need can be retired.

DONE WHEN
- A sandbox employee is created, edited, separated and rehired from my UI, with no duplicate created by retries.
- A failed TIN verification event surfaces a clear fix-it prompt to the user.

TESTS TO WRITE
- The hiring-status lookup always runs before a create, and a status of ACTIVE links the existing worker instead of creating one.
- Retrying a create with the same externalWorkerId creates no second worker.
- A future hire date is kept as a future date.
- A worker with a transacted payment can't be deleted in your UI, only separated.
- A tin-verification-status-changed event with VERIFICATION_FAILED shows the user what to fix.

If a fact you need isn't in the docs, ask me. Don't guess endpoint paths, field names or business rules.
```
