---
title: "Get Unavailable Times"
method: GET
path: "/consumer/v1/availability/{serviceId}/{startDate}/{endDate}/unavailable"
tags: ["Availability"]
---

# Get Unavailable Times

`GET /consumer/v1/availability/{serviceId}/{startDate}/{endDate}/unavailable`

This endpoint is used to show **Unavailable** times and provides valuable information as to why a time slot is unavailable. If you question your availability results, populate the same parameters to this endpoint to find out why.

A **serviceId** is required. The **startDate** and **endDate** are required and are formatted as: **YYYY-MM-DD**

Location hours, holidays, services, resources, blocks, allocations, and appointments are just some of variables that may cause time slots to become unavailable. Use this endpoint to understand why you don't see availability.

## Path parameters

- `serviceId` string, required
- `startDate` string, date-time, required
- `endDate` string, date-time, required

## Query parameters

- `locationId` string
- `resourceId` string
- `resourceIds` string
- `duration` integer
- `tzOffset` integer
- `skipTimePastUnavailability` boolean

## Response `200`

Success

- UnavailableTimeListViewModel
  - `object` string, nullable
  - `url` string, nullable
  - `unavailableTimes` UnavailableTimeViewModel[], nullable
    - `objectName` string, nullable
    - `locationId` string, nullable
    - `calendarId` string, nullable
    - `resourceId` string, nullable
    - `serviceId` string, nullable
    - `date` string, nullable
    - `fromTime` integer
    - `toTime` integer
    - `tzOffset` integer
    - `startDateTime` string, nullable
    - `endDateTime` string, nullable
    - `reasonCode` string, nullable
    - `reason` string, nullable
    - `entityType` string, nullable
    - `entityId` integer
    - `resourceName` string, nullable
    - `serviceName` string, nullable

---

[API](https://skmtc.net/onsched/apis/onsched-consumer-api.md) · [All operations](https://skmtc.net/onsched/apis/onsched-consumer-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/onsched/onsched-consumer-api/versions/1cd2a28a0305/schema)
