# Past Appointments

Use the `pastAppointments` query to retrieve the list of appointments that have occurred for the user.

### Arguments

| Argument | Type     | Description                                                                                            |
| -------- | -------- | ------------------------------------------------------------------------------------------------------ |
| `first`  | Int      | Retrieves the first results from the list.                                                             |
| `last`   | Int      | Retrieves the last results from the list.                                                              |
| `after`  | String   | See [pagination](https://docs.suggestic.com/graphql/start-here/tutorials-and-walkthroughs/pagination). |
| `before` | String   | See [pagination](https://docs.suggestic.com/graphql/start-here/tutorials-and-walkthroughs/pagination). |
| `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`                                               |

### 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>id</code></td><td>ID</td><td>A base64-encoded version of the <code>databaseId</code></td></tr><tr><td><code>appointmentCredits</code></td><td>AppointmentCredit</td><td><a href="/pages/IsFymbwAkj9zuTavOuAE">Appointment credit.</a></td></tr><tr><td><code>appointmentType</code></td><td>AppointmentType!</td><td><a href="https://app.gitbook.com/o/-LwqSh0rNboNaGEQruZQ/s/-LwqSnBDpAb6mFZYLsuB/~/changes/1928/objects/appointment/appointment-type">Appointment Type.</a></td></tr><tr><td><code>attendees</code></td><td>string</td><td><a href="https://app.gitbook.com/o/-LwqSh0rNboNaGEQruZQ/s/-LwqSnBDpAb6mFZYLsuB/~/changes/1928/objects/appointment/attendee">Users attending to the appointment.</a></td></tr><tr><td><code>coach</code></td><td>string</td><td>Coaching portal <a href="https://app.gitbook.com/o/-LwqSh0rNboNaGEQruZQ/s/-LwqSnBDpAb6mFZYLsuB/~/changes/1928/objects/appointments/coach">Coach</a>.</td></tr><tr><td><code>contactType</code></td><td>CalendarContactType!</td><td>enum: GOOGLE_MEET, PHONE_CALL, VIDEO_CALL, ZOOM</td></tr><tr><td><code>description</code></td><td>String</td><td>Description of the appointment.</td></tr><tr><td><code>end</code></td><td>DateTime!</td><td>Date and time when the appointment will end. <code>YYYY-MM-DDT hh:mm:ss</code></td></tr><tr><td><code>labTestReports</code></td><td>LabTestReportConnection</td><td>Lab test report assigned to the appointment.</td></tr><tr><td><code>meetingUrl</code></td><td>String</td><td>URL of the meeting.</td></tr><tr><td><code>postEventStatus</code></td><td>PostEventStatus</td><td>enum: <em>CANCELED_BY_COACH</em>, <em>CANCELED_BY_MEMBER</em>, <em>COACH_NO_SHOW COMPLETED, MEMBER_NO_SHOW, RESCHEDULED_BY_ADMIN, RESCHEDULED_BY_COACH, RESCHEDULED_BY_MEMBER, SCHEDULED</em></td></tr><tr><td><code>start</code></td><td>DateTime!</td><td>Date and time when the appointment will start. <code>YYYY-MM-DDT hh:mm:ss</code></td></tr><tr><td><code>status</code></td><td>EventStatus!</td><td>enum: CANCELLED, CONFIRMED, TENTATIVE, UNKNOW</td></tr><tr><td><code>title</code></td><td>String!</td><td>Title of the appointment.</td></tr><tr><td><code>zoomSessionName</code></td><td>String</td><td>Zoom session name.</td></tr><tr><td><code>ZoomSessionPassword</code></td><td>String</td><td>Zoom session password.</td></tr></tbody></table>

## Example

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

```graphql
query {pastAppointments (start:"2023-10-31T06:00:00+00:00")
{
  edges{
    node{
      title
      start
      end
      id
      coach{
        name
      }
    }
  }
}
}
```

{% endtab %}

{% tab title="Response" %}

```graphql
{
  "data": {
    "pastAppointments": {
      "edges": [
        {
          "node": {
            "title": "Test qa",
            "start": "2024-01-23T18:00:00+00:00",
            "end": "2024-01-23T18:30:00+00:00",
            "id": "QXBwb2ludG1lbnQ6MjA1ODE=",
            "coach": {
              "name": "Suggestic Admin Coach"
            }
          }
        },
        {
          "node": {
            "title": "Health Coaching Lab Review Call (1 lab test)",
            "start": "2024-01-30T20:30:00+00:00",
            "end": "2024-01-30T21:00:00+00:00",
            "id": "QXBwb2ludG1lbnQ6MjA3OTY=",
            "coach": {
              "name": "Coach G "
            }
          }
        },
        {
          "node": {
            "title": "Test qa",
            "start": "2024-02-01T19:30:00+00:00",
            "end": "2024-02-01T20:00:00+00:00",
            "id": "QXBwb2ludG1lbnQ6MjA4NDQ=",
            "coach": {
              "name": "Suggestic Admin Coach"
            }
          }
        },
        {
          "node": {
            "title": "Test 23",
            "start": "2023-10-31T06:00:00+00:00",
            "end": "2023-10-31T07:00:00+00:00",
            "id": "QXBwb2ludG1lbnQ6MTgxMDc=",
            "coach": {
              "name": "Suggestic Admin Coach"
            }
          }
        },
        {
          "node": {
            "title": "Test qa",
            "start": "2023-11-17T16:30:00+00:00",
            "end": "2023-11-17T17:00:00+00:00",
            "id": "QXBwb2ludG1lbnQ6MTg3NTQ=",
            "coach": {
              "name": "Suggestic Admin Coach"
            }
          }
        }
      ]
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.suggestic.com/graphql/query/queries/appointments/past-appointments.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
