The scheduler availability endpoint is ignoring start and end times in default_open_hours. Here’s an example
Get Configuration
Response
{
"request_id": "6c11fb22-1e0d-4308-87cd-b41c109c53f2",
"data": {
"id": "ba363e49-b1ad-4218-a7c6-8bae078503f5",
"version": "1.0.0",
"participants": [
{
"name": "<redacted>",
"email": "<redacted>",
"is_organizer": true,
"availability": {
"calendar_ids": [
"a3cceb74-9bac-4a79-91d6-f33bbe9ac8c9"
]
},
"booking": {
"calendar_id": "a3cceb74-9bac-4a79-91d6-f33bbe9ac8c9"
}
}
],
"requires_session_auth": false,
"availability": {
"duration_minutes": 65,
"interval_minutes": 65,
"availability_rules": {
"availability_method": "",
"buffer": {
"before": 0,
"after": 0
},
"default_open_hours": [
{
"days": [
1
],
"exdates": [],
"timezone": "",
"start": "9:00:00",
"end": "12:00:00"
}
],
"round_robin_group_id": ""
}
},
"event_booking": {
"title": "Muh Service",
"timezone": "America/New_York",
"description": "\n",
"booking_type": "booking",
"hide_participants": null,
"disable_emails": null
},
"scheduler": {
"available_days_in_future": 30,
"min_cancellation_notice": 0,
"min_booking_notice": 60
}
}
Get Availability
Request
curl 'https://api.eu.nylas.com/v3/scheduling/availability?start_time=1716021200&end_time=1716199200&configuration_id=ba363e49-b1ad-4218-a7c6-8bae078503f5
Response
{
"request_id": "5b093605-1efc-4f71-ae82-cae05dda063f",
"data": {
"time_slots": [
{
"end_time": 1716181500,
"start_time": 1716177600
},
{
"end_time": 1716185400,
"start_time": 1716181500
},
{
"end_time": 1716189300,
"start_time": 1716185400
},
{
"end_time": 1716193200,
"start_time": 1716189300
},
{
"end_time": 1716197100,
"start_time": 1716193200
}
]
}
}
Basically the time slots begin at midnight on monday in the timezone (data.event_booking.timezone
) instead of at 9am