Max Capacity

Max Capacity vs Max Group Size vs Booking Limit

Understanding how Max Capacity, Max Group Size and Booking Limits work together is key to building a robust scheduling solution.

Booking Limit: Is the limit of bookings that can be made per booking slot. If booking limit is set to 10, it would mean that 10 different customers will be allowed to book one appointment each in a appointment slot.

Max Capacity / Max Group Size: These fields allow customers to book appointments for more than one person. maxGroupSize is the limit of customers that a customer can bring to an appointment, while maxCapacity is the limit of total customers.

I.e. When maxGroupSize is set to 5, one customer can bring up to 5 people total to the appointment.

👍

Use Case: Gracie Mansion Tours

We offer a 3-hour tour of the Gracie Mansion. One tour guide can handle up to 12 people. We allow customers to book up to 3 people, meaning one customer can bring 2 more people.

BookingLimitMaxCapacityMaxGroupSize
12123

To have success with group bookings. Make sure to check the current availability on the appointments. Here is a typical time slot that uses maxCapacity/maxGroupSize.

To check the availability, call the GET /consumer/v1/availability/{serviceId}/{startDate}/{endDate} endpoint in the Consumer API Interface.

Here is a typical response from this endpoint:

{
   "url":"/consumer/v1/availability/133339/2021-08-10/2021-08-10",
   "object":"availableTimes",
   "businessName":"Maxwell Capacity",
   "locationId":"fbfd474d-544d-4605-b4b5-3be49fb19caa",
   "serviceId":"133339",
   "serviceName":"Tammy's Tours of Gracie Mansion",
   "serviceDescription":"Set up a tour of Gracie Mansion",
   "serviceDuration":180,
   "startDate":"2021-08-10",
   "endDate":"2021-08-10",
   "resourceId":"129150",
   "resourceIds":"",
   "resourceName":"Maxwell Capello",
   "resourceDescription":"",
   "calendarId":"104869",
   "calendarResourceGroupId":"",
   "tzRequested":-240,
   "firstAvailableDate":"2021-08-10",
   "availableDays":[
      
   ],
   "availableTimes":[
      {
         "startDateTime":"2021-08-10T09:00:00-04:00",
         "endDateTime":"2021-08-10T12:00:00-04:00",
         "date":"2021-08-10",
         "time":900,
         "displayTime":"09:00 AM",
         "duration":180,
         "allowableBookings":12,
         "availableBookings":12,
         "allowableCapacity":12,
         "availableCapacity":12,
         "resourceId":"129150",
         "travelTimeMins":0,
         "travelAppointmentId":""
      },
      {
         "startDateTime":"2021-08-10T12:00:00-04:00",
         "endDateTime":"2021-08-10T15:00:00-04:00",
         "date":"2021-08-10",
         "time":1200,
         "displayTime":"12:00 PM",
         "duration":180,
         "allowableBookings":12,
         "availableBookings":12,
         "allowableCapacity":12,
         "availableCapacity":12,
         "resourceId":"129150",
         "travelTimeMins":0,
         "travelAppointmentId":""
      }
   ]
}

📘

Where to look

Notice the allowable and available capacity fields in each appointment slot

I will book an appointment for my family of 3 at the 9am slot by calling POST /consumer/v1/appointments.

curl -X POST 
  'https://sandbox-api.onsched.com/consumer/v1/appointments'
  --header 'Content-Type: application/json-patch+json' 
  --header 'Accept: application/json' 
  --header 'Authorization: Bearer {AUTH_TOKEN}' 
  -d '{
    "locationId":"fbfd474d-544d-4605-b4b5-3be49fb19caa",
    "serviceId":"133339",
    "resourceId":"129150",
    "email":"[email protected]",
    "name":"Tim Tester",
    "groupSize":3,
    "startDateTime":"2021-08-10T09:00:00-04:00",
    "endDateTime":"2021-08-10T12:00:00-04:00"
  }
POST /consumer/v1/appointments HTTP/1.1
Host: sandbox-api.onsched.com
Content-Type: application/json
Authorization: Bearer {AUTH_TOKEN}
Accept: */*
Cache-Control: no-cache
Host: sandbox-api.onsched.com
Accept-Encoding: gzip, deflate
Content-Length: 102
Cookie: ARRAffinity={RANDOM_STRING}
Connection: keep-alive
cache-control: no-cache

{
  "locationId":"fbfd474d-544d-4605-b4b5-3be49fb19caa",
  "serviceId":"133339",
  "resourceId":"129150",
  "email":"[email protected]",
  "name":"Tim Tester",
  "groupSize":3,
  "startDateTime":"2021-08-10T09:00:00-04:00",
  "endDateTime":"2021-08-10T12:00:00-04:00"
}
var request = require("request");

var options = { method: 'POST',
  url: 'https://sandbox-api.onsched.com/consumer/v1/appointments',
  headers: 
   { 'cache-control': 'no-cache',
     Connection: 'keep-alive',
     Cookie: 'ARRAffinity={RANDOM_STRING}}',
     'Content-Length': '102',
     'Accept-Encoding': 'gzip, deflate',
     Host: 'sandbox-api.onsched.com',
     'Cache-Control': 'no-cache',
     Accept: '*/*',
     Authorization: 'Bearer {AUTH_TOKEN}',
     'Content-Type': 'application/json' },
  body: 
   {
    "locationId":"fbfd474d-544d-4605-b4b5-3be49fb19caa",
    "serviceId":"133339",
    "resourceId":"129150",
    "email":"[email protected]",
    "name":"Tim Tester",
    "groupSize":3,
    "startDateTime":"2021-08-10T09:00:00-04:00",
    "endDateTime":"2021-08-10T12:00:00-04:00"
  },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

