> 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-gap-between-contracts.md).

# Leave & rehire (gap between contracts)

An existing employee is terminated and the contract has ended, but the user record still exists in the system. The user will not be able to use SameSystem unless a new contract is created.

The user is rehired after a while, and this will require a new contract to be created with the new start date. This start date must be equal or greater than the previous contract end date). The employee becomes active again on the new start date.

<figure><img src="https://2670147116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRlKDeTWSTdLA0zl6vlB2%2Fuploads%2FJl3DZQpCFs1xXLsxVzm7%2Fimage.png?alt=media&amp;token=8c9bae8c-6b1f-42f4-92e7-d72d89d2080d" alt=""><figcaption></figcaption></figure>

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

The setting “Employments flow” must be set to “Sequential employments” in General settings before you can use the rehire functionality.
{% endhint %}

You will have this option to rehire an employee:

<details>

<summary>Rehire a user</summary>

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>

&#x20;After rehiring, you will be able to see the upcoming contract.

<figure><img src="https://2670147116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRlKDeTWSTdLA0zl6vlB2%2Fuploads%2FYrGeRLCIhU41Wr96TieQ%2Fimage.png?alt=media&amp;token=8ece4e4f-06e8-44dc-b7ae-ccbc04f771d6" alt=""><figcaption></figcaption></figure>


---

# 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-gap-between-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.
