Get Products With Taste Option
Description
取得商品包含商品的口味或加值。
Resource
GET /v2/product/products_with_taste_option
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Query Parameters
| Name | Type | Description |
|---|---|---|
| store_id | string | 門市代碼 |
| language | string (enum) |
語系 ALLOWED VALUES:
|
| category_id | integer | 商品類別編號 (optional) |
| keyword | string | 關鍵字 (optional) |
| id | string | 商品代碼 (optional) |
| pickup_time | string | 取貨時間 EXAMPLE "2020-01-01 15:30:00" |
| model | string (enum) |
模式 ALLOWED VALUES:
(optional) |
Request Example
GET /v2/product/products_with_taste_option?store_id=0&id=IJSJB19
Response
{
"products": [
{
"is_combo": false,
"is_package": false,
"sale_start": null,
"sale_end": null,
"id": "DRINK00",
"title": "綠茶",
"translate_title": "green tea",
"memo": "",
"translate_memo": "",
"spec": "",
"translate_spec": "",
"unit": "PCS",
"translate_unit": "PCS",
"barcode": "",
"tax": 0.05,
"tax_sign": "TX",
"price": 20,
"enable": true,
"is_combo_item": false,
"is_float": false,
"can_get_points": false,
"can_redeemed": true,
"spend_points": 0,
"origin": "",
"element": "",
"caloric": "",
"description": null,
"translate_description": null,
"second_title": null,
"translate_second_title": null,
"abbreviated_title": null,
"translate_abbreviated_title": null,
"promotion_content": null,
"translate_promotion_content": null,
"description_url": null,
"spec_html": null,
"translate_spec_html": null,
"spec_url": null,
"EC_url": null,
"tags": null,
"app_product_name": null,
"introduction": null,
"translate_introduction": null,
"is_hidden": false,
"combo_price": null,
"package_price": null,
"is_stop_sale": false,
"brand": "",
"index": 1233,
"special_price": 90,
"type": "SIZE_MAIN_PRODUCT",
"position": 1,
"categories": [
{
"id": "12934",
"title": "飲料",
"translate_title": "drinks"
}
],
"img": null,
"tastes": [
{
"id": 1,
"title": "尺寸",
"translate_title": "size",
"is_mutually_exclusive": true,
"is_required": true,
"kind": "1",
"max_quantity": null,
"position": 1,
"items": [
{
"id": 1,
"title": "中杯",
"translate_title": "medium cup",
"price": 0,
"size_child_product_id": "DRINK01"
},
{
"id": 2,
"title": "大杯",
"translate_title": "big cup",
"price": 0,
"size_child_product_id": "DRINK02"
}
]
},
{
"id": 2,
"title": "加料",
"translate_title": "feed",
"is_mutually_exclusive": false,
"is_required": false,
"kind": "0",
"max_quantity": 2,
"position": 2,
"items": [
{
"id": 1,
"title": "椰果",
"translate_title": "Nata de coco",
"price": 0
},
{
"id": 2,
"title": "珍珠",
"translate_title": "pearl",
"price": 0
}
]
},
{
"id": 3,
"title": "甜度",
"translate_title": "sweetness",
"is_mutually_exclusive": true,
"is_required": true,
"kind": "0",
"max_quantity": null,
"position": 3,
"items": [
{
"id": 1,
"title": "微糖",
"translate_title": "micro sugar",
"price": 0
},
{
"id": 2,
"title": "半糖",
"translate_title": "half sugar",
"price": 0
}
],
"default": {
"id": 1,
"title": "微糖",
"translate_title": "micro sugar",
"price": 0
}
}
],
"size_child_products": [
{
"is_combo": false,
"is_package": false,
"sale_start": null,
"sale_end": null,
"id": "DRINK01",
"title": "中杯綠茶",
"translate_title": "medium cup green tea",
"memo": "",
"translate_memo": "",
"spec": "",
"translate_spec": "",
"unit": "PCS",
"translate_unit": "PCS",
"barcode": "",
"tax": 0.05,
"tax_sign": "TX",
"price": 20,
"enable": true,
"is_combo_item": false,
"is_float": false,
"can_get_points": false,
"can_redeemed": true,
"spend_points": 5,
"origin": "",
"element": "",
"caloric": "",
"description": null,
"translate_description": null,
"second_title": null,
"translate_second_title": null,
"abbreviated_title": null,
"translate_abbreviated_title": null,
"promotion_content": null,
"translate_promotion_content": null,
"description_url": null,
"spec_html": null,
"translate_spec_html": null,
"spec_url": null,
"EC_url": null,
"tags": null,
"app_product_name": null,
"introduction": null,
"translate_introduction": null,
"is_hidden": false,
"combo_price": null,
"package_price": null,
"is_stop_sale": false,
"brand": "",
"index": 1234,
"special_price": 90,
"size_type": "SIZE_CHILD_PRODUCT",
"categories": [
{
"id": "12934",
"title": "飲料",
"translate_title": "drinks"
}
],
"img": null,
"taste": [
{
"id": 2,
"title": "加料",
"translate_title": "feed",
"is_mutually_exclusive": false,
"is_required": false,
"kind": "0",
"max_quantity": 2,
"position": 1,
"items": [
{
"id": 1,
"title": "椰果",
"translate_title": "Nata de coco",
"price": 5
},
{
"id": 2,
"title": "珍珠",
"translate_title": "pearl",
"price": 5
}
]
},
{
"id": 3,
"title": "甜度",
"translate_title": "sweetness",
"is_mutually_exclusive": true,
"is_required": true,
"kind": "0",
"max_quantity": null,
"position": 2,
"items": [
{
"id": 1,
"title": "微糖",
"translate_title": "micro sugar",
"price": 0
},
{
"id": 2,
"title": "半糖",
"translate_title": "half sugar",
"price": 0
}
],
"default": {
"id": 1,
"title": "微糖",
"translate_title": "micro sugar",
"price": 0
}
}
]
},
{
"is_combo": false,
"is_package": false,
"sale_start": null,
"sale_end": null,
"id": "DRINK02",
"title": "大杯綠茶",
"translate_title": "mug of green tea",
"memo": "",
"translate_memo": "",
"spec": "",
"translate_spec": "",
"unit": "PCS",
"translate_unit": "PCS",
"barcode": "",
"tax": 0.05,
"tax_sign": "TX",
"price": 30,
"enable": true,
"is_combo_item": false,
"is_float": false,
"can_get_points": false,
"can_redeemed": true,
"spend_points": 10,
"origin": "",
"element": "",
"caloric": "",
"description": null,
"translate_description": null,
"second_title": null,
"translate_second_title": null,
"abbreviated_title": null,
"translate_abbreviated_title": null,
"promotion_content": null,
"translate_promotion_content": null,
"description_url": null,
"spec_html": null,
"translate_spec_html": null,
"spec_url": null,
"EC_url": null,
"tags": null,
"app_product_name": null,
"introduction": null,
"translate_introduction": null,
"is_hidden": false,
"combo_price": null,
"package_price": null,
"is_stop_sale": false,
"brand": "",
"index": 1235,
"special_price": 90,
"size_type": "SIZE_CHILD_PRODUCT",
"categories": [
{
"id": "12934",
"title": "飲料",
"translate_title": "drinks"
}
],
"img": null,
"taste": [
{
"id": 2,
"title": "加料",
"translate_title": "feed",
"is_mutually_exclusive": false,
"is_required": false,
"kind": "0",
"max_quantity": 2,
"position": 1,
"items": [
{
"id": 1,
"title": "椰果",
"translate_title": "Nata de coco",
"price": 10
},
{
"id": 2,
"title": "珍珠",
"translate_title": "pearl",
"price": 10
}
]
},
{
"id": 3,
"title": "甜度",
"translate_title": "sweetness",
"is_mutually_exclusive": true,
"is_required": true,
"kind": "0",
"max_quantity": null,
"position": 2,
"items": [
{
"id": 1,
"title": "微糖",
"translate_title": "micro sugar",
"price": 0
},
{
"id": 2,
"title": "半糖",
"translate_title": "half sugar",
"price": 0
}
],
"default": {
"id": 1,
"title": "微糖",
"translate_title": "micro sugar",
"price": 0
}
}
]
}
],
"default_size_child_product_id": "DRINK01",
"single_price": 20.0,
"default_data_price": 0
}
]
}
Response Body Parameters
| Name | Type | Description |
|---|---|---|
| products | Product | 商品列表 |
Response Body Parameters - Product
| Name | Type | Description |
|---|---|---|
| id | string | 商品編號 |
| title | string | 商品名稱 |
| translate_title | string | 商品翻譯名稱 |
| english_title | string | 商品英文名稱 |
| second_title | string | 商品第二名稱 |
| translate_second_title | string | 商品第二翻譯名稱 |
| english_second_title | string | 商品第二英文名稱 |
| categories | Category | 商品類別 |
| sub_category | Sub_Category | 商品子類別 |
| memo | string | 商品備註 |
| translate_memo | string | 商品翻譯備註 |
| english_memo | string | 商品英文備註 |
| spec | string | 規格 |
| translate_spec | string | 規格翻譯名稱 |
| english_spec | string | 規格英文名稱 |
| unit | string | 單位 |
| translate_unit | string | 單位翻譯名稱 |
| english_unit | string | 單位英文名稱 |
| barcode | string | 條碼 |
| tax | integer | 稅額 |
| tax_sign | string | 稅別 |
| price | integer | 價格 |
| enable | Boolean | 啟用 |
| is_combo | Boolean | 是否為套餐 |
| is_package | Boolean | 是否為單品組合 |
| is_combo_item | Boolean | 是否為套餐子項目 |
| is_float | Boolean | 是否為浮動價 |
| is_stop_sale | Boolean | 是否為停售商品 |
| can_get_points | Boolean | 是否可累積點數 |
| can_redeemed | Boolean | 是否可用點數兌換 |
| spend_points | integer | 兌換所需點數 |
| combo_price | integer | 組合餐價格 |
| package_price | integer | 系列組合價格 |
| origin | string | 產地 |
| element | string | 成份 |
| caloric | string | 熱量 |
| img | string | 圖檔URL |
| description | string | 描述 |
| translate_description | string | 描述翻譯名稱 |
| english_description | string | 描述英文名稱 |
| description_url | string | 描述URL |
| special_price | string | 特價 |
| spec_html | string | 規格(HTML格式) |
| translate_spec_html | string | 規格(HTML格式)翻譯內容 |
| english_spec_html | string | 規格(HTML格式)英文內容 |
| introduction | string | 簡介 |
| translate_introduction | string | 翻譯簡介 |
| english_introduction | string | 英文簡介 |
| abbreviated_title | string | 商品簡稱 |
| translate_abbreviated_title | string | 商品翻譯簡稱 |
| english_abbreviated_title | string | 商品英文簡稱 |
| spec_url | string | 規格URL |
| promotion_content | string | 促銷內容 |
| translate_promotion_content | string | 促銷翻譯內容 |
| english_promotion_content | string | 促銷英文內容 |
| EC_url | string | EC官網URL |
| tags | string | 標籤 |
| brand | string | 品牌 |
| is_hidden | Boolean | 是否隱藏 |
| tastes | Taste | 口味/加值列表 |
| size_child_products | Product | 尺寸子商品列表 (optional) |
| default_size_child_product_id | string | 預設尺寸子商品編號 (optional) |
| type | string (enum) |
商品類型 ALLOWED VALUES:
|
| position | integer | 位置 |
| single_price | float | 單品金額(單品原價金額+預選加值金額) (optional) |
| default_data_price | float | 預設資料金額(預選品項金額+預選加值金額) (optional) |
Response Body Parameters - Category
| Name | Type | Description |
|---|---|---|
| id | string | 分類編號 |
| title | string | 分類名稱 |
Response Body Parameters - Sub Category
| Name | Type | Description |
|---|---|---|
| id | string | 子分類編號 |
| name | string | 子分類名稱 |
Response Body Parameters - Taste
| Name | Type | Description |
|---|---|---|
| id | int | 口味/加值編號 |
| title | string | 口味/加值名稱 |
| translate_title | string | 口味/加值翻譯名稱 |
| english_title | string | 口味/加值英文名稱 |
| is_mutually_exclusive | bool | 是否互斥 |
| kind | string | 口味/加值種類 |
| is_required | bool | 是否必填 |
| default | Item | 預設加值項目 |
| items | Item | 口味/加值項目 |
| max_quantity | integer | 最大加值數量 |
| position | integer | 加值排序 |
Response Body Parameters - Item
| Name | Type | Description |
|---|---|---|
| id | int | 口味/加值項目編號 |
| title | string | 口味/加值項目名稱 |
| translate_title | string | 口味/加值項目翻譯名稱 |
| english_title | string | 口味/加值項目英文名稱 |
| price | int | 口味/加值項目價格 |
| image_url | string | 口味/加值項目價格圖片URL |
| size_child_product_id | string | 尺寸子商品編號 (optional) |