# Modifier Options
# The Modifier Option Object
# Sample
{
"id": "8d207fc4",
"name": "Red Sauce",
"name_localized": null,
"costing_method": 1,
"price": 3,
"cost": 45,
"calories": 18,
"is_in_stock": true,
"is_active": true,
"sku": "M001",
"ingredients": [
{
"id": "8d207fc4",
"pivot": {
"quantity": 300
}
}
],
"branches": [
{
"id": "8d207fc4",
"pivot": {
"price": 4,
"is_active": false,
"is_in_stock": false
}
}
],
"tax_group": {
"id": "8f7abdbd"
},
"created_at": "2019-03-04 13:47:00",
"updated_at": "2019-03-04 13:47:00",
"deleted_at": null
}
# Attributes
| Field | Type | Rule | Description |
|---|---|---|---|
id | string | Unique identifier for the modifier option. | |
sku* | string | updatable | SKU of the modifier option. |
name* | string | updatable | Name of the modifier option. |
name_localized | string | nullable updatable | Localized name of the modifier option. |
is_active | boolean | updatable | True if the modifier option is available for selling. |
is_in_stock | boolean | updatable | Indicates if the modifier option is in stock |
costing_method* | integer | updatable | The Costing Method of the modifier option |
price* | double | updatable | The selling price of the modifier option. |
cost | double | updatable | The fixed cost of the modifier option. |
calories | double | updatable | Modifier option calories. |
modifier* | object | updatable includable | The Modifier that the modifier option belongs to. |
tax_group | object | updatable includable | The Tax Group attached to the modifier option. |
branches | array | updatable includable | List of Branches in which modifier option has custom attributes. |
ingredients | array | updatable includable | List of Inventory Items attached to the modifier option. |
index | integer | updatable | The modifier option index that is used for sorting |
created_at | string | Time at which the object was created in UTC. YYYY-MM-DD HH-MM-SS | |
updated_at | string | Time at which the object was updated in UTC. YYYY-MM-DD HH-MM-SS | |
deleted_at | string | nullable | Time at which the object was deleted in UTC. YYYY-MM-DD HH-MM-SS |
# Costing Methods
| Type | Description |
|---|---|
1 | Fixed Cost. |
2 | Calculate cost from ingredients. |
# List Modifier Options
GET /modifier_options
# Scope
general.read
# Filters
idnamename_localizedskumodifier_idtax_group_idis_activeupdated_afteris_deletedcreated_onupdated_ondeleted_on
# Response
{
"data": {
"id": "8f7ba750",
"name": "Hot Sauce",
"name_localized": null,
"sku": "sk-0002",
"is_active": true,
"costing_method": 2,
"price": 3,
"cost": null,
"calories": 18,
"created_at": "2019-12-29 09:41:48",
"updated_at": "2019-12-29 09:41:48",
"deleted_at": null,
"index": 0,
"modifier": {
"id": "8f7ba4c6",
"name": "Sauces"
},
"branches": [
{
"pivot": {
"price": 2,
"is_active": true,
"is_in_stock": true
},
"id": "8f7ab00a",
"name": "Branch 2"
}
],
"tax_group": {
"id": "8f7abdbd",
"name": "Tax Agency"
},
"ingredients": [
{
"pivot": {
"quantity": 100
},
"id": "8f7ba5c7",
"name": "Red Pepper"
}
]
}
}
# Create Modifier Option
POST /modifiers/{modifierId}/options
# Scope
menu.write
# Request
{
"name": "Hot Sauce",
"name_localized": null,
"costing_method": 1,
"price": 3,
"cost": 45,
"calories": 18,
"is_in_stock": true,
"is_active": true,
"sku": "M001",
"tax_group_id": "8d207fc3"
}
# Response
{
"data": {
"id": "8f7ba750",
"name": "Hot Sauce",
"name_localized": null,
"sku": "sk-0002",
"is_active": true,
"costing_method": 2,
"price": 3,
"cost": null,
"calories": 18,
"created_at": "2019-12-29 09:41:48",
"updated_at": "2019-12-29 09:41:48",
"deleted_at": null,
"index": 0,
"modifier": {
"id": "8f7ba4c6",
"name": "Sauces"
},
"branches": [
{
"pivot": {
"price": 2,
"is_active": true,
"is_in_stock": true
},
"id": "8f7ab00a",
"name": "Branch 2"
}
],
"tax_group": {
"id": "8f7abdbd",
"name": "Tax Agency"
},
"ingredients": [
{
"pivot": {
"quantity": 100
},
"id": "8f7ba5c7",
"name": "Red Pepper"
}
]
}
}
# Update Modifier Option
PUT /modifiers/{modifierId}/options/{optionId}
# Scope
menu.write
# Request
{
"name": "Hot Sauce",
"name_localized": null,
"costing_method": 1,
"price": 3,
"cost": 45,
"calories": 18,
"is_in_stock": true,
"is_active": true,
"sku": "M001",
"tax_group_id": "8f7abdbd"
}
# Response
{
"data": {
"id": "8f7ba750",
"name": "Hot Sauce",
"name_localized": null,
"sku": "sk-0002",
"is_active": true,
"costing_method": 2,
"price": 3,
"cost": null,
"calories": 18,
"created_at": "2019-12-29 09:41:48",
"updated_at": "2019-12-29 09:41:48",
"deleted_at": null,
"index": 0,
"modifier": {
"id": "8f7ba4c6",
"name": "Sauces"
},
"branches": [
{
"pivot": {
"price": 2,
"is_active": true,
"is_in_stock": true
},
"id": "8f7ab00a",
"name": "Branch 2"
}
],
"tax_group": {
"id": "8f7abdbd",
"name": "Tax Agency"
},
"ingredients": [
{
"pivot": {
"quantity": 100
},
"id": "8f7ba5c7",
"name": "Red Pepper"
}
]
}
}
# Delete Modifier Option
DELETE /modifiers/{modifierId}/options/{optionId}
# Scope
menu.write
The API will respond with 200 indicating that the modifier option has been deleted.
# Restore Modifier Option
PUT /modifiers/{modifierId}/options/{optionId}/restore
# Scope
admin.restore
The API will respond with 200 indicating that the modifier option has been restored.
# Attach Ingredient to Modifier Option
POST /modifiers/{modifierId}/options/{optionId}/ingredients/{ingredientItemId}
# Scope
menu.write
# Request
{
"quantity": 5
}
# Response
{
"data": {
"ingredients": [
{
"pivot": {
"quantity": 5
},
"id": "8d8691e7"
}
],
"id": "8d9ac477",
"name": "Hot Sauce",
"name_localized": null,
"sku": "M0101",
"is_active": true,
"is_in_stock": true,
"costing_method": 1,
"price": 3,
"cost": 45,
"calories": 18,
"created_at": "2019-05-04 08:30:06",
"updated_at": "2019-05-04 08:30:06",
"deleted_at": null
}
}
# Remove Ingredient from Modifier Option
DELETE /modifiers/{modifierId}/options/{optionId}/ingredients/{ingredientItemId}
# Scope
menu.write
# Attach Branch Attributes to Modifier Option
Some attributes can have special values in a specific branch or set of branches, you can define these attachments with the following request.
POST /modifiers/{modifierId}/options/{optionId}/branches/{branchId}
# Scope
menu.write
# Request
{
"price": 4,
"is_active": false,
"is_in_stock": false
}
# Response
{
"data": {
"branches": [
{
"pivot": {
"price": 4,
"is_active": false,
"is_in_stock": false
},
"id": "8d84b5d2-b8e2-4ff6-b75a-678be188e229",
"name": "B9",
"name_localized": null,
"reference": "B9",
"latitude": null,
"longitude": null,
"phone": null,
"opening_from": "00:00",
"opening_to": "00:00",
"inventory_end_of_day_time": "00:00",
"receipt_header": null,
"receipt_footer": null,
"created_at": "2019-04-23 09:20:56",
"updated_at": "2019-04-23 09:20:56",
"deleted_at": null
}
],
"id": "8d9ac477-1eff-4b44-a3bd-cc70c72f19fa",
"name": "One Side",
"name_localized": null,
"sku": "M0101",
"is_active": true,
"is_in_stock": true,
"costing_method": 1,
"price": 3,
"cost": 45,
"calories": 18,
"created_at": "2019-05-04 08:30:06",
"updated_at": "2019-05-04 08:30:06",
"deleted_at": null
}
}
# Remove Branch Attributes from Modifier Option
Some attributes can have special values in a specific branch or set of branches, you can remove these attachments with the following request.
DELETE /modifiers/{modifierId}/options/{optionId}/branches/{branchId}
# Scope
menu.write