# 取得銷售頁資料 ## API介接網址 * 測試環境:https://test0.youbuy.tw/api.php * 正式環境:https://backend.youbuy.tw/api.php --- ## HTTPS 傳輸協定 * Content Type :application/x-www-form-urlencoded * HTTP Method :POST --- ## 取得銷售頁資訊(getAShopPage)傳入參數說明 | 參數 | 值 | 型態 | 說明 | | ------- | ------------ | ------ | ----------- | | Action | getAShopPage | String | 操作名稱 | | uid | 8L1TD | String | 5碼商店編號 | | version | 0 | Int | 版本代入0 | ## 取得銷售頁資訊(getAShopPage)回傳參數說明 | 參數 | 值 | 型態 | 說明 | | ----------------------- | -------------------- | ------ | -------------------------------- | | code | 1 | String | 回傳狀態 | | msg | getAShopPage success | String | 回傳訊息 | | official | 8L1TD | String | 官網頁 | | official_status | 1 | int | 官網狀態 | | agent_discussion | KCO3E | String | 代理資格頁 | | agent_discussion_status | 1 | Int | 代理資格頁狀態 | | memberPage | 90SUM | String | 會員點數頁 | | member_status | 0 | Int | 會員點數頁狀態 | | include_time | 0.0099 | String | 查詢時間 | | load_process_time | 0.0274 | String | 回傳總時間 | | **info | { ... } | Object | 細節資料,請參考下方info參數說明 | ### info參數說明 | 參數 | 值 | 型態 | 說明 | | --------------------- | ------------------- | ------ | ------------------------------------ | | id | 54 | Int | 銷售頁編號 | | vendor_id | 1 | Int | 商店編號 | | uid | 8L1TD | String | 銷售頁5碼編號 | | page_width | 0 | Int | 網頁版寬度 | | page_color | #ffffff | String | 網頁版顏色 | | bg_color | #ffffff | String | 網頁版底色 | | in_office | 1 | Int | 官網內頁 | | name | 測試官網 | String | 銷售頁名稱 | | sub_domain | kobe777 | String | 子網域名稱 | | agent_discussion | KCO3E | String | 代理資格頁 | | memberPage | 90SUM | String | 會員點數頁 | | status | open | String | 頁面狀態 | | box_size | [] | Array | 出貨使用的箱子 | | track_lock | 0 | Int | 天網參數 | | lock_status | 0 | Int | 頁面鎖定 | | **json | json字串 | String | 銷售元件資訊,請參考下方json參數說明 | | version | 0 | Int | 頁面版本 | | agent_status | true | String | 代理功能狀態 | | payment_setting | json字串 | String | 付款資訊,請參考下方付款參數說明 | | transport_setting | json字串 | String | 配送資訊,請參考下方配送參數說明 | | stocking_day | 0 | Int | 訂單備貨天數 | | exclude_week | [] | String | 出貨排除日 | | start_shipping_date | null | String | 可出貨開始日期 | | end_shipping_date | null | String | 可出貨結束日期 | | delivery_day_service | false | String | 可否選擇預計出貨日 | | ship_date_status | false | String | 預計出貨日開關 | | days_after_stock_date | 7 | Int | 預計出貨可選擇範圍天數 | | assign_item | [] | Array | 指定商品才套用預計出貨日 | | assign_item_status | 0 | String | 指定商品開關 | | algorithm | 1 | Int | 是否使用裝箱演算法 | | print_day_before_ship | 0 | Int | 可提前列印出貨單的天數 | | invoice_setting | false | Boolen | 是否開啟電子發票 | | created_date | 2020-04-30 10:19:39 | String | 銷售頁創建日期 | | updated_date | 2023-03-25 16:26:53 | String | 銷售頁更新日期 | | versionList | [] | Array | 天網版本 | ### json參數說明 (銷售元件陣列資訊) 此參數為json字串,需要先透過json decode轉為Array,裏頭的參數內容如下 ### 銷售元件列表 | category | name | 說明 | | --------- | ------------------ | -------------- | | Header | 商標加超連結 | 頁首元件 | | Image | 大圖 | 圖片元件 | | Image | 多圖排列 | 圖片元件 | | Image | 輪播圖 | 圖片元件 | | Product | 一欄式產品列表 | 商品元件 | | Product | 一欄式產品+modal | 商品元件 | | Product | 一欄式modal | 商品元件 | | Product | 縮圖多欄式產品列表 | 商品元件 | | Product | 多欄式產品列表 | 商品元件 | | Product | 任選商品 | 商品元件 | | Product | 標籤式商品 | 商品元件 | | Product | 排序式產品列表 | 商品元件 | | Text | 文章文字 | 文字元件 | | Video | youtube 影片 | 影片元件 | | Video | 影片 | 影片元件 | | Footer | 頁尾加超連結 | 頁尾元件 | | Footer | 頁尾加結帳 | 頁尾元件 | | buybutton | 結帳元件 | 結帳按鈕 | | buybutton | 結帳元件圖片版 | 結帳按鈕 | | Float | 浮動按鈕列 | 右下方快捷列表 | | Top | 活動倒數 | 置頂提醒 | | Top | 跑馬燈 | 置頂提醒 | | Member | 會員專區 | 會員按鈕 | | SETTIN | SEO | SEO資料 | | SETTIN | TRACK | 追蹤資料 | | SETTIN | receiptDescription | 結帳提醒 | ### 【元件】商標加超連結 | 參數 | 值 | 型態 | 說明 | | --------------- | ------------------------------------ | ------ | ------------ | | componentID | f75354ae-a1b8-4849-a463-7a8299ea7302 | String | 元件編號 | | id | 7 | Int | 元件index | | category | Header | Sting | 元件類別 | | name | 商標加超連結 | Sting | 元件名稱 | | **json | { ... } | Object | 元件內容 | | showSearchOrder | 0 | Int | 顯示訂單查詢 | | showSearch | 1 | Int | 顯示商品搜尋 | | BGcolor | #FFF | Sting | 頁首底色 | ### 【元件細節】商標加超連結內的json參數如下 | 參數 | 值 | 型態 | 說明 | | ---------------- | --------------------- | ------ | --------------------------- | | file_name | Images/nrSXW/4Qza.jpg | String | 電腦版Logo圖檔 | | file_name_mobile | Images/nrSXW/4Qza.jpg | String | 手機版Logo圖檔 | | file_name_link | | String | Logo圖檔上的超連結 | | agent_discussion | { ... } | Object | 沒用到 | | showSearchOrder | 0 | Int | 顯示查詢訂單 | | showSearch | 0 | Int | 顯示查詢商品 | | showCart | 0 | Int | 顯示購物車 | | BGcolor | #ffffff | String | 頁首底色 | | align | false | Boolen | 手機版nav下拉圖示靠左或靠右 | | **links | [] | Array | 存放nav的資料 | ### 【元件細節】商標加超連結內的json->links參數如下 | 參數 | 值 | 型態 | 說明 | | ------------------- | ------------------------------------ | ------ | ---------------------------------- | | id | a06a1a29-7711-4653-8d9e-d43b2ccc5ebf | String | nav的id | | href | X2G1H | String | 連結的官網內頁 | | text | 全部商品 | String | nav的顯示名稱 | | needIcon | false | Boolen | 沒用到 | | selectedThemifyIcon | | String | 沒用到 | | Menu | 2 | Int | nav的分類,0跟1是第一層,2是第二層 | | levelid | f1dc94e7-d06e-4433-b028-d7f738e4d7a2 | String | nav對應的上層id | ### 【元件】頁尾加超連結 | 參數 | 值 | 型態 | 說明 | | --------------- | ------------------------------------ | ------ | ------------ | | componentID | 58e459af-e70a-40b6-9fbd-f9e251d6e97e | String | 元件編號 | | id | 8 | Int | 元件index | | category | Footer | Sting | 元件類別 | | name | 頁尾加超連結 | Sting | 元件名稱 | | **json | { ... } | Object | 元件內容 | ### 【元件細節】頁尾加超連結內的json參數如下 | 參數 | 值 | 型態 | 說明 | | ---------------- | --------------------- | ------ | --------------------------- | | text | Copyright © Biotree all rights reserved. | String | 底部顯示文字 | | customer_link | | Object | 沒用到 | | card | true | Boolen | 是否顯示背景 | | BGcolor | #e9dfd9 | String | 頁尾底色 | | **links | [] | Array | 存放nav的資料 | ### 【元件細節】頁尾加超連結內的json->links參數如下 | 參數 | 值 | 型態 | 說明 | | ------------------- | ------------------------------------ | ------ | ---------------------------------- | | id | a06a1a29-7711-4653-8d9e-d43b2ccc5ebf | String | nav的id | | href | X2G1H | String | 連結的官網內頁 | | text | 全部商品 | String | nav的顯示名稱 | | needIcon | false | Boolen | 沒用到 | | selectedThemifyIcon | | String | 沒用到 | | Menu | 2 | Int | nav的分類,0跟1是第一層,2是第二層 | | levelid | f1dc94e7-d06e-4433-b028-d7f738e4d7a2 | String | nav對應的上層id | ### 【元件】大圖 | 參數 | 值 | 型態 | 說明 | | ----------- | ------------------------------------ | ------ | --------- | | componentID | bddc5559-16f5-453c-8859-6227825bb485 | String | 元件編號 | | id | 1 | Int | 元件index | | category | Image | Sting | 元件類別 | | name | 大圖 | Sting | 元件名稱 | | **json | { ... } | Object | 元件內容 | ### 【元件細節】大圖內的json參數如下 | 參數 | 值 | 型態 | 說明 | | --------- | --------------------- | ------ | -------------- | | file_name | Images/nrSXW/4mTV.jpg | String | 圖檔資料 | | iscrop | 0 | Int | 是否裁切 | | crop_file | | String | 裁切的圖檔資料 | ### 【元件】多圖排列 | 參數 | 值 | 型態 | 說明 | | ----------- | ------------------------------------ | ------ | --------- | | componentID | 92336064-cfb6-4e50-9faa-85da9d1910c7 | String | 元件編號 | | id | 38 | Int | 元件index | | category | Image | Sting | 元件類別 | | name | 多圖排列 | Sting | 元件名稱 | | **json | { ... } | Object | 元件內容 | ### 【元件細節】多圖排列內的json參數如下 | 參數 | 值 | 型態 | 說明 | | --------- | --------------------- | ------ | -------------- | | margin | 20 | Int | 圖片間距 | | justify | 0 | Int | 排列方式 | | **images | [] | Array | 圖檔陣列 | ### 【元件細節】多圖排列內的json->images參數如下 | 參數 | 值 | 型態 | 說明 | | --------- | ------------------------------------ | ------ | ---------------- | | id | 0c00dfff-719b-443c-9f5e-d1c75e0a4e5a | String | 圖片編號 | | file_name | Images/nrSXW/oG3C.webp | String | 圖檔資料 | | link | VFYLB | String | 連結的官網內頁 | | target | false | Boolen | 連結跳轉開分頁 | | hyper | true | Boolen | 是否有連結 | | newWeb | false | Boolen | 是否連結外部網站 | ### 【元件】輪播圖 | 參數 | 值 | 型態 | 說明 | | ----------- | ------------------------------------ | ------ | --------- | | componentID | 92336064-cfb6-4e50-9faa-85da9d1910c7 | String | 元件編號 | | id | 38 | Int | 元件index | | category | Image | Sting | 元件類別 | | name | 多圖排列 | Sting | 元件名稱 | | **json | { ... } | Object | 元件內容 | ### 【元件細節】輪播圖內的json參數如下 | 參數 | 值 | 型態 | 說明 | | --------- | --------------------- | ------ | -------------- | | **data | [] | Array | 圖檔陣列 | ### 【元件細節】輪播圖內的json->data參數如下 | 參數 | 值 | 型態 | 說明 | | ------ | --------------------- | ------ | -------------- | | image | Images/nrSXW/M8xc.jpg | Sting | 圖檔資料 | | link | VFYLB | String | 連結的官網內頁 | | sort | 0 | Int | 圖檔排序index | | target | false | Boolen | 連結跳轉開分頁 | ### 【元件】商品元件 | name | 商品數量 | | ----------- | ------------------------------------ | | 一欄式產品列表 | 1個 | | 一欄式產品+modal | 1個 | | 一欄式modal | 1個 | | 縮圖多欄式產品列表 | 多個 | | 多欄式產品列表 | 多個 | | 任選商品 | 多個 | | 標籤式商品 | 多個 | | 排序式產品列表 | 多個 | | 參數 | 值 | 型態 | 說明 | | ----------- | ------------------------------------ | ------ | --------- | | componentID | 2ba0953d-8e97-43ca-990b-c4dc7510cda5 | String | 元件編號 | | id | 4 | Int | 元件index | | category | Product | Sting | 元件類別 | | name | 一欄式產品列表 | Sting | 元件名稱 | | **json | { ... } | Object | 元件內容 | ### 【元件細節】商品內的json參數如下 | 參數 | 值 | 型態 | 說明 | | ---------- | ------------------------------------------------------------- | ----- | ------------ | | **data | [] | Array | 商品陣列,包含一個到多個商品 | | inputsales | ["原價","","優惠價",""] | Array | 顯示文字 | | colorinput | ["#929292","#929292","#707070","#EE4D68","#929292","#EE4D68"] | Array | 顯示文字顏色 | | textbond | ["bold","","bold","","bold","bold"] | Array | 顯示文字粗體 | | italic | ["","","","","",""] | Array | 顯示文字斜體 | | *clickadd | ["豪華商品組合$6666免運!",false,true] | Array | 一欄式modal才有 | ### 【元件細節】商品內的json->data參數如下 | 參數 | 值 | 型態 | 說明 | | ------------------- | ----------------------------------------- | ------ | -------------------------------------------------------- | | id | 1772 | Int | 商品id | | vendor_id | 1 | Int | 廠商id | | uid | jKxvA | String | 商品uid | | sku | B007 | String | 商品貨號 | | name | 好輕鬆 女神蔬果酵素飲品 (15包/盒) | String | 商品名稱 | | emphasis | | String | 加強文字 | | Exterior | | String | 後台專用 | | **Product_mix | [] | Array | 商品組成資訊 | | is_productmix | 0 | Int | 商品型態: 0單一、1組合、2任選、3點數 | | auto_update_mix | 1 | Int | 後台專用 | | Limit_num | 0 | Int | 單筆限制購買數量: 0不限制、大於0則限制 | | description | | String | 商品簡介 | | detailText | null | String | 商品細節 | | styleText | null | String | 商品規格 | | category | 保健相關 | String | 商品分類 | | main_image | ["Images/8Mfk2/uxWk.jpg"] | Array | 商品主圖(可多張) | | totalShip | 0 | Int | 後台專用 | | inventory_sum | 2142 | Int | 商品庫存量 | | **info | [] | Array | 商品詳細資訊 | | status | 1 | Int | 商品上下架: 0下架、1上架 | | created_date | 2021-06-25 | String | 商品創建日期 | | updated_date | | String | 商品更新日期 | | periodical_status | 0 | Int | 定期功能: 0關閉、1開啟 | | unit | M | String | 定期間隔單位: Y/M/D | | amount | 1 | Int | 定期間隔數量: ex.1個月 | | switch | {"plan": "false","subscription": "false"} | String | plan: 定期定額,subscription: 訂閱制 | | plan | ![](https://i.imgur.com/H3RPhjW.png) | Array | periodsNum: 持續時間,periods: 定期定額,stock: 一次付清 | | subscription | 800 | Int | 訂閱制價格 | | inventory_alert | 0 | Int | 後台專用 | | inventory_alert_day | 0 | Int | 後台專用 | | inventory_input_day | 0 | Int | 後台專用 | | shopInfo | [] | Array | 後台專用 | | *sort | 0 | Int | 多個商品排序用 | ### 【元件細節】商品內的json->data->Product_mix參數如下 當商品為單一商品時(is_productmix = 0),不須考慮 | 參數 | 值 | 型態 | 說明 | | ------------------------ | ----------------- | ------ | ------ | | aproductselected | 好清楚 1盒 (60顆) | String | 沒用到 | | aproductspecificationkey | 0 | String | 沒用到 | | productNum | 3 | String | 沒用到 | | id | 276 | String | 沒用到 | | totalsum | 0 | Number | 沒用到 | 當商品為組合商品時(is_productmix = 1) | 參數 | 值 | 型態 | 說明 | | ------------------------ | ----------------- | ------ | ----------------- | | aproductselected | 好清楚 1盒 (60顆) | String | 組成商品名稱 | | aproductspecificationkey | 0 | String | 組成商品規格key值 | | productNum | 3 | String | 組成商品數量 | | id | 276 | String | 組成商品id | | totalsum | 0 | Number | 沒用到 | | pic | | String | 沒用到 | 當商品為任選商品時(is_productmix = 2) | 參數 | 值 | 型態 | 說明 | | ------------------------ | ------------------------------ | ------ | ------------------ | | aproductselected | 樂孅機能輕卡餐-濃醇可可 (10入) | String | 組成商品名稱 | | aproductspecificationkey | 0 | String | 組成商品規格key值 | | productNum | 3 | String | 此商品可任選的數量 | | id | 1614 | String | 組成商品id | | totalsum | 0 | Number | 組成商品庫存量 | | pic | Images/8Mfk2/njqg.jpg | String | 組成商品圖檔 | ### 【元件細節】商品內的json->data->info參數如下 | 參數 | 值 | 型態 | 說明 | | ------------- | --------------------- | ------ | ------------- | | key | 0 | String | 商品規格key值 | | price | 1480 | String | 原價 | | discount | 1080 | String | 特價 | | cost | 310 | String | 成本 | | picture | Images/8Mfk2/uxWk.jpg | String | 規格圖檔 | | specification | ["",""] | Array | 規格文字 | | inventory | 2142 | Number | 商品庫存 | | preorder | 0 | Number | 後台專用 | | point | NaN | String | 會員點數 | | notShip | 0 | Number | 後台專用 | | notShipList | [] | Array | 後台專用 | ### 【元件】文章文字 | 參數 | 值 | 型態 | 說明 | | ----------- | ------------------------------------ | ------ | --------- | | componentID | a68a88be-08da-4445-a5c9-a05a0d142e4d | String | 元件編號 | | id | 9 | Int | 元件index | | category | Text | Sting | 元件類別 | | name | 文章文字 | Sting | 元件名稱 | | **json | { ... } | Object | 元件內容 | ### 【元件細節】文章文字內的json參數如下 | 參數 | 值 | 型態 | 說明 | | -------- | ------------------------------------ | ------ | --------------------- | | text | ![](https://i.imgur.com/5jg6C48.png) | String | 文字內容 | | card | false | Boolen | 是否使用外框 | | BGcolor | #FFFFFF | String | 外框底色 | | useMap | true | Boolen | 是否使用google地圖 | | mapAlign | 1 | Int | 地圖排版:0靠左、1靠右 | | map | ![](https://i.imgur.com/1LeNTc0.png) | String | google地圖內嵌程式碼 | ### 【元件】youtube 影片 | 參數 | 值 | 型態 | 說明 | | ----------- | ------------------------------------ | ------ | --------- | | componentID | a68a88be-08da-4445-a5c9-a05a0d142e4d | String | 元件編號 | | id | 12 | Int | 元件index | | category | Video | Sting | 元件類別 | | name | youtube 影片 | Sting | 元件名稱 | | **json | { ... } | Object | 元件內容 | ### 【元件細節】youtube 影片內的json參數如下 | 參數 | 值 | 型態 | 說明 | | -------- | ------------------------------------ | ------ | --------------------- | | link | ![](https://i.imgur.com/s2ZARW4.png) | String | 影片連結 | ### 【元件】影片 | 參數 | 值 | 型態 | 說明 | | ----------- | ------------------------------------ | ------ | --------- | | componentID | a68a88be-08da-4445-a5c9-a05a0d142e4d | String | 元件編號 | | id | 35 | Int | 元件index | | category | Video | Sting | 元件類別 | | name | 影片 | Sting | 元件名稱 | | **json | { ... } | Object | 元件內容 | ### 【元件細節】youtube 影片內的json參數如下 | 參數 | 值 | 型態 | 說明 | | -------- | ----------------------------------------- | ------ | -------------- | | link | https://event.youbuy.tw/Video/1/SdIyv.mp4 | String | 影片連結 | | autoplay | 0 | Int | 自動播放 | | mute | 0 | Int | 聲音靜音 | | loop | 0 | Int | 循環播放 | | controls | 0 | Int | 顯示播放控制列 | ### 【元件】結帳元件 | 參數 | 值 | 型態 | 說明 | | ----------- | ------------------------------------ | ------ | --------- | | componentID | 5442681d-b3f8-4366-a5ff-0d02715fb316 | String | 元件編號 | | id | 21 | Int | 元件index | | category | buybutton | Sting | 元件類別 | | name | 結帳元件 | Sting | 元件名稱 | | json | ![](https://i.imgur.com/elLJ0GN.png) | Object | on: 沒用到,color: 文字顏色,BGcolor: 按鈕底色 | ### 【元件】結帳元件圖片版 | 參數 | 值 | 型態 | 說明 | | ----------- | ------------------------------------ | ------ | --------- | | componentID | 5442681d-b3f8-4366-a5ff-0d02715fb316 | String | 元件編號 | | id | 23 | Int | 元件index | | category | buybutton | Sting | 元件類別 | | name | 結帳元件圖片版 | Sting | 元件名稱 | | json | ![](https://i.imgur.com/htkFgW1.png) | Object | on: 沒用到,file_name: 圖片網址 | ### 付款參數說明 (payment_setting) 此參數為json字串,需要先透過json decode轉為Array,裏頭的參數內容如下 | 參數 | 值 | 型態 | 說明 | | -------- | --------------------------------------- | ------ | ------------ | | value | 取貨時付款 | String | 付款方式 | | name | 貨到付款 | String | 顯示名稱 | | note | | Sting | 備註 | | maxLimit | null | Int | 付款上限金額 | | charge | {"type":0,"percent":null,"number":null} | Object | 手續費 | | cost | {"type":0,"percent":null,"number":null} | Object | 成本 | ### 配送參數說明 (transport_setting) 此參數為json字串,需要先透過json decode轉為Array,裏頭的參數內容如下 | 參數 | 值 | 型態 | 說明 | | ---------------- | --------------------------------------------------------------------------- | ------ | -------------------------------------------------------------------------------- | | value | 宅配(台灣本島) | String | 配送方式 | | name | 宅配(台灣本島) | String | 顯示名稱 | | shippingName | HCT | Sting | 第三方物流名稱 | | fee | 60 | Int | 運費 | | cost | 0 | Int | 成本 | | transportCompany | | Sting | 第三方物流公司 | | disablePayment | ["取貨時付款","信用卡(分3期)","超商取貨時付款","信用卡(分6期)"] | Array | 禁用付款方式 | | showPayment | false | Boolen | 後台顯示用 | | country | [{"name":"香港","id":"13"},{"name":"新加坡","id":"6","fee":500,"cost":500}] | Array | 宅配(海外)才有,country的fee跟cost如果沒設定,則套用transport_setting的fee跟cost |