# Coach Availability

Use the `coachAvailability` query to retrieve a list of available time slots for scheduling a meeting with a coach (or multiple coaches), based on the specified appointment type.

### Arguments

| Argument          | Type      | Description                                                |
| ----------------- | --------- | ---------------------------------------------------------- |
| `appointmentType` | ID!       | ID of the appointment type.                                |
| `start`           | DateTime! | Set start date to retrieve results. `YYYY-MM-DDT hh:mm:ss` |
| `end`             | DateTime! | Set end date to retrieve results. `YYYY-MM-DDT hh:mm:ss`   |
| `coaches`         | \[ID]     | ID of the coach or coaches.                                |

### Available Fields

<table data-header-hidden><thead><tr><th width="236.33333333333331">Field</th><th width="203">Type</th><th>Description</th></tr></thead><tbody><tr><td>Field</td><td>Type</td><td>Description</td></tr><tr><td><code>start</code></td><td>DateTime!</td><td><em>Start</em> date and time of the available block <code>YYYY-MM-DDT hh:mm:ss</code></td></tr><tr><td><code>end</code></td><td>DateTime!</td><td><em>End</em> date and time of the available block<code>YYYY-MM-DDT hh:mm:ss</code></td></tr><tr><td><code>coaches</code></td><td>[Coach]</td><td>Coaching portal <a href="../../../objects/appointments/coach">Coach</a>.</td></tr></tbody></table>

## Example

{% tabs %}
{% tab title="Request" %}

```graphql
query{
  coachAvailability(
    appointmentType:"QXBwb2ludG11brRUeXBlOjEwNTc="
    start:"2025-09-18"
    end:"2025-10-15"
  ){
    start
    end
    coaches{
      name
      email
      id
    }
}
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "coachAvailability": [
      {
        "start": "2025-10-09T22:00:00+00:00",
        "end": "2025-10-09T22:30:00+00:00",
        "coaches": [
          {
            "name": "Alex Morgan",
            "email": "alex.morgan@example.com",
            "id": "Q29hY2g6MDAwMDE="
          }
        ]
      },
      {
        "start": "2025-10-09T22:30:00+00:00",
        "end": "2025-10-09T23:00:00+00:00",
        "coaches": [
          {
            "name": "Alex Morgan",
            "email": "alex.morgan@example.com",
            "id": "Q29hY2g6MDAwMDE="
          }
        ]
      },
      {
        "start": "2025-10-11T15:00:00+00:00",
        "end": "2025-10-11T15:30:00+00:00",
        "coaches": [
          {
            "name": "Alex Morgan",
            "email": "alex.morgan@example.com",
            "id": "Q29hY2g6MDAwMDE="
          }
        ]
      },
      {
        "start": "2025-10-11T15:30:00+00:00",
        "end": "2025-10-11T16:00:00+00:00",
        "coaches": [
          {
            "name": "Alex Morgan",
            "email": "alex.morgan@example.com",
            "id": "Q29hY2g6MDAwMDE="
          }
        ]
      },
      {
        "start": "2025-10-11T16:00:00+00:00",
        "end": "2025-10-11T16:30:00+00:00",
        "coaches": [
          {
            "name": "Alex Morgan",
            "email": "alex.morgan@example.com",
            "id": "Q29hY2g6MDAwMDE="
          }
        ]
      },
      {
        "start": "2025-10-11T16:30:00+00:00",
        "end": "2025-10-11T17:00:00+00:00",
        "coaches": [
          {
            "name": "Alex Morgan",
            "email": "alex.morgan@example.com",
            "id": "Q29hY2g6MDAwMDE="
          }
        ]
      },
      {
        "start": "2025-10-11T17:00:00+00:00",
        "end": "2025-10-11T17:30:00+00:00",
        "coaches": [
          {
            "name": "Alex Morgan",
            "email": "alex.morgan@example.com",
            "id": "Q29hY2g6MDAwMDE="
          }
        ]
      },
      {
        "start": "2025-10-11T17:30:00+00:00",
        "end": "2025-10-11T18:00:00+00:00",
        "coaches": [
          {
            "name": "Alex Morgan",
            "email": "alex.morgan@example.com",
            "id": "Q29hY2g6MDAwMDE="
          }
        ]
      },
      {
        "start": "2025-10-11T18:00:00+00:00",
        "end": "2025-10-11T18:30:00+00:00",
        "coaches": [
          {
            "name": "Alex Morgan",
            "email": "alex.morgan@example.com",
            "id": "Q29hY2g6MDAwMDE="
          }
        ]
      },
      {
        "start": "2025-10-11T18:30:00+00:00",
        "end": "2025-10-11T19:00:00+00:00",
        "coaches": [
          {
            "name": "Alex Morgan",
            "email": "alex.morgan@example.com",
            "id": "Q29hY2g6MDAwMDE="
          }
        ]
      },
      {
        "start": "2025-10-14T15:30:00+00:00",
        "end": "2025-10-14T16:00:00+00:00",
        "coaches": [
          {
            "name": "Taylor Brooks",
            "email": "taylor.brooks@example.com",
            "id": "Q29hY2g6MDAwMDI="
          }
        ]
      },
      {
        "start": "2025-10-14T16:30:00+00:00",
        "end": "2025-10-14T17:00:00+00:00",
        "coaches": [
          {
            "name": "Taylor Brooks",
            "email": "taylor.brooks@example.com",
            "id": "Q29hY2g6MDAwMDI="
          }
        ]
      },
      {
        "start": "2025-10-14T18:00:00+00:00",
        "end": "2025-10-14T18:30:00+00:00",
        "coaches": [
          {
            "name": "Taylor Brooks",
            "email": "taylor.brooks@example.com",
            "id": "Q29hY2g6MDAwMDI="
          }
        ]
      }
    ]
  }
}
```

{% endtab %}
{% endtabs %}
