POST

Cancel Order


Developer Preview

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

Changes the order status to CANCELED.

Authentication

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

Permissions
Manage Bookings Services and Settings
Manage Orders
Manage Portfolio
Manage Restaurants - all permissions
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/restaurants/v3/orders/{id}/cancel

Path Params
idstringRequired

ID of the order to mark as CANCELED.

Body Params
messagestringmaxLength 1000

Message when canceling the order.

Response Object
orderOrder

Canceled order.

Cancel Order
Request
cURL
curl -X POST \ 'https://www.wixapis.com/restaurants/v3/orders/64783425355/cancel' \ -H 'Authorization: <AUTH>' \ --data-binary '{ "message": "Ordered wrong dish" }'
Response
JSON
{ "order": { "id": "64783425355", "createdDate": "2021-07-22T12:35:51.675Z", "updatedDate": "2021-07-07T10:39:46.994Z", "comment": "no need for cutlery", "currency": "USD", "status": "CANCELED", "lineItems": [ { "quantity": 5, "price": "2.00", "comment": null, "dishOptions": [ { "name": "Taco Options", "minChoices": 0, "maxChoices": 3, "type": "EXTRAS", "availableChoices": [ { "itemId": "2b5131cd-7872-4ee8-ae40-cb00c6dcaec1", "price": "1.00" }, { "itemId": "d5e1b8f4-f18e-4fba-8ef4-33ad632b6c40", "price": "1.50" }, { "itemId": "0f3fee4d-1b4a-4cfd-9c79-11a52e8e4024", "price": "1.50" } ], "defaultChoices": [], "selectedChoices": [ { "quantity": 1, "price": "1.50", "comment": null, "dishOptions": [], "catalogReference": { "catalogItemId": "d5e1b8f4-f18e-4fba-8ef4-33ad632b6c40", "catalogItemName": "Fried Beans", "catalogItemDescription": null, "catalogItemMedia": null } } ] } ], "catalogReference": { "catalogItemId": "81cddf94-dcad-4f0e-9c3c-7556e3dbd4d8", "catalogItemName": "Chicken Taco", "catalogItemDescription": "with fresh veggies and Roasted Tomato Salsa", "catalogItemMedia": "https://static.wixstatic.com/media/11062bA4cabfdc2652413d92990cfac29777cc~mv2.jpg" } } ], "discounts": [ { "catalogDiscountId": "bc697347-c180-494b-b68d-bc63ac63a84b", "appliedAmount": "15.00", "catalogDiscountType": "OFF_ORDER", "catalogDiscountName": "Sunday Order Discount" } ], "payments": [ { "type": "WIX_PAYMENTS", "amount": "10.00", "method": "offline", "providerTransactionId": "d9ef0f0c-e81a-4017-9d6a-977089eb411f" } ], "fulfillment": { "type": "DELIVERY", "promisedTime": "2021-04-22T11:20:52.171Z", "asap": true, "deliveryDetails": { "charge": "0.00", "address": { "formatted": "235 W 23rd St, New York, NY 10011, United States", "country": null, "city": "New York", "street": "West 23rd Street", "streetNumber": "235", "apt": "1", "floor": "3", "entrance": null, "zipCode": "10011-2302", "countryCode": "US", "onArrival": "UNSPECIFIED_ON_ARRIVAL_TYPE", "approximate": false, "comment": null, "location": { "latitude": 40.7448484, "longitude": -73.9967498 }, "addressLine2": null } } }, "customer": { "firstName": "John", "lastName": "Smith", "phone": "2075556300", "email": "john@example.com", "contactId": "8046df3c-7575-4098-a5ab-c91ad8f33c47" }, "totals": { "subtotal": "10.00", "total": "10.00", "delivery": null, "tax": null, "discount": null, "loyaltySavings": null, "quantity": 1, "tip": null }, "activities": [ { "timestamp": "2021-07-07T10:37:44.994Z", "message": "new" }, { "timestamp": "2021-07-07T10:39:46.994Z", "message": "canceled [ordered wrong dish]" } ], "channelInfo": { "type": "WEB" }, "coupon": null, "loyaltyInfo": null } }
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?