---
title: "Get availability"
method: GET
path: "/availability/{id}"
tags: ["availability"]
---

# Get availability

`GET /availability/{id}`

## Request

- Base URL: `https://api.hoorayhr.io`
- URL: `https://api.hoorayhr.io/availability/{id}`
- Auth: API key in header `authorization`

Retrieves a single availability based on the given id.

## Path parameters

- `id` integer, required

## Response `200`

A single availability

- AvailabilityResponse
  - `id` integer: ID of the item
  - `userId` integer, required: Unique id of the user.
  - `start` string, date, required: Start of the work schedule
  - `end` string, date: End of the work schedule
  - `schedule` Schedule, required
    - `even` integer[], required: Array containing the working minutes per day for even weeks
    - `odd` union, required: Array containing the working minutes per day for odd weeks
      - integer[]
      - boolean: Supply `false` if the schedule for odd weeks should match that of the even weeks.
  - `workweek` integer, required: The amount of minutes in `schedule`. If the odd and even weeks are different, it is the average of both
  - `calendarSchedule` Schedule
    - `even` integer[], required: Array containing the working minutes per day for even weeks
    - `odd` union, required: Array containing the working minutes per day for odd weeks
      - integer[]
      - boolean: Supply `false` if the schedule for odd weeks should match that of the even weeks.
  - `calendarScheduleWorkweek` integer, nullable: The amount of minutes in `calendarSchedule`. If the odd and even weeks are different, it is the average of both
  - `createdAt` string, date-time: Creation date of the availability item
  - `updatedAt` string, date-time: Last updated date of the availability item

## Other responses

- `401`: Not authenticated
- `404`: Not found
- `500`: General error

---

[API](https://skmtc.dev/hoorayhr/apis/hoorayhr-api-documentation.md) · [All operations](https://skmtc.dev/hoorayhr/apis/hoorayhr-api-documentation/llms.txt) · [OpenAPI document](https://skmtc.dev/hoorayhr/apis/hoorayhr-api-documentation/revisions/3adcd47cd827?raw)
