Skip to content
ShiftlyDevelopers
Documentation menu

Availability

When people have said they can and cannot work. Each record is a rule that may repeat, not a list of days.

Needs the roster:read permission, depending on the operation. The business sees it as "Rosters and shifts".

Fields

AvailabilityRule fields
FieldTypeAccessMeaning
idstringRead-onlyThe availability rule.
employee_idstringRead-onlyWhose availability this is.
polarity"available", "unavailable"Read-onlyavailable or unavailable.
all_daybooleanRead-onlyTrue when the rule covers the whole day.
start_minutesinteger, may be nullRead-onlyMinutes after midnight the rule starts, on the clock at whichever location a shift is at.
end_minutesinteger, may be nullRead-onlyMinutes after midnight the rule ends.
start_datedateRead-onlyFirst day the rule applies.
end_datedate, may be nullRead-onlyLast day the rule applies. Empty when it has no end.
ended_ondate, may be nullRead-onlyThe day the rule was ended early.
repeat"none", "weekly", "fortnightly", "monthly"Read-onlynone, weekly, fortnightly or monthly.
commentstring, may be nullRead-onlyWhat the person wrote, where the connecting person may see it.
created_attimestampRead-onlyWhen the rule was created.
updated_attimestampRead-onlyWhen the rule last changed.

Operations

List availability rules that apply in a date range

GET/v1/availability

Permission: roster:read

Query parameters
ParameterTypeMeaning
fromdateRequiredThe first day of the range, in the location's timezone. With to, at most 92 days.
todateRequiredThe last day of the range, inclusive.
employee_idstringOptionalOnly this person.
200 response
{
  "data": [
    {
      "id": "66f1c2a4b3d9e8f7a6b5c4d3",
      "employee_id": "66f1c2a4b3d9e8f7a6b5c4d3",
      "polarity": "available",
      "all_day": true,
      "start_minutes": 1,
      "end_minutes": 1,
      "start_date": "2026-10-06",
      "end_date": "2026-10-06",
      "ended_on": "2026-10-06",
      "repeat": "none",
      "comment": "text",
      "created_at": "2026-10-06T09:00:00+11:00",
      "updated_at": "2026-10-06T09:00:00+11:00"
    }
  ],
  "has_more": true,
  "next_cursor": "text"
}
Refusals
StatusWhen
400The error's code is invalid_request or range_too_long. The Errors page describes each code.
401The error's code is invalid_token or token_expired. The Errors page describes each code.
403The error's code is origin_not_allowed, permission_denied, not_available, connection_disconnected, connection_suspended or app_suspended. The Errors page describes each code.
404There is nothing at this address, or no such record in this business.
429Too many requests. Retry-After says when to try again.
500Something went wrong at Shiftly. Quote the request id.
503This environment is not set up for partner apps yet.