Recommendations Items
Description
根據參數資訊返回商品推薦清單
Resource
POST /v1/agent/recommendations_items
Authorization
採用 OAuth 2.0 Bearer Token,詳細使用流程請參考 Auth Login。
Request Body Parameters
| Name | Type | Description |
|---|---|---|
| store_id | str | 商店編號 |
| user_info | User Info | 用戶資訊,如年齡、性別等 (optional) |
| order_datetime | str | 目前訂單時間(optional) ,格式為 ISO8601 EX:2014-05-15 15:00:00 |
| selected_items | list[Product] | 目前已挑選的商品清單(購物車) (optional) |
| current_view | Product | 使用者目前正在瀏覽的商品(optional) |
| recommend_limit | int | 最多回傳的推薦商品數量(預設 10) (optional) |
| message | str | 用戶自然語言輸入 (optional) |
| language | str | 語系 (optional) ALLOWED VALUES:
|
Request Body Parameters User Info
| Name | Type | Description |
|---|---|---|
| age | int | 年齡 |
| sex | str | 性別
|
Request Body Parameters Product
| Name | Type | Description |
|---|---|---|
| category_id | string | 類別編號 (optional) |
| product_id | string | 商品編號 |
| quantity | int | 商品數量 |
Response Body Parameters
| Name | Type | Description |
|---|---|---|
| message | string | 訊息 (optional) |
| product | list[Product] | 推薦商品清單 |
Response Body Parameters Product
| Name | Type | Description |
|---|---|---|
| id | string | 商品編號 |
| title | string | 商品名稱 |
| categories | Category | 商品類別 |
| memo | string | 商品備註 |
| spec | string | 規格 |
| 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 | 描述 |
| description_url | string | 描述URL |
| special_price | string | 特價 |
| spec_html | string | 規格(HTML格式) |
| spec_url | string | 規格URL |
| 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 | 位置 |
| limitations | string | 限量商品資訊 (optional) |
| single_price | float | 單品金額(單品原價金額+預選加值金額) (optional) |
| default_data_price | float | 預設資料金額(預選品項金額+預選加值金額) (optional) |
Response Body Parameters Category
| Name | Type | Description |
|---|---|---|
| id | string | 分類編號 |
| title | string | 分類名稱 |
| position | integer | 位置 |
Response Body Parameters Taste
| Name | Type | Description |
|---|---|---|
| id | int | 口味/加值編號 |
| title | string | 口味/加值名稱 |
| is_mutually_exclusive | bool | 是否互斥 |
| kind | string | 口味/加值種類 |
| is_required | bool | 是否必填 |
| default | Item | 預設加值項目 |
| items | Item | 口味/加值項目 |
| max_quantity | integer | 最大加值數量 |
Response Body Parameters Item
| Name | Type | Description |
|---|---|---|
| id | int | 口味/加值項目編號 |
| title | string | 口味/加值項目名稱 |
| price | int | 口味/加值項目價格 |
| size_child_product_id | string | 尺寸子商品編號 (optional) |
Response Example
Status-Code: 200
{
"product": [
{
"is_combo": false,
"is_package": false,
"is_coupon": false,
"pos_dep_id": "BFW",
"dep_name": "小麥啤酒",
"sale_start": "00:00",
"sale_end": "23:59",
"position": 3.0,
"id": "BFWFA000D4",
"barcode": "",
"tax": 0.05,
"tax_sign": "TX",
"price": 0.0,
"enable": true,
"can_get_points": false,
"can_redeemed": false,
"spend_points": 0,
"pack_price_type": "PRODUCT",
"type": "GENERAL_PRODUCT",
"origin": "",
"element": "",
"caloric": "",
"spec_url": null,
"EC_url": null,
"tags": null,
"app_product_name": null,
"description_url": null,
"is_hidden": 0,
"ispickup": false,
"is_combo_item": false,
"is_float": false,
"title": "小麥啤酒",
"translate_title": "小麥啤酒",
"english_title": "",
"second_title": "",
"translate_second_title": "",
"english_second_title": "",
"memo": "",
"translate_memo": "",
"english_memo": "",
"spec": "",
"translate_spec": "",
"english_spec": "",
"unit": "2",
"translate_unit": "2",
"english_unit": "",
"description": null,
"translate_description": "",
"english_description": "",
"promotion_content": null,
"translate_promotion_content": "",
"english_promotion_content": "",
"spec_html": null,
"translate_spec_html": "",
"english_spec_html": "",
"introduction": null,
"translate_introduction": "",
"english_introduction": "",
"abbreviated_title": "",
"translate_abbreviated_title": "",
"english_abbreviated_title": "",
"combo_price": null,
"package_price": null,
"is_stop_sale": false,
"brand": "",
"gencods": null,
"member_discount_rate": null,
"special_price": null,
"categories": [
{
"id": "U13",
"title": "展場專用",
"position": 3.0
}
],
"sub_category": null,
"default_data_price": 0.0,
"img": null,
"tastes": [],
"single_price": 0.0
}
]
}
{
"message": "錯誤訊息"
}