# Groups
Menu group is a group of selected products, combos, and gift cards. Also, menu group can have a sub menu group
Menu groups allow the restaurant to create different menus for different purposes such as
- Different menu for different branches
- Dividing the menu, e.g. Breakfast Menu, Lunch Menu, and Dinner Menu
- Defining unique menu group to be used by certain third party app
# The Group Object
# Sample
{
"id": "8d161995",
"name": "Meals",
"name_localized": null,
"image": "https://lorempixel.com/image",
"items_index": [
"8f7bb4f5",
"8f7abbb1"
],
"created_at": "2019-02-27 09:43:00",
"updated_at": "2019-02-27 09:43:00",
"deleted_at": null,
"products": [
{
"id": "8f7bf14"
}
],
"combos": [
{
"id": "8f7bf14"
}
],
"subgroups": [
{
"id": "8f7bf14"
}
],
"gift_card_products": [
{
"id": "8f7bf14"
}
]
}
# Attributes
| Field | Type | Rule | Description |
|---|---|---|---|
id | string | Unique identifier for the group. | |
name* | string | updatable | Name of the group. |
name_localized | string | nullable updatable | Localized name of the group. |
image | string | nullable updatable | link for the group image. |
items_index | array | updatable | List of menu group items ids used for sorting purposes |
products | array | updatable includable | List of Products attached to the group and their attributes. |
combos | array | updatable includable | List of Combos attached to the group and their attributes. |
subgroups | array | updatable includable | List of Sub Groups attached to the group |
gift_card_products | array | updatable includable | List of Gift Card Products attached to the group and their attributes. |
created_at | string | sortable | Time YYYY-MM-DD HH-MM-SS in UTC at which the object was created. |
updated_at | string | sortable | Time YYYY-MM-DD HH-MM-SS in UTC at which the object was updated. |
deleted_at | string | nullable | Time YYYY-MM-DD HH-MM-SS in UTC at which the object was deleted. |
# List Groups
GET /groups
# Scope
general.read
# Filters
idnamename_localizedupdated_afteris_deletedcreated_onupdated_ondeleted_on
# Response
{
"data": [
{
"id": "8d161995",
"name": "Meals",
"name_localized": null,
"image": "https://lorempixel.com/image",
"items_index": [
"8f7bb4f5",
"8f7abbb1"
],
"created_at": "2019-02-27 09:43:00",
"updated_at": "2019-02-27 09:43:00",
"deleted_at": null,
"products": [
{
"id": "8f7bf14"
}
],
"combos": [
{
"id": "8f7bf14"
}
],
"subgroups": [
{
"id": "8f7bf14"
}
],
"gift_card_products": [
{
"id": "8f7bf14"
}
]
}
]
}
# Get Group
GET /groups/{groupId}
# Scope
general.read
# Response
{
"data": {
"id": "8d161995",
"name": "Meals",
"name_localized": null,
"image": "https://lorempixel.com/image",
"items_index": [
"8f7bb4f5",
"8f7abbb1"
],
"created_at": "2019-02-27 09:43:00",
"updated_at": "2019-02-27 09:43:00",
"deleted_at": null,
"products": [
{
"id": "8f7bf14"
}
],
"combos": [
{
"id": "8f7bf14"
}
],
"subgroups": [
{
"id": "8f7bf14"
}
],
"gift_card_products": [
{
"id": "8f7bf14"
}
]
}
}
# Create Group
POST /groups
# Scope
menu.write
# Request
{
"name": "Meals",
"name_localized": null,
"image": "https://lorempixel.com/image",
"is_active": true
}
# Response
{
"data": {
"id": "8d161995",
"name": "Meals",
"name_localized": null,
"image": "https://lorempixel.com/image",
"items_index": [
"8f7bb4f5",
"8f7abbb1"
],
"created_at": "2019-02-27 09:43:00",
"updated_at": "2019-02-27 09:43:00",
"deleted_at": null,
"products": [
{
"id": "8f7bf14"
}
],
"combos": [
{
"id": "8f7bf14"
}
],
"subgroups": [
{
"id": "8f7bf14"
}
],
"gift_card_products": [
{
"id": "8f7bf14"
}
]
}
}
# Update Group
PUT /groups/{groupId}
# Scope
menu.write
# Request
{
"name": "Meals",
"name_localized": null,
"image": "https://lorempixel.com/image",
"is_active": true
}
# Response
{
"data": {
"id": "8d161995",
"name": "Meals",
"name_localized": null,
"image": "https://lorempixel.com/image",
"items_index": [
"8f7bb4f5",
"8f7abbb1"
],
"created_at": "2019-02-27 09:43:00",
"updated_at": "2019-02-27 09:43:00",
"deleted_at": null,
"products": [
{
"id": "8f7bf14"
}
],
"combos": [
{
"id": "8f7bf14"
}
],
"subgroups": [
{
"id": "8f7bf14"
}
],
"gift_card_products": [
{
"id": "8f7bf14"
}
]
}
}
# Delete Group
DELETE /groups/{groupId}
# Scope
menu.write
The API will respond with 200 indicating that the menu group has been deleted.
# Restore Group
PUT /groups/{groupId}/restore
# Scope
admin.restore
The API will respond with 200 indicating that the menu group has been restored.