Skip to navigation

Terminate employee

Ends the employee’s employment as of termination_date, which must be today or earlier in US Eastern time and on or after the start date; future-dated terminations are not supported. A reason is required, and a ticket_number is optional.

Enrolled coverage ends on the last day of the month in which the termination is processed; it is not backdated to the termination date. Benefits and billing changes follow asynchronously, so the response confirms the employment record only. Subscribe to the employee.deactivated webhook to be told when the employee is deactivated.

Requires an API key; access tokens are not accepted. Returns 404 if the employee does not exist or is not accessible to the caller.

422 app_error_code values: employee_already_terminated, invalid_termination_date and termination_scheduling_not_supported. 409 employer_has_hris_connection: an HRIS connection manages this employer’s employees.

Authentication

AuthorizationBearer

API Key or Access Token authentication using Bearer token in Authorization header. API keys use the vit_apk_ prefix, access tokens use the vit_at_ prefix.

Path parameters

employee_idstringRequired

Unique employee identifier (empl_*)

Headers

X-Vitable-OrganizationstringOptional

Organization to act as for this request (e.g. org_SGVsbG8gV29ybGQ). Optional when your credentials reach a single organization. Required when they reach several — omitting it then returns 400 organization_required. A malformed value returns 400 invalid_organization_header, and naming an organization you do not have access to returns 403 organization_access_denied.

Request

This endpoint expects an object.
termination_datedateRequired

Last day of employment. Must be today or earlier in US Eastern time and on or after the employee’s start date; future-dated terminations are not supported.

reasonstringRequired<=2000 characters
Why the employee is being terminated. Recorded for audit.
ticket_numberstring or nullOptional<=255 characters
Optional ticket reference recorded for audit

Response headers

X-RateLimit-Limitinteger
Maximum number of requests allowed within the rate limit window
X-RateLimit-Remaininginteger
Number of requests remaining in the current rate limit window
X-RateLimit-Resetinteger

Unix timestamp (seconds) when the rate limit window resets

Response

dataobject
The employee record.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
502
Bad Gateway Error