Skip to main content

Overview

The Schedules API provides access to Zoo Arcadia’s opening hours, including regular schedule, seasonal variations, and special event timings.

Get Schedules

Returns the complete schedule information for the zoo, including opening and closing times for different periods.
GET /api/schedules

Response Fields

success
boolean
Indicates if the request was successful
data
array
Array of schedule objects
id_opening
integer
Unique identifier for the schedule entry
time_slot
string
Time period or day(s) this schedule applies to (e.g., “Monday-Friday”, “Weekends”, “Summer Season”)
opening_time
string
Opening time in HH:MM:SS format
closing_time
string
Closing time in HH:MM:SS format
status
string
Current status of the schedule: “active”, “inactive”, or “seasonal”

Example Request

curl https://zoo-arcadia.example.com/api/schedules

Example Response

{
  "success": true,
  "data": [
    {
      "id_opening": 1,
      "time_slot": "Monday-Friday",
      "opening_time": "09:00:00",
      "closing_time": "18:00:00",
      "status": "active"
    },
    {
      "id_opening": 2,
      "time_slot": "Saturday-Sunday",
      "opening_time": "08:00:00",
      "closing_time": "20:00:00",
      "status": "active"
    },
    {
      "id_opening": 3,
      "time_slot": "Summer (June-August)",
      "opening_time": "07:00:00",
      "closing_time": "21:00:00",
      "status": "seasonal"
    },
    {
      "id_opening": 4,
      "time_slot": "Winter (December-February)",
      "opening_time": "10:00:00",
      "closing_time": "17:00:00",
      "status": "seasonal"
    }
  ]
}

Schedule Status Values

The status field indicates the current state of a schedule entry:

Active

Schedules that are currently in effect and apply to regular operations.
{
  "status": "active"
}

Seasonal

Schedules that apply only during specific seasons or periods of the year.
{
  "status": "seasonal"
}

Inactive

Schedules that are no longer in use but retained for historical reference.
{
  "status": "inactive"
}

Time Format

All times are returned in 24-hour format (HH:MM:SS). Convert to 12-hour format on the client side if needed.

Example Time Conversion

function formatTime(time24) {
  const [hours, minutes] = time24.split(':');
  const hour = parseInt(hours);
  const period = hour >= 12 ? 'PM' : 'AM';
  const hour12 = hour % 12 || 12;
  return `${hour12}:${minutes} ${period}`;
}

// Example: "18:00:00" → "6:00 PM"
console.log(formatTime("18:00:00"));

Use Cases

Display Current Hours

Filter schedules by status: "active" to show visitors the current operating hours.

Show Seasonal Variations

Use status: "seasonal" entries to inform visitors about special hours during holidays or different seasons.

Plan Visits

Allow visitors to view all schedule variations to help them plan their visit based on their preferred time period.

Error Responses

Resource Not Found

When the schedules endpoint is not available:
{
  "error": true,
  "message": "Resource 'schedules' not found"
}
HTTP Status Code: 404 Not Found

Notes

Schedule information is typically updated by zoo administrators. Check the API regularly for any changes to operating hours, especially during holidays or special events.

Build docs developers (and LLMs) love