Update Addon Group Option
Update an option of an add-on group, including its pricing mode.
Authorization
API-TOKEN Your partner API key. Send it in the API-TOKEN header on every request.
In: header
Path Parameters
Header Parameters
API contract version to target. See the Changelog for what changed in each version.
"2.0.0""2.3.0" | "2.2.0" | "2.1.0" | "2.0.0"Request Body
application/json
Option name (English). Sending either name key keeps the at-least-one-language rule in force. Must not be greater than 191 characters.
Option name (Arabic). Sending either name key keeps the at-least-one-language rule in force. Must not be greater than 191 characters.
ADDITIONAL or ADDITIONAL_VARIABLE. A PERCENT option accepts ADDITIONAL only.
"ADDITIONAL" | "ADDITIONAL_VARIABLE"Calories the option adds. Must be at least 0.
Cost of the option, used to derive its profit. Must be at least 0.
Whether the price already carries tax. Must be false for PERCENT.
FREE, FIXED or PERCENT. Changing it discards the stored amount — resend the amount the new mode needs.
"FREE" | "FIXED" | "PERCENT"Charge of the option. Required when switching to FIXED on an ADDITIONAL option, prohibited for FREE and PERCENT. Must be at least 0.
Percentage of the selected variant charged for the option. Required when switching to PERCENT (greater than 0, up to 100), prohibited otherwise.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.flavours.sa/dev/api/v2/products/addon-groups/dolor/options/mollitia" \ -H "X-API-Version: 2.3.0" \ -H "Content-Type: application/json" \ -d '{ "includes": [ "praesentium" ] }'{
"meta": {
"code": 200,
"status": "success",
"message": "Add-on group option updated successfully."
},
"data": {
"id": 738792833567133,
"modifierable_id": "80e863e3-e1e0-45e6-8a57-2d3921aebc6a",
"name_en": "Extra Garlic Sauce",
"name_ar": "صلصة ثوم",
"type": "ADDITIONAL",
"calorie": 40,
"price": 0,
"tax": 0,
"total": 0,
"cost": 1,
"profit": 0,
"is_tax_included": false,
"deleted_at": null,
"barcode": null,
"weight_amount": null,
"weight_unit": null,
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"branch_id": null,
"modifierable_type": "PRODUCT_MODIFIER_ADDON_GROUP",
"stock": null,
"product_id": null,
"sku": null,
"price_mode": "PERCENT",
"price_value": 10,
"updated_at": null,
"barcode_img": null,
"ingredients": [],
"recipes": [],
"product": null
}
}{
"meta": {
"code": 401,
"status": "error",
"message": "Unauthenticated."
},
"data": null
}{
"meta": {
"code": 403,
"status": "error",
"message": "Unauthorized."
},
"data": null
}{
"meta": {
"code": 404,
"status": "error",
"message": "Resource not found."
},
"data": null
}{
"meta": {
"code": 500,
"status": "error",
"message": "Internal server error."
},
"data": null
}