# Zilfu — Slots

3 operations. Schemas referenced below are documented at https://zilfu.app/docs/api/schemas.md.

## Servers

- `https://zilfu.app/api`

## Operations

### List slots

- **Method:** `GET`
- **Path:** `/spaces/{space}/slots`
- **Tags:** Slot

#### Parameters

##### `space` required

- **In:** `path`

The space ID

`integer`

#### Responses

##### Status: 200 Array of \`SlotResource\`

###### Content-Type: application/json

- **`data` (required)**

  `array`

  **Items:**

  - **`day_of_week` (required)**

    `integer`

  - **`id` (required)**

    `integer`

  - **`time` (required)**

    `string`

**Example:**

```json
{
  "data": [
    {
      "id": 1,
      "day_of_week": 1,
      "time": ""
    }
  ]
}
```

##### Status: 401 Unauthenticated

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 403 Authorization error

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 404 Not found

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

### Create slots

- **Method:** `POST`
- **Path:** `/spaces/{space}/slots`
- **Tags:** Slot

Creates a slot at the given time for each day of the week.

#### Parameters

##### `space` required

- **In:** `path`

The space ID

`integer`

#### Request Body

##### Content-Type: application/json

- **`days_of_week` (required)**

  `array`

  **Items:**

  `integer`

- **`time` (required)**

  `string`

**Example:**

```json
{
  "time": "",
  "days_of_week": [
    1
  ]
}
```

#### Responses

##### Status: 200

###### Content-Type: application/json

**Example:**

```json
{}
```

##### Status: 401 Unauthenticated

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 403 Authorization error

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 404 Not found

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 422 Validation error

###### Content-Type: application/json

- **`errors` (required)**

  `object` — A detailed description of each field that failed validation.

- **`message` (required)**

  `string` — Errors overview.

**Example:**

```json
{
  "message": "",
  "errors": {
    "additionalProperty": [
      ""
    ]
  }
}
```

### Delete a slot

- **Method:** `DELETE`
- **Path:** `/spaces/{space}/slots/{slot}`
- **Tags:** Slot

#### Parameters

##### `space` required

- **In:** `path`

The space ID

`integer`

##### `slot` required

- **In:** `path`

The slot ID

`integer`

#### Responses

##### Status: 200

###### Content-Type: application/json

**Example:**

```json
{}
```

##### Status: 401 Unauthenticated

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 403 Authorization error

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 404 Not found

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```
