This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Updates a discount. A discount can belong to a catalog, section, or dish. You can't create a discount that applies to a menu.
You can only call this method when authenticated as a Wix app or Wix user identity.
Discount ID.
ID of the catalog the discount belongs to.
Discount to update.
Updated discount.
curl -X PATCH \
'https://www.wixapis.com/restaurants/v3/catalogs/4d088f16-d341-44b2-ac69-ae8f3e8897fd/discounts/81c74699-cdb8-422f-87ff-b007a4d6d3b9' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>' \
--data-raw '{
"discount": {
"percentage": "12.00"
}
}'
{
"discount": {
"id": "81c74699-cdb8-422f-87ff-b007a4d6d3b9",
"name": "Pizza Discount",
"description": "Late Night Pizza Pickup Discount",
"active": true,
"percentage": "10.00",
"type": "OFF_ITEM",
"sectionIds": {
"values": ["e3993910-76ed-11ec-90d6-0242ac120003"]
},
"condition": {
"fulfillmentTypes": ["PICKUP_OR_DINE_IN"],
"platforms": ["SITE", "MOBILE_SITE"],
"availability": {
"periods": [
{
"openDay": "SUN",
"openTime": "22:00",
"closeDay": "SUN",
"closeTime": "23:30"
},
{
"openDay": "MON",
"openTime": "22:00",
"closeDay": "MON",
"closeTime": "23:30"
},
{
"openDay": "TUE",
"openTime": "22:00",
"closeDay": "TUE",
"closeTime": "23:30"
},
{
"openDay": "WED",
"openTime": "22:00",
"closeDay": "WED",
"closeTime": "23:30"
},
{
"openDay": "THU",
"openTime": "22:00",
"closeDay": "THU",
"closeTime": "23:30"
},
{
"openDay": "FRI",
"openTime": "22:00",
"closeDay": "FRI",
"closeTime": "23:30"
},
{
"openDay": "SAT",
"openTime": "22:00",
"closeDay": "SAT",
"closeTime": "23:30"
}
],
"specialHourPeriods": []
},
"minOrderPrice": {
"value": "0.00",
"currency": "USD"
}
}
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.