# List Appointments in Calendar

{% hint style="info" %}
This endpoint requires the **Appointments Manager** rol&#x65;**.**
{% endhint %}

## URL

{% code overflow="wrap" %}

```
GET: .../{applicationId}/calendars/{serviceId}/{date}/{cuIndex}/appointments[?customerRecordId=<GUID>]
```

{% endcode %}

## Headers

```
Authorization: Bearer <accessToken>
```

## Route Params

* **serviceId**: GUID, required.
* **date**: date in `YYYY-MM-dd` format; required.
* **cuIndex**: the calendar's unique identifier.

## Query Params <a href="#query-params" id="query-params"></a>

* **customerRecordId**: GUID, optional.\
  When the parameter is specified, the endpoint returns only appointments booked for the specified customer.

## Response

{% tabs %}
{% tab title="200 -> OK" %}
Returns a list of appointments found in the specified calendar.

{% code overflow="wrap" %}

```json
[
    {
        "caseId": "4e510ed0-ef6f-4441-a1d3-c29d2f752e57",
        "appointment": {
            "serviceId": "3031af97-328d-4df1-a528-cf198e4e7897",
            "date": "2023-07-09T00:00:00",
            "cuIndex": 0,
            "start": 700, // no. of minutes since midnight
            "timeLocal": "2023-07-09T11:51:00",
            "timeUtc": "2023-07-09T08:51:00Z",
            "timeZoneId": "Israel Standard Time",
            "duration": 7,
            "noShowProbability": 0,
            "reservationToken": null,
            "reservationExpiryDate": null
        },
        "ticket": {
            "prefix": "A",
            "suffix": null,
            "number": 331
        },
        "serviceCategoryId": "ef023335-f091-4e97-9fa3-3076bac3309b",
        "serviceCategoryName": "Consulting",
        "serviceTypeId": "108165ca-8277-4284-a073-432b6d20219c",
        "serviceTypeName": "Forms approval",
        "serviceTypeColorCode": "orange",
        "status": "Planned",
        "statusDate": "2023-07-07T10:54:00.3363419Z",
        "referenceDate": "2023-07-09T08:51:00Z",
        "dateOpened": "2023-07-07T10:54:00.3363419Z",
        "dateClosed": null,
        "assignedTo": null, // User Data (1)
        "lockedBy": null, // User Data (1)
        "customer": null,
        "onlineMeeting": null,
        "channel": "FaceToFace",
        "language": "en-US",
        "position": null,
        "inboxId": "e2a49c4f-8a02-496a-aa86-37a30212c5f5",
        "inboxName": "Consulting",
        "caseTimestamp": "2023-07-07T10:54:05.0842864Z"
    }
]
```

{% endcode %}
{% endtab %}
{% endtabs %}

### User Data object (1)

{% code overflow="wrap" %}

```json
{
  "userId": "<GUID>",
  "displayName": "Irene Jones",
  "initials": "IJ",
  "picture": "<link to image>""
}// Some code
```

{% endcode %}
