> 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/absence/periodical-absence/clear-periodical-absence.md).

# Clear periodical absence

{% hint style="info" %}
Only available in API v2.
{% endhint %}

If you need to clear the whole periodical absence or part of the periodical absence, you can use the endpoint:

POST /{clientToken}/period\_absences/clear

Example:&#x20;

In the schedule below, we have one periodical absence from 2026-08-24 to 2026-08-30. We need to change this to remove part of the period from 2026-08-26 to 2026-08-28.

<figure><img src="https://2670147116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRlKDeTWSTdLA0zl6vlB2%2Fuploads%2FcSWG0bGwSai8L8YnztRT%2Fimage.png?alt=media&amp;token=f861dcd1-2cb5-4fea-81bc-3449e5e82bca" alt=""><figcaption></figcaption></figure>

First you must know the current periodical absence log, because you need that id to the current one.

On the request body you add this:

```json
{
  "data": {
    "attributes": {
      "id": 1782969,
      "startDate": "2026-08-26",
      "endDate": "2026-08-28",
      "overrideConfirmedDays": false
    }
  }
}
```

|                         |                                                          |
| ----------------------- | -------------------------------------------------------- |
| `id`                    | The id of the `PeriodicalAbsenceLock`.                   |
| `startDate`             | First date of the period you need to clear.              |
| `endDate`               | Last date of the period you need to clear.               |
| `overrideConfirmedDays` | Add true if you want to override already confirmed days. |

After the POST event, the three days will be removed from the schedule:

<figure><img src="https://2670147116-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRlKDeTWSTdLA0zl6vlB2%2Fuploads%2FEKBn6j74ga83T5AMWmEs%2Fimage.png?alt=media&amp;token=6ab53ef3-fa13-4777-b759-b0f59bc1d99b" alt=""><figcaption></figcaption></figure>

Use the endpoint to remove the whole period, start of the period, middle of a period or the end of a period.


---

# 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/absence/periodical-absence/clear-periodical-absence.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.
