POST

Create Availability Exception


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates a new availability exception.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/restaurants-availability-exceptions/v1/availability-exceptions

Body Params
availabilityExceptionAvailabilityExceptionRequired

Availability exception details.

Response Object
availabilityExceptionAvailabilityException

The created availability exception.

Create an availability exception
Request
cURL
curl -X POST \ 'https://www.wixapis.com/restaurants-availability-exceptions/v1/availability-exceptions' \ -H 'Authorization: <AUTH>' \ -H 'Content-Type: application/json' \ --data-binary '{ "availabilityException": { "available": false, "name": "Passover", "affectedFulfillmentMethods": { "affectedMethods": "ALL_FULFILLMENT_METHODS" }, "operationId": "48605ac5-53fc-49b4-96b2-87f7636f5ce0", }'
Response
JSON
{ "availabilityException": { "id": "63eb0bf7-96ea-4034-822b-7dd9a24197e9", "revision": "1", "createdDate": "2024-07-09T10:17:08.865Z", "updatedDate": "2024-07-09T10:17:08.865Z", "startTime": "2024-07-08T21:00:00.587Z", "endTime": "2024-07-09T20:59:59.587Z", "available": false, "name": "Passover", "affectedFulfillmentMethods": { "affectedMethods": "ALL_FULFILLMENT_METHODS" }, "operationId": "48605ac5-53fc-49b4-96b2-87f7636f5ce0" } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Event TriggersThis method triggers the following events:
Did this help?