List Addon Group Options
Page through every option of an add-on group, in the same id order the product list embeds them. The product list serves at most 100 options per group (addon_groups[].options, with options_count at X-API-Version >= 2.9.0); this is the overflow fetch for the rest. per_page is capped at 100.
Authorization
API-TOKEN Your partner API key. Send it in the API-TOKEN header on every request.
In: header
Path Parameters
Query Parameters
Must be at least 1.
Rows per page, 1 to 100. Defaults to 20. Must be at least 1. Must not be greater than 100.
Matches the option name (English or Arabic).
A product_modifiers column; prefix with - for descending. Ties and the default order fall back to id ascending, the same order the product list embeds.
A product_modifiers column to key the rows by instead of paginating.
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"Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://api.flavours.sa/dev/api/v2/products/addon-groups/autem/options?page=75&per_page=100&includes=voluptas" \ -H "X-API-Version: 2.3.0"{
"meta": {
"code": 200,
"status": "success",
"message": "Add-on group options retrieved successfully."
},
"data": {
"current_page": 1,
"data": [
{
"id": 738792832780060,
"modifierable_id": "4c4183d0-ce73-4e0f-ac68-9039575fff6c",
"name_en": "Garlic Sauce",
"name_ar": "صلصة ثوم",
"type": "ADDITIONAL",
"calorie": 40,
"price": 2,
"tax": 0,
"total": 2,
"cost": 1,
"profit": 1,
"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,
"ingredients": [],
"recipes": [],
"product": null
}
],
"first_page_url": "https://localhost:8000/api/v2/products/addon-groups/4c4183d0-ce73-4e0f-ac68-9039575fff6c/options?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https://localhost:8000/api/v2/products/addon-groups/4c4183d0-ce73-4e0f-ac68-9039575fff6c/options?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"page": null,
"active": false
},
{
"url": "https://localhost:8000/api/v2/products/addon-groups/4c4183d0-ce73-4e0f-ac68-9039575fff6c/options?page=1",
"label": "1",
"page": 1,
"active": true
},
{
"url": null,
"label": "Next »",
"page": null,
"active": false
}
],
"next_page_url": null,
"path": "https://localhost:8000/api/v2/products/addon-groups/4c4183d0-ce73-4e0f-ac68-9039575fff6c/options",
"per_page": 100,
"prev_page_url": null,
"to": 1,
"total": 1
}
}{
"meta": {
"code": 401,
"status": "error",
"message": "Unauthenticated."
},
"data": null
}{
"meta": {
"code": 403,
"status": "error",
"message": "Unauthorized."
},
"data": null
}{
"meta": {
"code": 404,
"status": "error",
"message": "Are you lost?"
},
"data": null
}{
"meta": {
"code": 500,
"status": "error",
"message": "Internal server error."
},
"data": null
}