ProductAddon group
Attach Addon Group
Attach an add-on group to a product, appended after the groups it already carries.
Authorization
API-TOKEN API-TOKEN<token>
Your partner API key. Send it in the API-TOKEN header on every request.
In: header
Path Parameters
productId*string
groupId*string
Query Parameters
includes*array<>
Header Parameters
X-API-Version*string
API contract version to target. See the Changelog for what changed in each version.
Default
"2.0.0"Value in
"2.3.0" | "2.2.0" | "2.1.0" | "2.0.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/similique/addon-groups/est?includes=sit" \ -H "X-API-Version: 2.3.0"{
"meta": {
"code": 200,
"status": "success",
"message": "Add-on group attached to the product successfully."
},
"data": {
"id": "f142f096-e96b-4190-81fe-1b2fea7d055d",
"market_id": "eef0da10-dd19-4a4c-ab3d-23dd1b548801",
"name_en": "Sauces",
"name_ar": "الصلصات",
"min_additionals": 0,
"max_additionals": 3,
"order": 1,
"created_at": 1792593343707,
"updated_at": 1792593343707,
"deleted_at": null,
"products_count": 1,
"options_count": 1,
"is_min_unsatisfiable": false,
"pivot": {
"product_id": "7c2939f2-bf43-4fbf-a399-8a3d2ca9b857",
"group_id": "f142f096-e96b-4190-81fe-1b2fea7d055d",
"order": 1,
"is_default": 0
},
"options": [
{
"id": 738792831837654,
"modifierable_id": "f142f096-e96b-4190-81fe-1b2fea7d055d",
"name_en": "Garlic Sauce",
"name_ar": "صلصة ثوم",
"type": "ADDITIONAL",
"calorie": null,
"price": 2,
"tax": 0,
"total": 2,
"cost": null,
"profit": null,
"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": "FIXED",
"price_value": null,
"updated_at": null,
"barcode_img": 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": 422,
"status": "error",
"message": "This group is already attached to the product."
},
"data": null
}{
"meta": {
"code": 500,
"status": "error",
"message": "Internal server error."
},
"data": null
}