Create Menus
Description
建立多張菜單,不支援系列組合。
Resource
POST /manager/v1/product/menus
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Request Body Parameters
| Name | Type | Description |
|---|---|---|
| menus | list[Menu] | 菜單列表 |
Request Body Parameters - Menu
| Name | Type | Description |
|---|---|---|
| company_id | string | 公司編號 |
| shop_id | string | 門市編號 |
| platform_id | string | 平台編號 |
| menu_name | string | 菜單名稱 |
| menu_content | Menu Content | 菜單內容 |
| usage_period | list[string] | 菜單使用週期 ALLOWED VALUES:
|
| usage_begin_time | string | 菜單使用起始時間 |
| usage_end_time | string | 菜單使用結束時間 |
| menu_status | string | 菜單狀態 ALLOWED VALUES:
|
| sync_type | string | 菜單同步類型 ALLOWED VALUES:
|
| sync_date | string | 菜單同步時間 (option) |
| relate_id | string | 外部菜單關聯編號 (option) |
Request Body Parameters - Menu Content
| Name | Type | Description |
|---|---|---|
| category | Category[] | 商品類別 |
Request Body Parameters - Category
| Name | Type | Description |
|---|---|---|
| id | string | 全通路類別編號 |
| pos_dep_id | string | POS 類別編號 |
| name | string | 類別名稱 |
| image_url | string | 類別圖片 |
| position | integer | 排序編號 |
| display | boolean | 是否顯示(多菜單才能維護此參數) |
| products | Product[] | 商品列表 |
Request Body Parameters - Product
| Name | Type | Description |
|---|---|---|
| is_combo | boolean | 是否為套餐 |
| is_package | boolean | 是否為系列組合 |
| id | string | 商品編號 |
| name | string | 商品名稱 |
| price | float | 商品價格 |
| type | string (enum) |
商品類型 ALLOWED VALUES:
|
| description | string | 描述 |
| combo_price | float | 套餐價格,CWISE 不需傳此參數,由 OMNI 即時取得 |
| special_price | float | 特價價格,CWISE 不需傳此參數,由 OMNI 即時取得 |
| single_price | float | 單品金額(單品原價金額+預選加值金額),CWISE 不需傳此參數,由 OMNI 即時取得 (optional) |
| image_url | string | 商品圖片網址 |
| position | integer | 排序編號 |
| is_stop_sale | boolean | 是否停售,CWISE 不需傳此參數,由 OMNI 即時取得 |
| display | boolean | 是否顯示(多菜單才能維護此參數) |
| combos | Combo[] | 套餐內容 |
| packs | list | 此版本不支援系列組合,固定帶空陣列 [] |
| tastes | Taste[] | 加值列表 |
Request Body Parameters - Combo
| Name | Type | Description |
|---|---|---|
| id | int | 套餐商品編號 |
| name | string | 套餐商品名稱 |
| is_multiple_choice | boolean | 套餐是否多選 |
| control_quantity | boolean | 套餐控管數量 (若為多選才會判斷此參數) |
| group_name | string | 套餐群組名稱 |
| group_min_quantity | integer | 套餐群組最低可選數量 (若為多選才會判斷此參數) |
| group_max_quantity | integer | 套餐群組最高可選數量 (若為多選才會判斷此參數) |
| item_max_quantity | integer | 套餐品項最高可選數量 (若為多選才會判斷此參數) |
| display | boolean | 是否顯示(多菜單才能維護此參數) |
| items | Combo Item[] | 套餐項目 |
Request Body Parameters - Combo Item
| Name | Type | Description |
|---|---|---|
| id | string | 商品編號 |
| name | string | 商品名稱 |
| image_url | string | 圖片網址 |
| price | float | 商品價格 |
| quantity | integer | 商品數量 |
| is_default | boolean | 是否為預設商品 |
| is_stop_sale | boolean | 是否停售,CWISE 不需傳此參數,由 OMNI 即時取得 |
| display | boolean | 是否顯示(多菜單才能維護此參數) |
| tastes | Taste[] | 加值列表 |
Request Body Parameters - Taste
| Name | Type | Description |
|---|---|---|
| id | integer | 加值編號 |
| name | string | 加值名稱 |
| kind | string | 加值類型 ALLOWED VALUES:
|
| max_quantity | integer | 最大數量 |
| is_mutually_exclusive | boolean | 是否互斥 |
| is_required | boolean | 是否必填 |
| default_taste_item_id | integer | 預設加值項目編號 |
| display | boolean | 是否顯示(多菜單才能維護此參數) |
| items | Taste Item[] | 加值項目 |
Request Body Parameters - Taste Item
| Name | Type | Description |
|---|---|---|
| id | integer | 加值項目編號 |
| name | string | 加值項目名稱 |
| price | integer | 加值項目價格 |
| is_stop_sale | boolean | 是否停售,CWISE 不需傳此參數,由 OMNI 即時取得 |
| display | boolean | 是否顯示(多菜單才能維護此參數) |
Request Example
{
"menus": [
{
"company_id": "18090377",
"shop_id": "000030",
"platform_id": "001",
"platform_name": "UberEats",
"menu_name": "UberEats_全時段菜單",
"menu_content": {
"category": [
{
"id": "SARU",
"pos_dep_id": null,
"name": "阿銜專區",
"position": 0,
"display": true,
"products": [
{
"id": "BNA06",
"name": "台蕉5號(串)",
"price": 166,
"type": "GENERAL_PRODUCT",
"position": 9999,
"display": true,
"is_combo": false,
"is_package": false,
"combos": null,
"packs": null,
"tastes": null
}
]
},
{
"id": "TWT",
"pos_dep_id": null,
"name": "小菜套餐",
"position": 0,
"display": true,
"products": [
{
"id": "TWT2025121001",
"name": "庭瑋的小菜",
"price": 500,
"type": "GENERAL_PRODUCT",
"position": 9999,
"display": true,
"is_combo": true,
"is_package": false,
"combos": [
{
"id": 1,
"name": "群組1",
"is_multiple_choice": false,
"control_quantity": false,
"group_name": null,
"group_min_quantity": 0,
"group_max_quantity": 0,
"item_max_quantity": 0,
"display": true,
"items": [
{
"id": "UC02300001",
"name": "香滷鴨蛋",
"price": 0,
"display": true,
"tastes": [
{
"id": 1,
"name": "外帶",
"kind": "0",
"max_quantity": null,
"is_mutually_exclusive": true,
"is_required": false,
"default_taste_item_id": null,
"display": true,
"items": [
{
"id": 1,
"name": "內用",
"price": 0,
"display": true
},
{
"id": 2,
"name": "外帶",
"price": -5,
"display": true
}
]
},
{
"id": 5,
"name": "環保餐具",
"kind": "0",
"max_quantity": null,
"is_mutually_exclusive": false,
"is_required": false,
"default_taste_item_id": null,
"display": true,
"items": [
{
"id": 1,
"name": "自備餐具",
"price": -5,
"display": true
},
{
"id": 2,
"name": "環保餐具-主食分開裝",
"price": 0,
"display": true
},
{
"id": 3,
"name": "環保餐具-主食放一起",
"price": 0,
"display": true
}
]
},
{
"id": 20,
"name": "鴨蛋",
"kind": "0",
"max_quantity": null,
"is_mutually_exclusive": true,
"is_required": false,
"default_taste_item_id": null,
"display": true,
"items": [
{
"id": 1,
"name": "蛋放飯裡",
"price": 0,
"display": true
},
{
"id": 7,
"name": "蛋另外包",
"price": 0,
"display": true
}
]
}
]
}
]
},
{
"id": 2,
"name": "群組2",
"is_multiple_choice": false,
"control_quantity": false,
"group_name": null,
"group_min_quantity": 0,
"group_max_quantity": 0,
"item_max_quantity": 0,
"display": true,
"limitations": null,
"items": [
{
"id": "UC02300004",
"name": "香滷鴨蛋-D",
"price": 0,
"quantity": 1,
"is_default": false,
"display": true,
"tastes": [
{
"id": 1,
"name": "外帶",
"kind": "0",
"max_quantity": null,
"is_mutually_exclusive": true,
"is_required": false,
"default_taste_item_id": null,
"display": true,
"items": [
{
"id": 1,
"name": "內用",
"price": 0,
"display": true
},
{
"id": 2,
"name": "外帶",
"price": -5,
"display": true
}
]
},
{
"id": 5,
"name": "環保餐具",
"kind": "0",
"max_quantity": null,
"is_mutually_exclusive": false,
"is_required": false,
"default_taste_item_id": null,
"display": true,
"items": [
{
"id": 1,
"name": "自備餐具",
"price": -5,
"display": true
},
{
"id": 2,
"name": "環保餐具-主食分開裝",
"price": 0,
"display": true
},
{
"id": 3,
"name": "環保餐具-主食放一起",
"price": 0,
"display": true
}
]
},
{
"id": 20,
"name": "鴨蛋",
"kind": "0",
"max_quantity": null,
"is_mutually_exclusive": true,
"is_required": false,
"default_taste_item_id": null,
"display": true,
"items": [
{
"id": 1,
"name": "蛋放飯裡",
"price": 0,
"display": true
},
{
"id": 7,
"name": "蛋另外包",
"price": 0,
"display": true
}
]
}
]
}
]
},
{
"id": 3,
"name": "群組3",
"is_multiple_choice": false,
"control_quantity": false,
"group_name": null,
"group_min_quantity": 0,
"group_max_quantity": 0,
"item_max_quantity": 0,
"display": true,
"limitations": null,
"items": [
{
"id": "UC04100002",
"name": "香滷油豆腐",
"price": 0,
"quantity": 1,
"is_default": false,
"display": true,
"tastes": [
{
"id": 1,
"name": "外帶",
"kind": "0",
"max_quantity": null,
"is_mutually_exclusive": true,
"is_required": false,
"default_taste_item_id": null,
"display": true,
"items": [
{
"id": 1,
"name": "內用",
"price": 0,
"display": true
},
{
"id": 2,
"name": "外帶",
"price": -5,
"display": true
}
]
},
{
"id": 4,
"name": "切塊",
"kind": "0",
"max_quantity": null,
"is_mutually_exclusive": false,
"is_required": false,
"default_taste_item_id": null,
"display": true,
"items": [
{
"id": 1,
"name": "要切",
"price": 0,
"display": true
},
{
"id": 2,
"name": "切小塊",
"price": 0,
"display": true
}
]
},
{
"id": 5,
"name": "環保餐具",
"kind": "0",
"max_quantity": null,
"is_mutually_exclusive": false,
"is_required": false,
"default_taste_item_id": null,
"display": true,
"items": [
{
"id": 1,
"name": "自備餐具",
"price": -5,
"display": true
},
{
"id": 2,
"name": "環保餐具-主食分開裝",
"price": 0,
"display": true
},
{
"id": 3,
"name": "環保餐具-主食放一起",
"price": 0,
"display": true
}
]
}
]
}
]
},
{
"id": 4,
"name": "群組4",
"is_multiple_choice": false,
"control_quantity": false,
"group_name": null,
"group_min_quantity": 0,
"group_max_quantity": 0,
"item_max_quantity": 0,
"display": true,
"limitations": null,
"items": [
{
"id": "UC04100003",
"name": "香滷豆腐",
"price": 0,
"quantity": 1,
"is_default": false,
"display": true,
"tastes": [
{
"id": 1,
"name": "外帶",
"kind": "0",
"max_quantity": null,
"is_mutually_exclusive": true,
"is_required": false,
"default_taste_item_id": null,
"display": true,
"items": [
{
"id": 1,
"name": "內用",
"price": 0,
"display": true
},
{
"id": 2,
"name": "外帶",
"price": -5,
"display": true
}
]
},
{
"id": 5,
"name": "環保餐具",
"kind": "0",
"max_quantity": null,
"is_mutually_exclusive": false,
"is_required": false,
"default_taste_item_id": null,
"display": true,
"items": [
{
"id": 1,
"name": "自備餐具",
"price": -5,
"display": true
},
{
"id": 2,
"name": "環保餐具-主食分開裝",
"price": 0,
"display": true
},
{
"id": 3,
"name": "環保餐具-主食放一起",
"price": 0,
"display": true
}
]
},
{
"id": 23,
"name": "小菜",
"kind": "0",
"max_quantity": null,
"is_mutually_exclusive": true,
"is_required": false,
"default_taste_item_id": null,
"display": true,
"items": [
{
"id": 1,
"name": "不加蔥花",
"price": 0,
"display": true
}
]
}
]
}
]
}
],
"packs": null,
"tastes": null
}
]
}
]
},
"usage_period": [
"MON",
"TUE",
"WED",
"THU",
"FRI",
"SAT",
"SUN"
],
"usage_begin_time": "10:00",
"usage_end_time": "20:00",
"sync_type": "SCHEDULE",
"sync_date": "2024-09-18 05:00:00"
}
]
}
Response Example
Status-Code: 204 NO CONTENT