PATCH

Update 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.

Updates an availability exception.

Each time the availability exception is updated, revision increments by 1. The current revision must be passed when updating the availability exception. This ensures you're working with the latest availability exception and prevents unintended overwrites.

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
PATCH
https://www.wixapis.com/restaurants-availability-exceptions/v1/availability-exceptions/{availabilityException.id}

Path Params
availabilityException.idstringRequired

Availability exception ID.

Body Params
availabilityExceptionAvailabilityExceptionRequired

Availability exception to update.

Response Object
availabilityExceptionAvailabilityException

Updated availability exception.

Update an availability exception
Request
cURL
curl -X PATCH https://www.wixapis.com/restaurants-availability-exceptions/v1/availability-exceptions/48605ac5-53fc-49b4-96b2-87f7636f5ce0 \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'Authorization: <AUTH>' \ --data-raw '{ "availabilityException": { "id": "63eb0bf7-96ea-4034-822b-7dd9a24197e9", "revision": "1", "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", } }'
Response
JSON
"availabilityException": { "id": "63eb0bf7-96ea-4034-822b-7dd9a24197e9", "revision": "2", "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?