API
The new Availability Constraints feature provides new functionality for managing quotas or limits on types of events in a calendar; for example, a hiring manager who only wants to do three interviews in a week at most.
To start using Availability Constraints, the first step is to add tags to your events, as described in the documentation here. For the interview example, your request might look something like this:
{
"event_id": "qTtZdczOccgaPncGJaCiLg",
"summary": "Interview",
"start": "2022-12-10T15:30:00Z",
"end": "2022-12-10T17:00:00Z",
"tags": {
"private": [
{ "value": "interview" }
]
}
}
When you come to query the availability for the next interview, you can add the following availability_constraint
:
{
"participants": [
{
"members": [
{
...
"availability_constraints": [
{
"period": "week",
"limit": 3,
"tags":
"private": [
{"value": "interview"}
]
}
}
]
}
],
...
}
],
...
}
If there are already 3 events tagged with 'interview' in the calendar/s in question, then no availability will be returned for that particular week.
You can find out more in our docs.