> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # CheckTimeSlot # Package: reservations # Namespace: TimeSlotsService # Method link: https://dev.wix.com/docs/api-reference/business-solutions/restaurants/reservations/time-slots/check-time-slot.md ## Permission Scopes: Manage Reservations (Medium): SCOPE.DC-RESERVATIONS.MANAGE-RESERVATIONS-MEDIUM ## Introduction Checks a restaurant's availability to accommodate a reservation for a specified party size in a specified time slot. This endpoint returns availability information for the restaurant's table combinations, and flags any party pacing or seat pacing conflicts that the proposed reservation would cause. --- ## REST API ### Schema ``` Method: checkTimeSlot Description: Checks a restaurant's availability to accommodate a reservation for a specified party size in a specified time slot. This endpoint returns availability information for the restaurant's table combinations, and flags any party pacing or seat pacing conflicts that the proposed reservation would cause. URL: https://www.wixapis.com/v1/check-time-slot Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: reservationLocationId, date, duration, partySize Method parameters: param name: date | type: date | description: Date and time of the time slot to check. | required: true param name: duration | type: duration | description: Duration of the time slot in minutes . Min: `5` | required: true param name: excludeReservationId | type: excludeReservationId | description: GUID of a reservation to ignore during the check. Use this when rescheduling a reservation to exclude it in its current state from the availability calculations. param name: partySize | type: partySize | description: Party size to check the restaurant's availability for. | required: true param name: reservationLocationId | type: reservationLocationId | description: GUID of the reservation location for which to check the time slot. | required: true Return type: CheckTimeSlotResponse - name: timeSlotAvailability | type: TimeSlotAvailability | description: Time slot availability - ONE-OF: - name: standardOptions | type: StandardOptions | description: Response for standard reservation. - name: tableCombinationAvailabilities | type: array | description: Table combinations and their availability information. - name: tableIds | type: array | description: IDs of the tables in the table combination. - name: tableCombinationConflicts | type: array | description: Conflicts that would be generated by attempting to accommodate the proposed reservation using the table combination. - enum: - UNKNOWN: Undefined conflict type. - RESERVED: One or more of the chosen tables are already reserved. - TOO_BIG: The party is too big for the selected table. - TOO_SMALL: The party is too small for the selected table. - OFFLINE_ONLY: The restaurant does not allow online reservations. - RESERVED_FOR_EXPERIENCE: The table is reserved for an active experience. - TABLE_NOT_IN_AREA: The table is not in the requested area. - name: reservationLocationConflicts | type: array | description: Reservation location conflicts that would occur by making a reservation for the specified party size in the specified time slot. - enum: - UNKNOWN: Undefined reservation location conflict type. - PARTY_PACING: The restaurant cannot accommodate a party of the given size according to party pacing settings. - SEAT_PACING: The required number of seats are unavailable according to seat pacing settings. - name: experienceBlockingConflicts | type: array | description: Experience blocking conflicts that would occur by making a standard reservation when an experience is active. - enum: - UNKNOWN: Undefined experience blocking conflict type. - BLOCKED_BY_EXPERIENCE: Standard reservations are blocked by an active experience schedule. - name: experienceOptions | type: ExperienceOptions | description: Response for a reservation that contains experience. - name: tableCombinationAvailabilities | type: array | description: Table combinations and their availability information. - name: tableIds | type: array | description: IDs of the tables in the table combination. - name: experienceTableCombinationConflicts | type: array | description: Conflicts that would be generated by attempting to accommodate the proposed reservation using the table combination. - enum: - UNKNOWN: Undefined conflict type. - RESERVED: One or more of the chosen tables are already reserved. - TOO_BIG: The party is too big for the selected table. - TOO_SMALL: The party is too small for the selected table. - OUTSIDE_EXPERIENCE_TABLE_LIST: The table or combination is not in the experience's specific table list. - name: experienceConflicts | type: array | description: Experience availability conflicts that would occur by making a reservation for the specified party size in the specified time slot. - enum: - UNKNOWN: Undefined reservation location conflict type. - MAXIMUM_NUMBER_OF_GUESTS: The number of guests exceeds the allowed limit. - name: timeSlotAvailabilityType | type: TimeSlotAvailabilityType | description: Type of availability. - enum: STANDARD, EXPERIENCE ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.reservations.TimeSlotsService.checkTimeSlot(reservationLocationId, options) Description: Checks a restaurant's availability to accommodate a reservation for a specified party size in a specified time slot. This endpoint returns availability information for the restaurant's table combinations, and flags any party pacing or seat pacing conflicts that the proposed reservation would cause. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: reservationLocationId, options.date, options.duration, options.partySize, options Method parameters: param name: options | type: CheckTimeSlotOptions none | required: true - name: date | type: Date | description: Date and time of the time slot to check. | required: true - name: duration | type: integer | description: Duration of the time slot in minutes . Min: `5` | required: true - name: partySize | type: integer | description: Party size to check the restaurant's availability for. | required: true - name: excludeReservationId | type: string | description: GUID of a reservation to ignore during the check. Use this when rescheduling a reservation to exclude it in its current state from the availability calculations. param name: reservationLocationId | type: string | description: GUID of the reservation location for which to check the time slot. | required: true Return type: PROMISE - name: timeSlotAvailability | type: TimeSlotAvailability | description: Time slot availability - ONE-OF: - name: standardOptions | type: StandardOptions | description: Response for standard reservation. - name: tableCombinationAvailabilities | type: array | description: Table combinations and their availability information. - name: tableIds | type: array | description: IDs of the tables in the table combination. - name: tableCombinationConflicts | type: array | description: Conflicts that would be generated by attempting to accommodate the proposed reservation using the table combination. - enum: - UNKNOWN: Undefined conflict type. - RESERVED: One or more of the chosen tables are already reserved. - TOO_BIG: The party is too big for the selected table. - TOO_SMALL: The party is too small for the selected table. - OFFLINE_ONLY: The restaurant does not allow online reservations. - RESERVED_FOR_EXPERIENCE: The table is reserved for an active experience. - TABLE_NOT_IN_AREA: The table is not in the requested area. - name: reservationLocationConflicts | type: array | description: Reservation location conflicts that would occur by making a reservation for the specified party size in the specified time slot. - enum: - UNKNOWN: Undefined reservation location conflict type. - PARTY_PACING: The restaurant cannot accommodate a party of the given size according to party pacing settings. - SEAT_PACING: The required number of seats are unavailable according to seat pacing settings. - name: experienceBlockingConflicts | type: array | description: Experience blocking conflicts that would occur by making a standard reservation when an experience is active. - enum: - UNKNOWN: Undefined experience blocking conflict type. - BLOCKED_BY_EXPERIENCE: Standard reservations are blocked by an active experience schedule. - name: experienceOptions | type: ExperienceOptions | description: Response for a reservation that contains experience. - name: tableCombinationAvailabilities | type: array | description: Table combinations and their availability information. - name: tableIds | type: array | description: IDs of the tables in the table combination. - name: experienceTableCombinationConflicts | type: array | description: Conflicts that would be generated by attempting to accommodate the proposed reservation using the table combination. - enum: - UNKNOWN: Undefined conflict type. - RESERVED: One or more of the chosen tables are already reserved. - TOO_BIG: The party is too big for the selected table. - TOO_SMALL: The party is too small for the selected table. - OUTSIDE_EXPERIENCE_TABLE_LIST: The table or combination is not in the experience's specific table list. - name: experienceConflicts | type: array | description: Experience availability conflicts that would occur by making a reservation for the specified party size in the specified time slot. - enum: - UNKNOWN: Undefined reservation location conflict type. - MAXIMUM_NUMBER_OF_GUESTS: The number of guests exceeds the allowed limit. - name: timeSlotAvailabilityType | type: TimeSlotAvailabilityType | description: Type of availability. - enum: STANDARD, EXPERIENCE ``` ### Examples ### checkTimeSlot ```javascript import { timeSlots } from '@wix/table-reservations'; async function checkTimeSlot(reservationLocationId,options) { const response = await timeSlots.checkTimeSlot(reservationLocationId,options); }; ``` ### checkTimeSlot (with elevated permissions) ```javascript import { timeSlots } from '@wix/table-reservations'; import { auth } from '@wix/essentials'; async function myCheckTimeSlotMethod(reservationLocationId,options) { const elevatedCheckTimeSlot = auth.elevate(timeSlots.checkTimeSlot); const response = await elevatedCheckTimeSlot(reservationLocationId,options); } ``` ### checkTimeSlot (self-hosted) Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md). ```javascript import { createClient } from '@wix/sdk'; import { timeSlots } from '@wix/table-reservations'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { timeSlots }, // Include the auth strategy and host as relevant }); async function checkTimeSlot(reservationLocationId,options) { const response = await myWixClient.timeSlots.checkTimeSlot(reservationLocationId,options); }; ``` ---