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

# Finding Availability

> GET /Schedule and GET /Slot

## GET /Schedule

Returns the bookable schedule for a given provider.

Query parameter `actor` (required): `Practitioner/{providerName}`. Missing returns 400.

### Response

200 OK:

```json theme={null}
{
  "resourceType": "Schedule",
  "id": "Dr. Patel",
  "actor": [{ "reference": "Practitioner/Dr. Patel" }]
}
```

### Example request

```bash theme={null}
curl -G "https://your-emma-domain/api/Schedule" \
  -H "Authorization: Bearer <jwt>" \
  --data-urlencode "actor=Practitioner/Dr. Patel"
```

## GET /Slot

Returns open 30-minute slots for a schedule.

Query parameter `schedule` (required): `Schedule/{providerName}`.

Query parameter `start` (optional): `ge{date}`. The `ge` prefix mirrors Epic's own "greater-or-equal" date search convention. An invalid date returns 400.

### Response

200 OK, a FHIR Bundle of Slot resources:

```json theme={null}
{
  "resourceType": "Bundle",
  "type": "searchset",
  "entry": [
    {
      "resource": {
        "resourceType": "Slot",
        "id": "slot-001",
        "schedule": { "reference": "Schedule/Dr. Patel" },
        "status": "free",
        "start": "2026-09-15T14:30:00.000Z",
        "end": "2026-09-15T15:00:00.000Z"
      }
    }
  ]
}
```

### Example request

```bash theme={null}
curl -G "https://your-emma-domain/api/Slot" \
  -H "Authorization: Bearer <jwt>" \
  --data-urlencode "schedule=Schedule/Dr. Patel" \
  --data-urlencode "start=ge2026-09-15"
```
