SearchAvailability
Query available appointment slots in Square. Use StartAt range filters to define the search window.
View Specific Information
Select
The driver uses the Square API to filter the results by the following columns and operators while the rest of the filter is executed client-side within the driver.
- StartAt supports the following operators: =, >=, <=, >, <.
- LocationId supports the following operator: =.
- SegmentFilterServiceVariationId supports the following operator: =.
- SegmentFilterTeamMemberIds supports the following operators: =, IN.
- BookingId supports the following operator: =.
The StartAt column supports range filters and defines the search window for available appointment slots. The range must be at least 24 hours and at most 32 days long, and both bounds must be in the future.
SELECT * FROM SearchAvailability WHERE StartAt >= '2026-08-01T13:00:00Z' AND StartAt < '2026-08-03T13:00:00Z'
Filter by location to narrow results to a specific business location.
SELECT * FROM SearchAvailability WHERE StartAt >= '2026-08-01T13:00:00Z' AND StartAt < '2026-08-03T13:00:00Z' AND LocationId = 'L4BZEJRHSFBKJ'
Filter by service variation to find slots for a specific service.
SELECT * FROM SearchAvailability WHERE StartAt >= '2026-08-01T13:00:00Z' AND StartAt < '2026-08-03T13:00:00Z' AND SegmentFilterServiceVariationId = 'QWG7QRXXGJ4IPXQQK55IDHGE'
Filter by team member to find slots served by a specific team member.
SELECT * FROM SearchAvailability WHERE StartAt >= '2026-08-01T13:00:00Z' AND StartAt < '2026-08-03T13:00:00Z' AND SegmentFilterTeamMemberIds = '_77Nq6SzK0cH2YRX-q9a'
Use the IN operator to find slots served by any of several team members.
SELECT * FROM SearchAvailability WHERE StartAt >= '2026-08-01T13:00:00Z' AND StartAt < '2026-08-03T13:00:00Z' AND SegmentFilterTeamMemberIds IN ('_77Nq6SzK0cH2YRX-q9a', 'TMyvF-_wObMpErVh')
Use BookingId to search for availabilities of an existing booking, commonly used when rescheduling an appointment. BookingId cannot be combined with LocationId or SegmentFilter columns.
SELECT * FROM SearchAvailability WHERE StartAt >= '2026-08-01T13:00:00Z' AND StartAt < '2026-08-03T13:00:00Z' AND BookingId = 'TSzmWdjcmuGj2I4e'
Columns
| Name | Type | Description |
| StartAt | Datetime | The RFC 3339 start time of the available appointment slot. Use range filters (e.g., StartAt >= '...' AND StartAt< '...') to define the search window. |
| LocationId | String | The ID of the location where the appointment slot is available. |
| AppointmentSegmentsDurationMinutes | Int32 | The time span in minutes of the appointment segment. |
| AppointmentSegmentsTeamMemberId | String | The ID of the team member booked in this appointment segment. |
| AppointmentSegmentsServiceVariationId | String | The ID of the catalog item variation representing the booked service. |
| AppointmentSegmentsServiceVariationVersion | Int64 | The version of the catalog item variation representing the booked service. |
| AppointmentSegmentsIntermissionMinutes | Int32 | The time span in minutes of the break between two consecutive appointment segments. |
| AppointmentSegmentsAnyTeamMember | Boolean | Whether the customer accepts any available team member to provide the service in this segment. |
| AppointmentSegmentsResourceIds | String | The IDs of the seller-accessible resources used for booking this appointment segment. |
Pseudocolumns
Pseudo column fields are used in the WHERE clause of SELECT statements (unless stated otherwise) and offer a more granular control over the tuples that are returned from the data source.
| Name | Type | Description |
| SegmentFilterServiceVariationId | String | Filters results to slots for the specified catalog service variation ID. |
| SegmentFilterTeamMemberIds | String | Filters results to slots served by any of the specified team member IDs. |
| BookingId | String | Searches for availabilities of an existing booking (used to reschedule). Cannot be combined with LocationId or SegmentFilter* inputs. |