After the booking, we run availability again and we will see the 9am slot has decreased values for availableBookings and availableCapacity.

{
  "url":"/consumer/v1/availability/133339/2021-08-10/2021-08-10",
  "object":"availableTimes",
  "businessName":"Maxwell Capacity",
  "locationId":"fbfd474d-544d-4605-b4b5-3be49fb19caa",
  "serviceId":"133339",
  "serviceName":"Tammy's Tours of Gracie Mansion",
  "serviceDescription":"Set up a tour of Gracie Mansion",
  "serviceDuration":180,
  "startDate":"2021-08-10",
  "endDate":"2021-08-10",
  "resourceId":"129150",
  "resourceIds":"",
  "resourceName":"Maxwell Capello",
  "resourceDescription":"",
  "calendarId":"104869",
  "calendarResourceGroupId":"",
  "tzRequested":-240,
  "firstAvailableDate":"2021-08-10",
  "availableDays":[
    
  ],
  "availableTimes":[
    {
      "startDateTime":"2021-08-10T09:00:00-04:00",
      "endDateTime":"2021-08-10T12:00:00-04:00",
      "date":"2021-08-10",
      "time":900,
      "displayTime":"09:00 AM",
      "duration":180,
      "allowableBookings":12,
      "availableBookings":11,
      "allowableCapacity":12,
      "availableCapacity":9,
      "resourceId":"129150",
      "travelTimeMins":0,
      "travelAppointmentId":""
    },
    {
      "startDateTime":"2021-08-10T12:00:00-04:00",
      "endDateTime":"2021-08-10T15:00:00-04:00",
      "date":"2021-08-10",
      "time":1200,
      "displayTime":"12:00 PM",
      "duration":180,
      "allowableBookings":12,
      "availableBookings":12,
      "allowableCapacity":12,
      "availableCapacity":12,
      "resourceId":"129150",
      "travelTimeMins":0,
      "travelAppointmentId":""
    }
  ]
}

How to set up MaxCapacity, MaxGroupSize and BookingLimit

In the Setup API Interface calling the POST /setup/v1/services endpoint.

curl -X POST 
  'https://sandbox-api.onsched.com/setup/v1/services'
  --header 'Content-Type: application/json-patch+json' 
  --header 'Accept: application/json' 
  --header 'Authorization: Bearer {AUTH_TOKEN}' 
  -d '{
    "locationId":"fbfd474d-544d-4605-b4b5-3be49fbXXXXX",
    "name":"Tammy\'s Tours of Gracie Mansion",
    "description":"Set up a tour of Gracie Mansion",
    "type":"1",
    "duration":180,
    "bookingLimit":12,
    "maxCapacity":12,
    "maxGroupSize":3
  }
POST /setup/v1/services HTTP/1.1
Host: sandbox-api.onsched.com
Content-Type: application/json
Authorization: Bearer {AUTH_TOKEN}
Accept: */*
Cache-Control: no-cache
Host: sandbox-api.onsched.com
Accept-Encoding: gzip, deflate
Content-Length: 102
Cookie: ARRAffinity={RANDOM_STRING}
Connection: keep-alive
cache-control: no-cache

{
  "locationId":"fbfd474d-544d-4605-b4b5-3be49fbXXXXX",
  "name":"Tammy's Tours of Gracie Mansion",
  "description":"Set up a tour of Gracie Mansion",
  "type":"1",
  "duration":180,
  "bookingLimit":12,
  "maxCapacity":12,
  "maxGroupSize":3
}
var request = require("request");

var options = { method: 'POST',
  url: 'https://sandbox-api.onsched.com/setup/v1/services',
  headers: 
   { 'cache-control': 'no-cache',
     Connection: 'keep-alive',
     Cookie: 'ARRAffinity={RANDOM_STRING}}',
     'Content-Length': '102',
     'Accept-Encoding': 'gzip, deflate',
     Host: 'sandbox-api.onsched.com',
     'Cache-Control': 'no-cache',
     Accept: '*/*',
     Authorization: 'Bearer {AUTH_TOKEN}',
     'Content-Type': 'application/json' },
  body: 
   { 
      "locationId":"fbfd474d-544d-4605-b4b5-3be49fbXXXXX",
      "name":"Tammy's Tours of Gracie Mansion",
      "description":"Set up a tour of Gracie Mansion",
      "type":"1",
      "duration":180,
      "bookingLimit":12,
      "maxCapacity":12,
      "maxGroupSize":3
   },
  json: true };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});

In Portal, these fields are filled in under My Services > Manage Service Section

In Dashboard they are found under Services.

🚧

IMPORTANT: BOOKING LIMIT NOTE

If no booking limit is specified in the SERVICE or it is defined as “0”, then the system will use the “bookings per slot” value used in the CALENDAR. This is defaulted to 1 upon the creation of your Company .


Did this page help you?