Create Addon Group
Add a reusable add-on group to the business library.
Authorization
API-TOKEN Your partner API key. Send it in the API-TOKEN header on every request.
In: header
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
Business the group belongs to. Auto-filled from the caller for a subscriber; required in the body for an admin acting on a business. Must match an existing stored value.
Group name (English). At least one of name_en / name_ar is required. This field is required when name_ar is not present. Must not be greater than 191 characters.
Group name (Arabic). At least one of name_en / name_ar is required. This field is required when name_en is not present. Must not be greater than 191 characters.
Minimum options a customer must pick from this group. Must be at least 0.
Maximum options a customer may pick from this group. Must be at least 1.
Sort position of the group inside the business library. Must be at least 0.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://api.flavours.sa/dev/api/v2/products/addon-groups" \ -H "X-API-Version: 2.3.0" \ -H "Content-Type: application/json" \ -d '{ "includes": [ "pariatur" ] }'{
"meta": {
"code": 200,
"status": "success",
"message": "Add-on group created successfully."
},
"data": {
"id": "ece3d61e-3de8-497d-ba30-dfc98a4188e8",
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"name_en": "Reiciendis nisi",
"name_ar": "الصلصات",
"min_additionals": 0,
"max_additionals": 3,
"order": 1,
"created_at": 1792593344311,
"updated_at": 1792593344311,
"deleted_at": null,
"products_count": 0,
"options": []
}
}{
"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": 422,
"status": "error",
"message": "Minimum selections cannot be greater than maximum selections. (and 1 more error)"
},
"data": [
{
"code": 0,
"message": "Minimum selections cannot be greater than maximum selections.",
"field": "min_additionals"
},
{
"code": 0,
"message": "Minimum selections cannot be greater than maximum selections.",
"field": "max_additionals"
}
]
}{
"meta": {
"code": 500,
"status": "error",
"message": "Internal server error."
},
"data": null
}