PATCH

Update Operation


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

If you update part of the orderScheduling property, the whole object is overwritten, so you must include the entire object unless you are not updating orderScheduling at all.

Each time the operation is updated, revision increments by 1. The current revision must be passed when updating the operation. This ensures you're working with the latest operation 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-operations/v1/operations/{operation.id}

Path Params
operation.idstringRequired

Operation ID.

Body Params
operationOperationRequired

Operation to update.

Response Object
operationOperation

Updated operation.

Update an operation
Request
cURL
curl -X PATCH https://www.wixapis.com/restaurants-operations/v1/operations/48605ac5-53fc-49b4-96b2-87f7636f5ce0 \ -H 'Content-Type: application/json;charset=UTF-8' \ -H 'Authorization: <AUTH>' \ --data-raw '{ "operation": { "serviceFeeRuleIds": [], "fulfillmentIds": [], "id": "48605ac5-53fc-49b4-96b2-87f7636f5ce0", "revision": "5", "orderScheduling": { "type": "ASAP", "asapOptions": { "preparationTime": { "type": "TIME_RANGE", "timeRangeOptions": { "timeUnit": "MINUTES", "minDuration": 20, "maxDuration": 40 } }, "asapFutureHandlingType": "BUSINESS_DAYS_AHEAD_HANDLING", "businessDaysAheadHandlingOptions": { "daysCount": 0 } } } } }'
Response
JSON
{ "operation": { "id": "48605ac5-53fc-49b4-96b2-87f7636f5ce0", "revision": "6", "createdDate": "2023-11-27T06:51:54.146Z", "updatedDate": "2023-12-10T08:32:03.316Z", "name": "Asap operation", "enabled": true, "orderScheduling": { "type": "ASAP", "asapOptions": { "preparationTime": { "type": "TIME_RANGE", "timeRangeOptions": { "timeUnit": "MINUTES", "minDuration": 20, "maxDuration": 40 } }, "asapFutureHandlingType": "BUSINESS_DAYS_AHEAD_HANDLING", "businessDaysAheadHandlingOptions": { "daysCount": 0 } } }, "profileId": "ad6994d5-a1c5-476d-b39f-c78d3a5444cb", "default": true, "fulfillmentIds": [ "12590791-d0d9-418f-a226-a7dcfd37b507", "71831b22-a043-4998-a10d-01bf9f2472f2", "642dd960-ab45-4eac-ab64-de0ad2215fe0", "32e82c15-f518-44e3-800f-406f13f9bb2e" ], "serviceFeeRuleIds": [], "onlineOrderingStatus": "ENABLED" } }
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?