What is a Resource?

In the context of Sched, a "Resource" refers to any entity that can be scheduled or booked. This could include people, rooms, equipment, or any other item or service that can be reserved for a specific period. Resources are central to the booking process, as they represent what is being booked by the client or user.

Key Components of a Resource

A resource typically involves several key attributes:

  1. Name: The name of the resource, which identifies what the resource is, such as "Meeting Room A" or "John Doe."

  2. Description: A detailed description of the resource, providing additional context or information that may be useful for users. For example, this could include the features of a meeting room or the qualifications of a service provider.

  3. Image URL: A URL pointing to an image representing the resource. This is useful for visual identification, especially in cases where the resource is a physical object or location.

  4. Google Calendar ID: If the resource is linked to a Google Calendar, this field stores the Google Calendar ID. This allows for synchronization between Sched and Google Calendar, ensuring that the resource’s availability is always up-to-date.

  5. Booking URL: A specific URL where users can directly book the resource. This might link to a booking page or a specific calendar view.

  6. Timezone: The timezone in which the resource operates. This is crucial for scheduling, as it ensures that bookings are made according to the correct local time for the resource.

Resource Lifecycle

The lifecycle of a resource typically includes the following stages:

  1. Creation: A resource is created in the system with all the necessary attributes, making it available for booking.

  2. Availability Management: The availability of the resource is managed by setting time slots when the resource can or cannot be booked. This could be done manually or through integration with an external calendar like Google Calendar.

  3. Booking: Users can book the resource during its available time slots. The system checks for conflicts and ensures that the resource is not double-booked.

  4. Modification: Resources can be modified at any time. This includes changes to the resource's attributes, availability, or linked calendar.

  5. Deactivation or Deletion: If a resource is no longer available, it can be deactivated (made unavailable for booking) or deleted from the system.

API Operations Related to Resources

The Sched API provides several operations related to resources:

  1. Create Resource (POST /resources):

    • This endpoint allows users to create a new resource by specifying its attributes such as name, description, and availability.
    • Example Payload:
      {
          "name": "Meeting Room A",
          "description": "A fully equipped meeting room with video conferencing capabilities.",
          "image_url": "https://example.com/images/meeting-room-a.jpg",
          "google_calendar_id": "calendar-id",
          "google_calendar_name": "Meeting Room A Calendar",
          "booking_url": "https://sched.dev/bookings/room-a",
          "timezone": "Europe/London"
      }
      
  2. Get Resource (GET /resources/{resource_id}):

    • Retrieve the details of a specific resource using its unique identifier.
    • Response Example:
      {
          "resource_id": "uuid",
          "name": "Meeting Room A",
          "description": "A fully equipped meeting room with video conferencing capabilities.",
          "image_url": "https://example.com/images/meeting-room-a.jpg",
          "google_calendar_id": "calendar-id",
          "google_calendar_name": "Meeting Room A Calendar",
          "booking_url": "https://sched.dev/bookings/room-a",
          "timezone": "Europe/London"
      }
      
  3. Update Resource (PUT /resources/{resource_id}):

    • Allows modification of an existing resource. This could include updating the description, image, or availability settings.
    • Example Payload:
      {
          "description": "Updated description for Meeting Room A.",
          "image_url": "https://example.com/images/meeting-room-a-new.jpg"
      }
      
  4. Delete Resource (DELETE /resources/{resource_id}):

    • This operation deletes an existing resource from the system, making it unavailable for future bookings.

Use Cases for Resources

Resources can be anything that requires scheduling and availability management. Some common use cases include:

  • Corporate: Meeting rooms, conference halls, or shared office equipment.
  • Healthcare: Doctors, therapists, or medical equipment that can be scheduled for patient appointments.
  • Education: Classrooms, laboratories, or tutoring sessions.
  • Services: Service providers such as consultants, trainers, or freelancers who offer bookable services.

Conclusion

Resources are a fundamental aspect of the Sched system, representing the entities that users can book. The API provides powerful tools for managing these resources, ensuring they are utilized efficiently and effectively. Whether you are managing a single resource or an entire fleet of resources, Sched gives you the flexibility and control to meet your scheduling needs.


Next Steps

  • Explore the API Endpoints: Check out the API documentation to learn more about the operations you can perform on resources.
  • Start Creating Resources: Use the API to add resources to your system and make them available for booking.