Deactivating/Reactivating an Employee

Deactivating/Reactivating an Employee

Deactivating an Employee

To deactivate a user use the DELETE /users endpoint to prevent the user from being able to log into 7shifts. The DELETE logic is a soft delete, it does not remove the user from the system and instead marks the user active = false. Please ensure you only call this endpoint when the user is truly deactivated in your system as it will prevent them from login into 7shifts.

Here is an example DELETE request to deactivate an employee with ID 5252552:

Request URL

DELETE https://api.7shifts.com/v1/users/5252552

Request body

{
  "inactive": {
    "reason": "VOLUNTARY_RESIGNATION",
    "comments": "Additional comments"
  }
}

Refer to the endpoint DELETE /user for more details on optional parameters to add sentiment about the departure/deactivation.

Activating an Employee

To activate and employee, setting the active field to true for a user will reactivate the user, and will allow them to log back into 7shifts using their old login credentials. This should also only be set when a user has been truly reactivated in your system, or it could allow ex-employees to log back into the 7shifts company.

Here is an example PUT request to activate an employee with ID 5252552:

Request URL

PUT https://api.7shifts.com/v1/users/5252552

Request body

{
    "user": {
        "active": true
    }
}

Did this page help you?