> For the complete documentation index, see [llms.txt](https://docs.samesystem.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.samesystem.dev/business-guides/employee-lifecycle-management/rehire-employee/leave-and-rehire-consecutive-contracts.md).

# Leave and rehire (consecutive contracts)

An existing employee has been terminated with a future end date. This means the current contract has a future end date. The user is rehired while the current contract is still active.

The rehiring will require a new contract to be created with a new start date.

You will have two options to complete this task:

<details>

<summary>Rehire user</summary>

Since the user should be active all time, the start date for the new contract should be the current contract end date + 1 day (after the termination date), if you choose this option for rehiring.

> Example:\
> Current contract A has an end date: 2026-01-28\
> New contract B must have a start date: 2026-01-29

<figure><img src="https://2670147116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRlKDeTWSTdLA0zl6vlB2%2Fuploads%2F1adg7n1ljxo7tlGI92kK%2Fimage.png?alt=media&amp;token=c988dfe4-a497-4fc7-aa40-edb49f23d9f4" alt=""><figcaption></figcaption></figure>

To rehire a terminated employee in a single call, the following endpoint can be used:

POST /{clientToken}/contracts/rehire

Request body is an object conforming to the `ContractCreateInput` schema. The following fields are required in the ContractCreateInput schema:

<table data-header-hidden><thead><tr><th valign="top"></th><th valign="top"></th></tr></thead><tbody><tr><td valign="top"><code>departmentId</code></td><td valign="top">An internal (SameSystem) department id or our own external id. All departments with internal ids can be retrieved from API v1. </td></tr><tr><td valign="top"><code>startDate</code></td><td valign="top">This is the start date for the new contract and will be the date from where the rehired user will be active.</td></tr><tr><td valign="top"><code>titleId</code></td><td valign="top">A SameSystem title id. All titles can be retrieved from API v2.</td></tr><tr><td valign="top"><code>userId</code></td><td valign="top">A SameSystem unique user id. The value is present in the user object: <code>user.id</code>. It can also be a custom Id, like an employee id or payroll number from an external system. If a custom id is used, you must include the parameter <code>useCustomId=true</code> in the call.</td></tr></tbody></table>

{% hint style="info" %}
**Notice:**

Assigning the correct title is very important as the title will control user rights, access to different absence types etc.

If your external system uses its own identifiers, you can pass `useExternalDepartmentId=true` as a query parameter and the `departmentId` field will be treated as an external ID rather than an internal SameSystem ID
{% endhint %}

</details>

<details>

<summary>Create a new contract</summary>

Since the user should be active all time, the start date for the new contract should be equal or lower to the current contract end date, if you choose to use this option to create a new contract.

> Example:
>
> Current contract A has an end date: 2026-01-28
>
> New contract B must have a start date: 2026-01-28 or lower.<br>
>
> When you add a start date: 2026-01-28 for the new contract B, the end date on contract A will be automatically adjusted -1 day, to: 2026-01-27.
>
> When you add a start date: 2026-01-27 for the new contract B, the end date on contract A will be automatically adjusted -1 day, to: 2026-01-26.

<figure><img src="https://2670147116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRlKDeTWSTdLA0zl6vlB2%2Fuploads%2FlYIvjefqCNjvj4wuR0Z0%2Fimage.png?alt=media&amp;token=04968524-0c89-4068-8dd9-ddcb2bb0bf99" alt=""><figcaption></figcaption></figure>

You will have the option below to rehire an employee by creating a new contract:

* [Contract changes - Create new contract on existing user](/business-guides/employee-lifecycle-management/changes-to-employees/contract-changes.md#create-a-new-contract-on-existing-user).
* [Contract changes - Create/update multiple users and contracts in one call (bulk creation)](/business-guides/employee-lifecycle-management/changes-to-employees/contract-changes.md#create-update-multiple-users-and-contracts-in-one-call-bulk-creation-update)

You do not have to remove termination. After the new contract has been created, you can see that the current contract has been adjusted:

Current contract end date = new contract start date – 1 day.

</details>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.samesystem.dev/business-guides/employee-lifecycle-management/rehire-employee/leave-and-rehire-consecutive-contracts.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
