availability

Get availability

Retrieves a single availability based on the given id.

get/availability/{id}

Request

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

Path parameters

idinteger required

The id of the availability to retrieve

Response

A single availability

idinteger

ID of the item

userIdinteger required

Unique id of the user.

startstring date required

Start of the work schedule

endstring date

End of the work schedule

workweekinteger required

The amount of minutes in schedule. If the odd and even weeks are different, it is the average of both

calendarScheduleWorkweekinteger nullable

The amount of minutes in calendarSchedule. If the odd and even weeks are different, it is the average of both

createdAtstring date-time

Creation date of the availability item

updatedAtstring date-time

Last updated date of the availability item

Example response

{
  "id": 5,
  "userId": 1,
  "start": "2022-02-15",
  "end": "2022-02-16",
  "schedule": {
    "even": [
      480,
      480,
      480,
      480,
      480,
      0,
      0
    ],
    "odd": [
      480,
      480,
      480,
      480,
      480,
      0,
      0
    ]
  },
  "workweek": 2400,
  "calendarSchedule": {
    "even": [
      480,
      480,
      480,
      480,
      480,
      0,
      0
    ],
    "odd": [
      480,
      480,
      480,
      480,
      480,
      0,
      0
    ]
  },
  "calendarScheduleWorkweek": 2400,
  "createdAt": "2022-02-15T14:01:17.516Z",
  "updatedAt": "2022-02-23T14:01:17.516Z"
}

Changes

No recorded changes to this operation across all 1 revision of this API.