> ## Documentation Index
> Fetch the complete documentation index at: https://beebole.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Absence

> Beebole legacy API — Absence operations.

## **Create an Absence Type**

Request:

```json theme={null}
{
  "service": "absence.create",
  "absence": {
    "name": "myAbsence",
    "company": {"id": 233}
  }
}
```

Response:

```json theme={null}
{
  "status": "ok",
  "id": 78
}
```

## **Get an Absence Type**

Request:

```json theme={null}
{
  "service": "absence.get",
  "id": 78
}
```

Response:

```json theme={null}
{
  "status" : "ok",
  "absence" : {
    "id" : 78,
    "name" : "myAbsence",
    "company" : {"id" : 233},
    "active" : true
  }
}
```

## **Update an Absence Type**

Request:

```json theme={null}
{
  "service" : "absence.update",
  "absence" : {
    "id" : 78,
    "name" : "newName"
  }
}
```

Response:

```json theme={null}
{"status" : "ok"}
```

## **List Absence Types**

Request:

```json theme={null}
{
  "service": "absence.list",
  "company" : {"id" : 233}
}
```

Response:

```json theme={null}
{
  "status" : "ok",
  "absences": [
    {
      "id" : 78,
      "name" : "myAbsence",
      "company": {"id" : 233},
      "active" : true
    }, ...
  ]
}
```

## **Activate an Absence Type**

Request:

```json theme={null}
{
  "service": "absence.activate",
  "id": 78
}
```

Response:

```json theme={null}
{"status": "ok"}
```

## **Deactivate an Absence Type**

Request:

```json theme={null}
{
  "service": "absence.deactivate",
  "id": 78
}
```

Response:

```json theme={null}
{"status": "ok"}
```

## **Assign a Group to an Absence Type**

Request:

```json theme={null}
{
  "service" : "absence.add_group",
  "id" : 78,
  "group" : {
    "id" : 105
  }
}
```

Response:

```json theme={null}
{"status": "ok"}
```

## **Unassign a Group to an Absence Type**

Request:

```json theme={null}
{
  "service" : "absence.remove_group",
  "id" : 78,
  "group" : {
    "id" : 105
  }
}
```

Response:

```json theme={null}
{"status": "ok"}
```

## **List Groups Assigned to an Absence Type**

Request:

```json theme={null}
{
  "service" : "absence.groups",
  "id" : 78
}
```

Response:

```json theme={null}
{
  "status":"ok",
  "groups":[
    {
      "id":4787,
      "name":"US",
      "groups":{"count":4}
    }, ...
  ]
}
```
