Rehire a W2 employee

Enable rehiring a previously dismissed employee using the Rehire flow—which includes the ability to review an employee’s onboarding—or the Rehire API to facilitate quick and easy payroll re-onboarding.

Rehire flow

Create a rehire flow

Generate an employee rehire flow using the POST /v1/companies/{company_uuuid}/flows endpoint with the ”entity_type”: “Employee” and ”flow_type”: “rehire”.

Sample request

curl --request POST  
     --url <https://api.gusto-demo.com/v1/companies/{{company_uuid}}/flows>  
     --header 'Authorization: Bearer {{access_token}}’'  
     --header 'Content-Type: application/json'  
     --data '  
{  
     "flow_type": "rehire",  
     "entity_type": "Employee",  
     "entity_uuid": "{{employee_uuid}}"  
}'
const fetch = require('node-fetch');

const url = '<https://api.gusto-demo.com/v1/companies/{{company_uuid}}/flows'>;  
const options = {  
  method: 'POST',  
  headers: {  
    accept: 'application/json',  
    'content-type': 'application/json',  
    authorization: 'Bearer COMPANY_API_TOKEN'  
  },  
  body: JSON.stringify({  
    flow_type: "rehire",  
    entity_type: "Employee",  
    entity_uuid: "{{employee_uuid}}"  
  })  
};

fetch(url, options)  
  .then(res => res.json())  
  .then(json => console.log(json))  
  .catch(err => console.error('error:' + err));

Sample response

{
  "url": "https://flows.gusto-demo.com/flows/lO2BHHAMCScPVV9G5WEURW0Im_nP9mGYloQgjUWbenQ"
}

Flow behavior (employer view)

This section walks through what employers on your platform will see when using the rehire flow.

1. Employer enters employee rehire details

On the rehire flow UI, employers provide the rehire start date and work address, and indicate whether Gusto should file a new hire report on your behalf. This is the same option as offered when an employee is first onboarded, and employers should consult state requirements as to whether this is needed.

If the company is taxable as an S-corp, an additional field will be displayed for selecting whether the employee is a 2% shareholder.

2. Employer reviews employee rehire summary

From the summary page, employers can edit or cancel a rehire if the rehire effective date is in the future.

3. (Optional) Review employee info

In the partner’s config flow, if the Enable employee onboarding in rehire flow option is checked, the option to Review employee onboarding will appear on the summary page which leads to the employee onboarding flow. By default, the rehire start date and work location will be shown as well as any other previously entered information. If a SSN is present, we don’t allow the employee to edit this for filing purposes after the employee is already onboarded.

Rehire API

🚧

Effective dates and rehires

If a mistake is made when submitting a rehire request, we only allow rehires with a future effective date to be updated or canceled.

This means once an employee’s rehire date is reached or past, editing or canceling a rehire is not possible.

Create an employee rehire

Use the POST employees/{employee_uuid}/rehire endpoint to create a rehire. An employee must be terminated before attempting to rehire.

The following path params are required:

  • employee_uuid - the uuid of the employee for which you’d like to rehire

The following body params are required:

  • effective_date - the date of the employee's rehire
  • work_location_uuid - the uuid of the location where the employee is employed. This can be acquired by fetching the company locations.
  • file_new_hire_report - elect to file a new hire report for a given employee's work state
curl --request POST  
     --url <https://api.gusto-demo.com/v1/employees/{employee_uuid}/rehire>  
     --header 'accept: application/json'  
     --header 'authorization: Bearer {{access_token}}' \  
     --header 'content-type: application/json'  \
     --data '  
{  
     "effective_date": "2023-01-01",  
     "work_location_uuid": “b125fe86-981e-47a2-b7a2-58ca8de1dcb9”,  
     "file_new_hire_report": true,  
}'
const fetch = require('node-fetch');

const url = 'https://api.gusto-demo.com/v1/employees/{{employee_uuid}}/rehire';
const options = {
  method: 'POST',
  headers: {
    accept: 'application/json',
    'content-type': 'application/json',
    authorization: 'Bearer COMPANY_API_TOKEN'
  },
  body: JSON.stringify({
    effective_date: '2023-01-01', 
    work_location_uuid: 'b125fe86-981e-47a2-b7a2-58ca8de1dcb9', 
    file_new_hire_report: true
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error('error:' + err));

The response shows the details of the rehire:

{
  "version": "{version}",
  "employee_uuid": "{employee_uuid}",
  "active": false,
  "effective_date": "{effective_date}",
  "file_new_hire_report": false,
  "work_location_uuid": "{work_location_uuid}",
  "two_percent_shareholder": false,
  "employment_status": "full_time"
}

Update an employee rehire

Use the PUT employees/{employee_uuid}/rehire endpoint to update a rehire. The effective_date of the rehire must be in the future.

curl --request PUT  
     --url <https://api.gusto-demo.com/v1/employees/{employee_uuid}/rehire>  
     --header 'accept: application/json'  
     --header 'authorization: Bearer {{access_token}}' \  
     --header 'content-type: application/json'  \
     --data '  
{  
     "version": "79fe4bf503bed0f1767dcd69ba819192",
  	 "effective_date": "2023-01-01",  
     "work_location_uuid": “b125fe86-981e-47a2-b7a2-58ca8de1dcb9”,  
     "file_new_hire_report": true,  
}'
const fetch = require('node-fetch');

const url = 'https://api.gusto-demo.com/v1/employees/{{employee_uuid}}/rehire';
const options = {
	method: 'PUT',
	headers: {
		accept: 'application/json',
		'content-type': 'application/json',
		authorization: 'Bearer COMPANY_API_TOKEN'
	},
	body: JSON.stringify({
		version: '79fe4bf503bed0f1767dcd69ba819192',
		effective_date: '2023-01-01',
		work_location_uuid: 'b125fe86-981e-47a2-b7a2-58ca8de1dcb9',
		file_new_hire_report: true
	})
};

fetch(url, options)
	.then(res => res.json())
	.then(json => console.log(json))
	.catch(err => console.error('error:' + err));

Get an employee's employment history

To see an employee’s employment history for details on termination and rehire dates, use the GET employees/{employee_uuid}/employment_history endpoint.

curl --request GET  
     --url '<https://api.gusto-demo.com/v1/employees/employee_id/employment_history>'  
     --header 'accept: application/json'  
     --header 'authorization: Bearer {{access_token}}' \
const fetch = require('node-fetch');

const url = '<https://api.gusto-demo.com/v1/employees/employee_id/employment_history'>;  
const options = {  
  method: 'GET',  
  headers: {accept: 'application/json', authorization: 'Bearer COMPANY_API_TOKEN'}  
};

fetch(url, options)  
  .then(res => res.json())  
  .then(json => console.log(json))  
  .catch(err => console.error('error:' + err));

Cancel an employee rehire

To cancel a rehire use the DELETE employees/{employee_uuid}/rehire endpoint. The effective_date of the rehire cancellation must be in the future.

curl --request DELETE  
     --url <https://api.gusto-demo.com/v1/employees/{employee_uuid}/rehire>  
     --header 'accept: application/json'  
     --header 'authorization: Bearer {{access_token}}' \  
     --header 'content-type: application/json'  \
const fetch = require('node-fetch');

const url = 'https://api.gusto-demo.com/v1/employees/{{employee_uuid}}/rehire';
const options = {
	method: 'DELETE',
	headers: {
		accept: 'application/json',
		'content-type': 'application/json',
		authorization: 'Bearer COMPANY_API_TOKEN'
	}
};

fetch(url, options)
	.then(res => res.json())
	.then(json => console.log(json))
	.catch(err => console.error('error:' + err));