Introduction

The Availability Exceptions API allows you to create and manage availability exceptions for restaurant operations. Availability exceptions are time periods during which the restaurant's Wix site can’t fulfill orders for the operation. An availability exception can block all fulfillment methods during the time period, or only specific fulfillment methods.

For example, you could use availability exceptions to:

  • Offer pickup only on Valentine's Day, by closing all delivery fulfillment methods on that day.
  • Close early on Wednesday, by closing all fulfillment methods after midday that day.
  • Close a restaurant over the summer by blocking all fulfillment methods for that date range.

With the Availability Exceptions API, you can create and manage availability exceptions.

Before you begin

It’s important to note the following points before starting to code:

  • In order to use this API, the Wix user must install the Wix Restaurants Orders (New) app.
  • Each availability exception object requires the operationID of a restaurant's operation.

Terminology

  • Operation: A distinct service that a restaurant offers. For example, a restaurant may offer a takeaway operation and a catering operation, where each one would work with different time frames, availabilities, and fees.
  • Fulfillment method: A method by which a restaurant can serve its customers their orders.
Did this help?

Availability Exceptions: Supported Filters and Sorting

The following table shows field support for filters and sorting for the availability exceptions object:

FieldSupported FiltersSortable
id$eq, $ne, $in, $nin, $startsWithSortable
createdDate$eq, $ne, $in, $nin, $startsWith, $lt, $lte, $gt, $gteSortable
updatedDate$eq, $ne, $in, $nin, $startsWith, $lt, $lte, $gt, $gteSortable
startTime$eq, $ne, $in, $nin, $startsWith, $lt, $lte, $gt, $gteSortable
endTime$eq, $ne, $in, $nin, $startsWith, $lt, $lte, $gt, $gteSortable
available$eq, $ne, $in, $nin
name$eq, $ne, $in, $nin, $startsWithSortable
affectedFulfillmentMethods.affectedMethods$eq, $ne, $in, min, $startsWith

Related content: API Query Language, Query Availability Exceptions

Did this help?

Availability Exception Object


Properties
idstringRead-onlyformat GUID

Availability exception ID.


revisionintegerRead-onlyformat int64

Revision number, which increments by 1 each time the availability exception is updated. To prevent conflicting changes, the current revision must be specified when updating the availability exception.


createdDatestringRead-onlyformat date-time

Date and time the availability exception was created in ISO-8601 format.


updatedDatestringRead-onlyformat date-time

Date and time the availability exception was last updated in ISO-8601 format.


startTimestringformat date-time

The start time of the availability exception in ISO-8601 format.


endTimestringformat date-time

The end time of the availability exception in ISO-8601 format.


availablebooleanRead-only

Whether the exception makes the [start_time, end_time] range available. If true, the exception makes the restaurant available for online ordering during the time range. If false, the exception makes the restaurant unavailable for ordering during the time range. Currently, only false is supported.


namestringmaxLength 500

Exception name.


affectedFulfillmentMethodsAffectedFulfillmentMethods

Fulfillment methods for which this exception applies.


operationIdstringformat GUID

ID of the restaurant operation this exception is associated with. (See the Restaurants Operations API for more information.)


extendedFieldsExtendedFields

Extended fields.

AvailabilityException
JSON
Did this help?