# URI-O 共用商機 API ###### tags: `bizAdd` > [name=RoyHuang] ------------------------------------------------------------------------ ## 清單 - 產業別代碼(catalog2、catalog4、catalog6),only 客製商機 - template data,只有 offer to sell 不使用 - Check email、Check password、Prepare password rule,only 新會員 - Check google recatpure 廢掉,client 驗值即可 No | API | Desc | 執行<br>順序 | 執行<br>條件 | 參考 :-:|--------------|------------------------------------------------------------------------------------|:------------:|----------------------------------------|-------------------------------------------------------------------------------------------------------------------------------- 1 | ~~URI-O-01~~ | [~~Prepare appellation data~~](#URI-O-01-Prepare-appellation-data) | 1 | page init | [URI-054](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A76),需擴充 2 | URI-O-02 | [Prepare quantity unit data](#URI-O-02-Prepare-quantity-unit-data) | 1 | page init | [URI-054](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A76),需擴充 3 | URI-O-03 | [Prepare country data](#URI-O-03-Prepare-country-data) | 1 | page init | [URI-054](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A76),需擴充,欄位多加上國碼 4 | URI-O-04 | [Prepare state data](#URI-O-04-Prepare-state-data) | None | when change coutnry list | [URI-054](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A76) 5 | URI-O-05 | [Prepare template data](#URI-O-05-Prepare-template-data) | 1 | page init(offer to sell 不使用) | 無 6 | URI-O-06 | [file upload](#URI-O-06-file-upload) | None | when upload file have data | [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) 7 | URI-O-07 | [Prepare password rule data](#URI-O-07-Prepare-password-rule-data) | 1 | only 新會員,page init when no login | 無 8 | URI-O-08 | [Check password rule](#URI-O-08-Check-password-rule) | None | only 新會員,when check | 無 9 | URI-O-09 | [Check email](#URI-O-09-Check-email) | None | only 新會員,when check | URI-G-01 10 | URI-O-10 | [Prepare login data](#URI-O-10-Prepare-login-data) | None | when login | 無 11 | URI-O-11 | [add business](#URI-O-11-add-business) | None | when submit | 無 12 | URI-O-12 | [Check business data](#URI-O-12-Check-business-data) | 1 | page init | 無 13 | URI-O-13 | [Prepare catalog2 code data](#URI-O-13-Prepare-catalog2-code-data) | 1 | only 客製商機 | [URI-049](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A70) 14 | URI-O-14 | [Prepare catalog4 code data](#URI-O-14-Prepare-catalog4-code-data) | None | only 客製商機,when click catalog2 list | [URI-049](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A70) 15 | URI-O-15 | [Prepare catalog6 code data](#URI-O-15-Prepare-catalog6-code-data) | None | only 客製商機,when click catalog4 list | [URI-049](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A70) 16 | URI-O-16 | [Prepare supplier typedata](#URI-O-16-Prepare-supplier-typedata) | 1 | page init | 無 17 | URI-O-17 | [Prepare language label tag](#URI-O-17-Prepare-language-label-tag) | 1 | page init | URI-A-02 18 | URI-O-18 | [Prepare Custom Header data](#URI-O-18-Prepare-Custom-Header-data) | 1 | only 客製商機,page init | 無 19 | URI-O-19 | [Search Suggestions data](#URI-O-19-Search-Suggestions-data) | None | only 客製商機 | 無 20 | URI-O-20 | [Serach Catalog or Suggestions data](#URI-O-20-Serach-Catalog-or-Suggestions-data) | None | only 客製商機 | 無 21 | URI-O-21 | [Get file data by id](#URI-O-21-Get-file-data-by-id) | None | when login | [URI-062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) 22 | URI-O-22 | [Get file data by url](#URI-O-22-Get-file-data-by-url) | None | only trade-inquiry, when init | [URI-062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) ------------------------------------------------------------------------ ## URI-O-01 Prepare appellation data - <div style="color:red">IBM 評估需求要hard code,故廢除(凌網併入URI054)</div> - 稱謂列表 - 參考 [URI-054](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A76),需擴充 ### URL - {TT-API網址}/codemetas/{ langId }/appellation - EX: https://tt-api.taiwantrade.com/codemetas/42/appellation ### INPUT 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ------------|----------|--------|:-------:|------------------- langId | 語系id | number | Y | 1.透過 header 取得<br>(目前頁面的語系)<br>2.整數,int type ### OUTPUT - 範例 ```json= { "exception" : null, "pagelabel" : "appellation", "label": [ { "name" : "Mr.", "value" : "412" }, { "name" : "Ms.", "value" : "988" }, { "name" : "Mrs.", "value" : "989" } ] } ``` ------------------------------------------------------------------------ ## URI-O-02 Prepare quantity unit data - quantity unit 列表 - 參考 [URI-054](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A76),需擴充 ### URL - {TT-API網址}/codemetas/{ langId }/quantity-unit - EX: https://tt-api.taiwantrade.com/codemetas/42/quantity-unit ### INPUT 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ------------|----------|--------|:-------:|------------------- langId | 語系id | number | Y | 1.透過 header 取得<br>(目前頁面的語系)<br>2.整數,int type ### OUTPUT - 範例 ```json= { "exception" : null, "pagelabel" : "quantity-unit", "label": [ { "code" : null, "name" : "Pieces", "value": "3086" "sort" : 1 }, { "code" : null, "name" : "Metric Tonnes", "value" : "3089" "sort" : 2 }, ... ] } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ------------|----------|--------|:-------:|------------------- exception | 例外 | string | N | NULL:正常 pageLabel | 頁面標籤 | string | N | 預設 quantity-unit label | 資料集合 | Array[Object] | N | [quantity info(Object)](#quantity-unit-info) #### quantity-unit-info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ------------|----------|--------|:-------:|------------------- code | 數量單位代碼 | string | N | name | 數量單位名稱 | string | N | 商機使用 value | 數量單位 id | string | N | 1.商機使用<br>2.實際為數字 sort | 數量單位排序 | number | N | 整數,int type ------------------------------------------------------------------------ ## URI-O-03 Prepare country data - 國家列表 - 參考 [URI-054](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A76),需擴充,欄位多加上國碼 ### URL - {TT-API網址}/codemetas/{ langId }/event-country - EX: https://tt-api.taiwantrade.com/codemetas/42/event-country ### INPUT 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ------------|----------|--------|:-------:|------------------- langId | 語系id | number | Y | 1.透過 header 取得<br>(目前頁面的語系)<br>2.整數,int type ### OUTPUT - 範例 ```json= { "exception" : null, "pagelabel" : "event-country", "label": [ { "code" : "country_af", "name" : "Afghanistan", "value" : "586", "sort" : 1, "telCode" : "93" }, { "code" : "country_al", "name" : "Albania", "value" : "692", "sort" : 2, "telCode" : "355" }, ... ] } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ------------|----------|--------|:-------:|------------------- exception | 例外 | string | N | NULL:正常 pageLabel | 頁面標籤 | string | N | 預設 event-country label | 資料集合 | Array[Object] | N | [quantity info(Object)](#country-info) #### country-info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ------------|----------|--------|:-------:|------------------- code | 國家代碼 | string | N | 商機使用 name | 國家名稱 | string | N | 商機使用 value | 國家id | string | N | (1).商機使用<br>(2).實際為數字 sort | 國家排序 | number | N | 整數,int type telCode | 電話國碼 | string| N | 商機使用 ------------------------------------------------------------------------ ## URI-O-04 Prepare state data - 州別清單 - 參考 [URI-054](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A76) ### URL - {TT-API網址}/codemetas/{langId}/user-country-state?parentCode={國家的 code} - EX: https://tt-api.taiwantrade.com/codemetas/42/user-country-state?parentCode=county_tw ### INPUT 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ------------|----------|--------|:-------:|------------------- langId | 語系id | number | Y | 1.透過 header 取得<br>(目前頁面的語系)<br>2.整數,int type countryCode | 國家代碼 | string | Y | 透過 [URI-O-03](#URI-O-03-Prepare-country-data) 的 code 取得 ### OUTPUT - 範例 - 台灣(county_tw) ```json= { "exception" : null, "pagelabel" : "user-country-state", "label": [ { "code": null, "name" : "Changhua County", "value" : "940", "sort": 1, }, { "code": null, "name" : "Chiayi City", "value" : "942", "sort": 2, }, ... ] } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ----------|--------|---------------|:--------:|---------------------------------- exception | 例外 | string | N | NULL:正常 pageLabel | 頁面標籤 | string | N | 預設 user-country-state label | 資料集合 | Array[Object] | N | [state info(Object)](#state-info) #### state-info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|----------|----------|:--------:|------------------ code | 洲/城市代碼 | string | N | name | 洲/城市名稱 | string | N | 商機使用 value | 洲/城市id | string | N | (1).商機使用<br>(2).實際為數字 sort | 洲/城市排序 | number | N | 整數,int type ------------------------------------------------------------------------ ## URI-O-05 Prepare template data - 範本清單 ### URL - {TT-API網址}/business/template - EX: https://tt-api.taiwantrade.com/business/template - method : GET - body : application/json;charset=UTF-8 - query : None - old path - { FRONT 網址 }/dataws/businessMessageTemplate/getFontMsgTemplate ### INPUT None ### OUTPUT ```json= { "code" : <number> , // 代碼,0:ok、 < 0: error 使用 "errorMsg" : <string> , // 錯誤訊息 "data" : { "prepareTemplateInfos" : [ { "templateName" : <string> , // 範本名稱 "templateContent" : <string> , // 範本內容 }, ... ] } } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|--------|----------|:--------:|------------------------------------------------ code | 代碼 | number | N | 0:ok、 < 0: error 使用 errorMsg | 錯誤訊息 | string | N | 代碼 < 0 時,會紀錄錯誤訊息 data | 資料集合 | Object | N | [prepareTemplateInfos](#prepare-template-infos) #### prepare-template-infos 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|--------|----------|:--------:|------------------------------------------------ prepareTemplateInfos | 範本資料集合 | Array[Object] | N | [範本清單(Object)](#範本清單) #### 範本清單 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ----------------|------|----------|:--------:|--- templateName | 範本名稱 | string | N | templateContent | 範本內容 | string | N | - 範例 ```json= { "code" : 0, "errorMsg" : "", "data" : { "prepareTemplateInfos" : [ { "templateName" : "Request price" "templateContent" : "Please send us your best price offer." }, { "templateName" : "Request a sample" "templateContent" : "Can you please send us a product sample?" }, ... ] } } ``` ### SQL [參考](https://hackmd.io/kQegnS_oTGCx5MN1LOVDFQ?view#Prepare-template-data) ------------------------------------------------------------------------ ## Check google recatpure - 參考 [Check google recatpure](https://hackmd.io/YCnus-yhQSiSuBTZ_VWgJg#Google-Recaptcha) ------------------------------------------------------------------------ ## URI-O-06 file upload - 檔案上傳 - <div style="color:red">直接 call API</div> - 需要先取得 dynamic key,在做上傳 - 資料儲存後,會紀錄暫存表 - 如果超過一定時間內,此附件未被商機使用,會定期去刪除這些垃圾附件 ### URL - {TT-API網址}/file/upload - EX: https://tt-api.taiwantrade.com/file/upload - method : POST - body : multipart/form-data - query : None ### INPUT - 一次一筆(效能考量) 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 -----------|-------------|---------|:------:|------------ dynamicKey | dynamic key | string | Y | 時效為5分,參考 [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) uploadFile | 上傳檔案 | file | Y | uploadType | 上傳檔案類型 | number | Y | 整數,int type。<br>1:暫存(商機使用)、2:真存擋(保留),預設1 ### OUTPUT ```json= { "code" : <number> , // 代碼,0:ok、 < 0: error 使用 "errorMsg" : <string> , // 錯誤訊息 "data" : { "fileUploadInfo" : { "id" : <number> , // 附件 id "name" : <string> , // 附件名稱 "fileByte" : <number> , // 附件容量byte "url" : <string> , // 附件url } } } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|----------|---------|:--------:|---------------- code | 代碼 | number | N | 0:ok、 < 0: error 使用 errorMsg | 錯誤訊息 | string | N | 代碼 < 0 時,會紀錄錯誤訊息 data | 資料集合 | Object | N | [上傳附件資訊](#上傳附件資訊) #### 上傳附件資訊 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------------|----------------|---------|:--------:|-------- fileUploadInfo | 上傳附件資料集合 | Object | N | [fileUploadInfo(Object)](#fileUpload-info) #### fileUpload-info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|-------------|----------|:--------:|------------------------------- id | 附件 id | number | N | 整數,long type<br>EX: 2147483647 name | 附件名稱 | string | N | fileByte | 附件容量 byte | number | N | 整數,long type<br>EX: 2147483647 url | 附件 url | string | N | - 範例 ```json= { "code" : 0, "errorMsg" : "", "data" : { "fileUploadInfo" : { "id" : 33070422, "name" : "販售型錄", "fileByte" : 13995, "url" : "https://im01.ttstaging.com.tw/5b175743-69d8-4efd-a427-45ea0af8f8c3/0546db0d-3ce8-4805-9fa6-6ca7b67392e5_33_201500014734_L-100x100.jpg", } } } ``` ------------------------------------------------------------------------ ## URI-O-07 Prepare password rule data - 會員註冊密碼規則 ### URL - {TT-API網址}/member/pwd/rule/{ langId } - EX: https://tt-api.taiwantrade.com/member/pwd/rule/42 - 非中文(41)或英文(42)時,預設給英文 - method : GET - body : application/json;charset=UTF-8 - query : None - old path - { FRONT 網址 }/register/passwordRule ### INPUT 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ---------|--------|----------|:--------:|--------------------------------------------- langId | 語系id | number | Y | 1.透過 header 取得<br>(目前頁面的語系)<br>2.整數,int type ### OUTPUT ```json= { "code" : <number> , // 代碼,0:ok、 < 0: error 使用 "errorMsg" : <string> , // 錯誤訊息 "data" : { "pwdRule" : <string> , // 密碼規則 } } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|--------|----------|:--------:|------------------------------------------------------- code | 代碼 | number | N | 0:ok、 < 0: error 使用 errorMsg | 錯誤訊息 | string | N | 代碼 < 0 時,會紀錄錯誤訊息 data | 資料集合 | Object | N | [preparePasswordRuleInfo](#prepare-password-rule-info) #### prepare-password-rule-info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ------------------------|--------------|----------|:--------:|------------------------------ preparePasswordRuleInfo | 密碼規則資料集合 | Object | N | [密碼規則info(Object)](#密碼規則info) #### 密碼規則info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|------|----------|:--------:|--- pwdRule | 密碼規則 | string | N | - 範例 ```json= { "code" : 0, "errorMsg" : "", "data" : { "preparePasswordRuleInfo" : { "pwdRule" : "Your password must be 5 to 30 characters long." } } } ``` ### SQL [參考](https://hackmd.io/kQegnS_oTGCx5MN1LOVDFQ?view#Prepare-password-rule-data) ------------------------------------------------------------------------ ## URI-O-08 Check password rule - 檢查會員密碼是否符合後台設定的規則 - 需要先取得 dynamic key(時效為5分) - 參考 [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) ### URL - {TT-API網址}/member/pwd/check - EX: https://tt-api.taiwantrade.com/member/pwd/check - method : POST - body : application/json;charset=UTF-8 - query : None - old path - { FRONT 網址 }/register/checkPasswordAvailable - 程式: - com.hyweb.tt.cms.cm.service.impl.UserServiceImpl.validatePassword(String account, String password) ### INPUT ```json= { "dynamicKey" : "31ec23d13ebceb222b5db85048966b9d", "email" : "abc@hyweb.com.tw", "password" : "123" } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 -----------|-------------|--------|:-------:|------------ dynamicKey | dynamic key | string | Y | 時效為5分,參考 [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) email | 會員email | string | Y | password | 會員密碼 | string | Y | ### OUTPUT ```json= { "code" : <number> , // 代碼,0:ok、 < 0: error 使用 "errorMsg" : <string> , // 錯誤訊息 "data" : {} } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|----------|--------|:------------:|------------------------------------------- code | 代碼 | number | N | 0:ok、 < 0: error 使用 errorMsg | 錯誤訊息 | string | N | 代碼 < 0 時,會紀錄錯誤訊息 data | 資料集合 | Object | Y | 預設,{} ### SQL [參考](https://hackmd.io/kQegnS_oTGCx5MN1LOVDFQ?view#Check-password-rule) ------------------------------------------------------------------------ ## URI-O-09 Check email - 檢查 email 是否有重覆使用 - email 格式(前後台都需驗證) - SSO + DB 驗證 - 同 [URI-G-01](https://hackmd.io/V7jRCMByS52JWAOpEZ72Vg) - old path - { FRONT 網址 }/register/checkEmail ### OUTPUT ```json= { "code" : <number> , // 代碼,0:ok、-1 : 代表Email已存在、 0: error 使用 "errorMsg" : <string> , // 錯誤訊息 "data" : {} } ``` ------------------------------------------------------------------------ ## URI-O-10 Prepare login data - 商機所需顯示的資料 - 需要先取得 dynamic key(時效為5分) ### URL - {TT-API網址}/business/login/{inquiry-product, inquiry-company, rfq, trade-inquiry, mso, mst, offer-to-sell, fav-product, fav-company} - EX - https://tt-api.taiwantrade.com/business/login/inquiry-product - https://tt-api.taiwantrade.com/business/login/inquiry-company - https://tt-api.taiwantrade.com/business/login/rfq - https://tt-api.taiwantrade.com/business/login/trade-inquiry - https://tt-api.taiwantrade.com/business/login/mso - https://tt-api.taiwantrade.com/business/login/mst - https://tt-api.taiwantrade.com/business/login/offer-to-sell - https://tt-api.taiwantrade.com/business/login/fav-product - https://tt-api.taiwantrade.com/business/login/fav-company - method : POST - body : application/json;charset=UTF-8 - 補: - <div style="color:red">AEM 透過 header service 取得 userAccessTicket</div> ### INPUT - 範例 ```json= { "dynamicKey" : "d35db44eada87cde1a6c9a35d083d703", "userAccessTicket" : "asdada4b1f8c6bc4d7b6caw163453628705de5fba9ddadasdqwe274a984f33c38ed144asdqwe274a8" } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 -----------------|--------------------|----------|:--------:|--- dynamicKey | dynamic key | string | Y | 時效為5分,參考 [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) userAccessTicket | 登入使用者的Ticket | string | Y | 透過 header 取得 ### OUTPUT ```json= { "code" : <number> , // 代碼,0:ok、 < 0: error 使用 "errorMsg" : <string> , // 錯誤訊息 "data" : { "prepareLoginInfo" : { "userCompanyId" : <number> , // 登入者公司id "companyName" : <string> , // 登入者公司名稱 "companyWebsite" : <string> , // 登入者公司網站 "officeAddress" : <string> , // 登入者公司地址 "officeNationCode" : <number> , // 登入者公司國別id "officeStateCode" : <number> , // 登入者公司州別id "officeOtherState" : <string> , // 登入者公司其他州別名稱 "officeTelCountry" : <number> , // 登入者公司電話國碼 "officeTel" : <string> , // 登入者公司電話 "officeTelExt" : <string> , // 登入者公司電話分機 "showBizEmailStatus" : <number> , // TT聯繫的供應商,顯示我的email。1:開放、0:關閉、-1:未設定 "userEmail" : <string> , // 登入者email "userId" : <number> , // 登入者id "userTitleCode" : <number> , // 登入者稱謂id "userName" : <string> , // 登入者名稱 "userMobileCountry" : <string> , // 登入者手機國碼 "userMobile" : <string> , // 登入者手機 } } } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|-----------|---------|:-------:|--------------- code | 代碼 | number | N | 0:ok、 < 0: error 使用 errorMsg | 錯誤訊息 | string | N |代碼 < 0 時,會紀錄錯誤訊息 data | 資料集合 | Object | N |[prepareLoginInfo](#prepare-login-info) #### prepare-login-info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 -----------------|----------|----------|:--------:|---------------------- prepareLoginInfo | 登入資料集合 | Object | N | [登入資訊(Object)](#登入資訊) #### 登入資訊 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 -----------------|----------|----------|:--------:|---------------------- userId | 登入者id | number | N |整數,long type<br>EX: 2147483647 userEmail | 登入者email | string | N | userName | 登入者名稱 | string | N | userTitleCode | 登入者性別id | number | Y / N | 整數,int type userCompanyId | 登入者公司id | number | N | 整數,long type<br>EX: 2147483647 companyName | 登入者公司名稱 | string | Y / N | officeNationCode | 登入者公司國別id | number | Y / N | 整數,int type officeStateCode | 登入者公司州別id | number | Y / N | (1).整數,int type<br>(2).officeStateCode和officeOtherState,是二擇一欄位 officeOtherState | 登入者公司其他州別名稱 | string | Y / N | (1).officeStateCode和officeOtherState,是二擇一欄位 officeAddress | 登入者公司地址 | string | Y / N | companyWebsite | 登入者公司網站 | string | Y / N | officeTelCountry | 登入者公司電話國碼 | number | Y / N | officeTel | 登入者公司電話 | string | Y / N | officeTelExt | 登入者公司電話分機 | string | Y / N | userMobileCountry | 登入者手機國碼 | string | Y / N | userMobile | 登入者手機 | string | Y / N | showBizEmailStatus | TT聯繫的供應商,顯示我的email | number | N | (1).整數,int type<br>(2).1:開放、0:關閉、-1:未設定 - <div style="color:red">上述資料為空值的原因,可能是資轉、舊資料(改版前就是選填)導致</div> - 範例 ```json= { "code" : 0, "errorMsg" : "", "data" : { "prepareLoginInfo" : { "userId" : -44, "userEmail" : "roy.huang@hyweb.com.tw", "userName" : "Roy-uat123", "userTitleCode" : 412, "userCompanyId" : 147927, "companyName" : "HYWEB TECHNOLOGY CO., LTD.", "officeNationCode" : 582, "officeStateCode" : 931, "officeOtherState" : "", "officeAddress" : "5F.-6, No.8, Taiyuan 1st St., Zhubei City, Hsinchu County 302, Taiwan (R.O.C.)", "companyWebsite" : "http://www.hyweb.com.tw", "officeTelCountry" : 886, "officeTel" : "23956966", "officeTelExt" : "2501", "userMobileCountry" : "886", "userMobile" : "886-0930550080", "showBizEmailStatus" : -1, } } } ``` ### SQL [參考](https://hackmd.io/kQegnS_oTGCx5MN1LOVDFQ?view#Prepare-login-data) ------------------------------------------------------------------------ ## URI-O-11 add business - 新增商機 - 需要先取得 dynamic key(時效為5分) - 參考 [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) - <div style="color:red">因SSO登入後,目前機制已經無法驗證是否為第三方登入,也就是說 ttLognumberype=2 此條件已廢除</div> ### URL - {TT-API網址}/business/add/{inquiry-company, inquiry-product, rfq, trade-inquiry, mso, mst, offer-to-sell, fav-product, fav-company} - EX - https://tt-api.taiwantrade.com/business/add/inquiry-company - https://tt-api.taiwantrade.com/business/add/inquiry-product - https://tt-api.taiwantrade.com/business/add/rfq - https://tt-api.taiwantrade.com/business/add/trade-inquiry - https://tt-api.taiwantrade.com/business/add/mso - https://tt-api.taiwantrade.com/business/add/mst - https://tt-api.taiwantrade.com/business/add/offer-to-sell - https://tt-api.taiwantrade.com/business/add/fav-product - https://tt-api.taiwantrade.com/business/add/fav-company - method : POST - body : application/json;charset=UTF-8 - query : 參考 ### INPUT #### inquiry-company 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ---------------------|-----------------|---------|:-------:|------------------ dynamicKey | dynamic key | string | Y | 時效為5分,參考 [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) ttLoginType | 登入狀態 | number | Y | (1).header 取得<br>(2).1: TT_USER(1)、2: SOCIAL_USER、4: REGISTER<br>(3).整數,int type domainId | domain id | number | Y | (1).header 取得<br>(2).整數,int type languageId | 語系id | number | Y | (1).header 取得(目前頁面的語系)<br>(2).整數,int type bizCompanyId | 公司id(下商機頁面的公司) | number | Y | (1).URL 取得<br>(2).整數,long type<br>EX: 2147483647 subject | 主旨 | string | Y | UI 操作取得 message | 訊息內容 | string | Y | UI 操作取得 userEmail | 使用者email | string | Y | UI 操作取得 userName | 使用者名稱 | string | Y | UI 操作取得 userPassword | 使用者密碼 | string | Y / N | (1).UI 操作取得<br>(2).ttLognumberype = 4 才必填 userTitleCode | 使用者title code | number | Y | (1).UI 操作取得<br>(2).整數,int type companyName | 公司名稱 | string | Y | UI 操作取得 officeNationCode | 公司國別代碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type officeStateCode | 公司洲別代碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type<br>(3).officeStateCode與officeOtherState至少填一個(二擇一) officeOtherState | 公司其他洲別 | string | Y / N | (1).UI 操作取得<br>(2).officeStateCode與officeOtherState至少填一個(二擇一) officeAddress | 公司地址 | string | Y / N | UI 操作取得 companyWebsite | 公司網址 | string | Y | UI 操作取得 recommendMatch | Recommend matching <br>suppliers if this <br>supplier doesn't <br>contact me within <br>2 working days | boolean | Y | UI 操作取得 showBizEmail | 是否顯示買主email | boolean | Y | UI 操作取得 quantity | 數量 | number | N |(1).UI 操作取得<br>(2).整數,int type quantityUnit | 數量單位代碼 | number | N | (1).UI 操作取得<br>(2).整數,int type purchaseAmount | 購買金額 | number | N | (1).UI 操作取得<br>(2).整數,int type officeTelCountryCode | 公司電話國碼 | number | N | (1).UI 操作取得<br>(2).整數,int type officeTel | 公司電話 | string | N | UI 操作取得 officeTelExt | 公司電話分機 | string | N | UI 操作取得 mobileCountry | 使用者手機國碼 | string | N | UI 操作取得 mobile | 使用者手機 | string | N | UI 操作取得 keywords | 商機關鍵字 | string | N | (1).UI 操作取得<br>(2).多組用逗號區隔 attachs | 商機附件id | string | N | (1).UI 操作取得<br>(2).至多3個 url | 下商機網址 | string | Y | server site 取得 ip | 下商機IP | string | Y | server site 取得 - 範例 - 登入 ```json= { "dynamicKey" : "8615d3f7e0918ecf768a9347b709460f", "ttLoginType" : 1, "domainId" : 2, "languageId" : 42, "bizCompanyId" : 65, "subject" : "test inquiry-company", "message" : "test inquiry-company", "userEmail" : "roy.huang@hyweb.com.tw", "userName" : "roy", "userPassword" : "", "userTitleCode" : 412, "companyName" : "HYWEB TECHNOLOGY CO., LTD.", "officeNationCode" : 582, "officeStateCode" : 931, "officeOtherState" : "", "officeAddress" : "5F.-6, No.8, Taiyuan 1st St., Zhubei City, Hsinchu County 302, Taiwan (R.O.C.)", "companyWebsite" : "http://www.hyweb.com.tw", "recommendMatch" : true, "showBizEmail" : false, "quantity" : 987654, "quantityUnit" : 1575, "purchaseAmount" : 999999, "officeTelCountryCode" : null, "officeTel" : null, "officeTelExt" : null, "mobileCountry" : null, "mobile" : null, "keywords" : "k1,k2,k3,k4,k9999", "attachs" : "1,2,3", "url" : "https://www.ttstaging.com.tw/company/147927", "ip" : "127.0.0.1" } ``` #### inquiry-product 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ---------------------|-----------------|---------|:-------:|------------------ dynamicKey | dynamic key | string | Y | 時效為5分,參考 [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) ttLoginType | 登入狀態 | number | Y | (1).header 取得<br>(2).1: TT_USER(1)、2: SOCIAL_USER、4: REGISTER<br>(3).整數,int type domainId | domain id | number | Y | (1).header 取得<br>(2).整數,int type languageId | 語系id | number | Y | (1).header 取得(目前頁面的語系)<br>(2).整數,int type productId | 型錄id | number | Y | (1).UI 操作取得<br>(2).整數,long type<br>EX: 2147483647 message | 訊息內容 | string | Y | UI 操作取得 userEmail | 使用者email | string | Y | UI 操作取得 userName | 使用者名稱 | string | Y | UI 操作取得 userPassword | 使用者密碼 | string | Y / N | (1).UI 操作取得<br>(2).ttLognumberype = 4 才必填 userTitleCode | 使用者title code | number | Y | (1).UI 操作取得<br>(2).整數,int type companyName | 公司名稱 | string | Y | UI 操作取得 officeNationCode | 公司國別代碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type officeStateCode | 公司洲別代碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type<br>(3).officeStateCode與officeOtherState至少填一個(二擇一) officeOtherState | 公司其他洲別 | string | Y / N | (1).UI 操作取得<br>(2).officeStateCode與officeOtherState至少填一個(二擇一) officeAddress | 公司地址 | string | Y | UI 操作取得 companyWebsite | 公司網址 | string | Y | UI 操作取得 recommendMatch | Recommend matching <br>suppliers if this <br>supplier doesn't <br>contact me within <br>2 working days | boolean | Y | UI 操作取得 showBizEmail | 是否顯示買主email | boolean | Y | UI 操作取得 quantity | 數量 | number | Y | (1).UI 操作取得<br>(2).整數,int type quantityUnit | 數量單位代碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type purchaseAmount | 購買金額 | number | Y | (1).UI 操作取得<br>(2).整數,int type officeTelCountryCode | 公司電話國碼 | number | N | (1).UI 操作取得<br>(2).整數,int type officeTel | 公司電話 | string | N | UI 操作取得 officeTelExt | 公司電話分機 | string | N | UI 操作取得 mobileCountry | 使用者手機國碼 | string | N | UI 操作取得 mobile | 使用者手機 | string | N | UI 操作取得 keywords | 商機關鍵字 | string | N | (1).UI 操作取得<br>(2).多組用逗號區隔 attachs | 商機附件id | string | N | (1).UI 操作取得<br>(2).至多3個 url | 下商機網址 | string | Y | server site 取得 ip | 下商機IP | string | Y | server site 取得 - 範例 - 登入 ```json= { "dynamicKey" : "8615d3f7e0918ecf768a9347b709460f", "ttLoginType" : 1, "domainId" : 2, "languageId" : 42, "productId" : 1896775, "message" : "test RFQ", "userEmail" : "roy.huang@hyweb.com.tw", "userName" : "roy", "userPassword" : "", "userTitleCode" : 412, "companyName" : "HYWEB TECHNOLOGY CO., LTD.", "officeNationCode" : 582, "officeStateCode" : 931, "officeOtherState" : "", "officeAddress" : "5F.-6, No.8, Taiyuan 1st St., Zhubei City, Hsinchu County 302, Taiwan (R.O.C.)", "companyWebsite" : "http://www.hyweb.com.tw", "recommendMatch" : true, "showBizEmail" : false, "quantity" : 987654, "quantityUnit" : 1575, "purchaseAmount" : 999999, "officeTelCountryCode" : null, "officeTel" : null, "officeTelExt" : null, "mobileCountry" : null, "mobile" : null, "keywords" : "k1,k2,k3,k4,k9999", "attachs" : "1,2,3", "url" : "https://www.ttstaging.com.tw/product/1896775", "ip" : "127.0.0.1" } ``` #### trade-inquiry 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ---------------------|-----------------|---------|:-------:|------------------ dynamicKey | dynamic key | string | Y | 時效為5分,參考 [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) ttLoginType | 登入狀態 | number | Y | (1).header 取得<br>(2).1: TT_USER(1)、2: SOCIAL_USER、4: REGISTER<br>(3).整數,int type domainId | domain id | number | Y | (1).header 取得<br>(2).整數,int type languageId | 語系id | number | Y | (1).header 取得(目前頁面的語系)<br>(2).整數,int type subject | 主旨 | string | Y | UI 操作取得 message | 訊息內容 | string | Y | UI 操作取得 userEmail | 使用者email | string | Y | UI 操作取得 userName | 使用者名稱 | string | Y | UI 操作取得 userPassword | 使用者密碼 | string | Y / N | (1).UI 操作取得<br>(2).ttLognumberype = 4 才必填 userTitleCode | 使用者title code | number | Y | (1).UI 操作取得<br>(2).整數,int type companyName | 公司名稱 | string | Y | UI 操作取得 officeNationCode | 公司國別代碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type officeStateCode | 公司洲別代碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type<br>(3).officeStateCode與officeOtherState至少填一個(二擇一) officeOtherState | 公司其他洲別 | string | Y / N | (1).UI 操作取得<br>(2).officeStateCode與officeOtherState至少填一個(二擇一) officeAddress | 公司地址 | string | Y | UI 操作取得 companyWebsite | 公司網址 | string | Y | UI 操作取得 quantity | 數量 | number | N | (1).UI 操作取得<br>(2).整數,int type quantityUnit | 數量單位代碼 | number | N | (1).UI 操作取得<br>(2).整數,int type purchaseAmount | 購買金額 | number | N | (1).UI 操作取得<br>(2).整數,int type officeTelCountryCode | 公司電話國碼 | number | N | (1).UI 操作取得<br>(2).整數,int type officeTel | 公司電話 | string | N | UI 操作取得 officeTelExt | 公司電話分機 | string | N | UI 操作取得 mobileCountry | 使用者手機國碼 | string | N | UI 操作取得 mobile | 使用者手機 | string | N | UI 操作取得 keywords | 商機關鍵字 | string | N | (1).UI 操作取得<br>(2).多組用逗號區隔 attachs | 商機附件id | string | N | (1).UI 操作取得<br>(2).至多3個 url | 下商機網址 | string | Y | server site 取得 ip | 下商機IP | string | Y | server site 取得 catalogId | 6 碼產業別 id | number | Y | (1).UI 操作取得<br>(2).整數,int type supplierTypes | 供應商類型 | string | Y | (1).UI 操作取得<br>(2).多筆用逗號區隔 expiryDate | 到期日期 | string | Y | (1).UI 操作取得<br>(2).YYYYMMDD<br>(3).時間最小是明天 - 範例 - 登入 ```json= { "dynamicKey" : "4296543e69524891fcdeff2ed60aa31d", "ttLoginType" : 1, "domainId" : 2, "languageId" : 42, "subject" : "test trade-inquiry", "message" : "test trade-inquiry", "userEmail" : "roy.huang@hyweb.com.tw", "userName" : "UAT-roy", "userPassword" : "", "userTitleCode" : 412, "companyName" : "HYWEB TECHNOLOGY CO., LTD.", "officeNationCode" : 582, "officeStateCode" : 931, "officeOtherState" : "", "officeAddress" : "5F.-6, No.8, Taiyuan 1st St., Zhubei City, Hsinchu County 302, Taiwan (R.O.C.)", "companyWebsite" : "http://www.hyweb.com.tw", "quantity" : null, "quantityUnit" : 1575, "purchaseAmount" : null, "officeTelCountryCode" : "886", "officeTel" : "23956966", "officeTelExt" : "2501", "mobileCountry" : null, "mobile" : null, "keywords" : null, "attachs" : null, "url" : "https://www.ttstaging.com.tw/business/TradeInquiry", "ip" : "127.0.0.1", "catalogId" : 1991, "supplierTypes" : "1667,1668,1669,1670", "expiryDate" : "20211231" } ``` #### mso 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ---------------------|-----------------|---------|:-------:|------------------ dynamicKey | dynamic key | string | Y | 時效為5分,參考 [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) ttLoginType | 登入狀態 | number | Y | (1).header 取得<br>(2).1: TT_USER(1)、2: SOCIAL_USER、4: REGISTER<br>(3).整數,int type domainId | domain id | number | Y | (1).header 取得<br>(2).整數,int type languageId | 語系id | number | Y | (1).header 取得(目前頁面的語系)<br>(2).整數,int type subject | 主旨 | string | Y | UI 操作取得 message | 訊息內容 | string | Y | UI 操作取得 userEmail | 使用者email | string | Y | UI 操作取得 userName | 使用者名稱 | string | Y | UI 操作取得 userPassword | 使用者密碼 | string | Y / N | (1).UI 操作取得<br>(2).ttLognumberype = 4 才必填 userTitleCode | 使用者title code | number | Y | (1).UI 操作取得<br>(2).整數,int type companyName | 公司名稱 | string | Y | UI 操作取得 officeNationCode | 公司國別代碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type officeStateCode | 公司洲別代碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type<br>(3).officeStateCode與officeOtherState至少填一個(二擇一) officeOtherState | 公司其他洲別 | string | Y / N | (1).UI 操作取得<br>(2).officeStateCode與officeOtherState至少填一個(二擇一) officeAddress | 公司地址 | string | Y | UI 操作取得 companyWebsite | 公司網址 | string | Y | UI 操作取得 quantity | 數量 | number | N | (1).UI 操作取得<br>(2).整數,int type quantityUnit | 數量單位代碼 | number | N | (1).UI 操作取得<br>(2).整數,int type purchaseAmount | 購買金額 | number | N | (1).UI 操作取得<br>(2).整數,int type officeTelCountryCode | 公司電話國碼 | number | N | (1).UI 操作取得<br>(2).整數,int type officeTel | 公司電話 | string | N | UI 操作取得 officeTelExt | 公司電話分機 | string | N | UI 操作取得 mobileCountry | 使用者手機國碼 | string | N | UI 操作取得 mobile | 使用者手機 | string | N | UI 操作取得 keywords | 商機關鍵字 | string | N | (1).UI 操作取得<br>(2).多組用逗號區隔 attachs | 商機附件id | string | N | (1).UI 操作取得<br>(2).至多3個 url | 下商機網址 | string | Y | server site 取得 ip | 下商機IP | string | Y | server site 取得 catalogId | 6 碼產業別 id | number | Y | (1).UI 操作取得<br>(2).整數,int type meetingDateBegin | meeting時間(起) | string | Y | (1).UI 操作取得<br>(2).YYYYMMDD<br>(3).時間最小是明天 meetingDateEnd | meeting時間(迄) | string | Y | (1).UI 操作取得<br>(2).YYYYMMDD<br>(3).時間最小是明天 hasMeetingPlace | 是否使用 online meeting at A TAITRA office | boolean | Y | UI 操作取得 hasUpdateSkype | 是否更新 skype 帳號 | boolean | Y | UI 操作取得 skypeAccount | skype 帳號 | string | Y / N | (1).透過 UI 操作<br>(2).hasUdateSkype=true 時,為必填 - 範例 - 登入 ```json= { "dynamicKey" : "a7fc8d6f6e2385522992e5ba59f64bed", "ttLoginType" : 1, "domainId" : 2, "languageId" : 42, "subject" : "test MSO", "message" : "test MSO", "userEmail" : "roy.huang@hyweb.com.tw", "userName" : "UAT-roy", "userPassword" : "", "userTitleCode" : 412, "companyName" : "HYWEB TECHNOLOGY CO., LTD.", "officeNationCode" : 582, "officeStateCode" : 931, "officeOtherState" : "", "officeAddress" : "5F.-6, No.8, Taiyuan 1st St., Zhubei City, Hsinchu County 302, Taiwan (R.O.C.)", "companyWebsite" : "http://www.hyweb.com.tw", "quantity" : null, "quantityUnit" : 1575, "purchaseAmount" : null, "officeTelCountryCode" : "886", "officeTel" : "23956966", "officeTelExt" : "2501", "mobileCountry" : null, "mobile" : null, "keywords" : null, "attachs" : null, "url" : "https://www.ttstaging.com.tw/business/MeetSupplierOnline", "ip" : "127.0.0.1", "catalogId" : 1991, "meetingDateBegin" : "20211231", "meetingDateEnd" : "20211231", "hasMeetingPlace" : true, "hasUpdateSkype" : false, "skypeAccount" : null } ``` #### mst 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ---------------------|-----------------|---------|:-------:|------------------ dynamicKey | dynamic key | string | Y | 時效為5分,參考 [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) ttLoginType | 登入狀態 | number | Y | (1).header 取得<br>(2).1: TT_USER(1)、2: SOCIAL_USER、4: REGISTER<br>(3).整數,int type domainId | domain id | number | Y | (1).header 取得<br>(2).整數,int type languageId | 語系id | number | Y | (1).header 取得(目前頁面的語系)<br>(2).整數,int type subject | 主旨 | string | Y | UI 操作取得 message | 訊息內容 | string | Y | UI 操作取得 userEmail | 使用者email | string | Y | UI 操作取得 userName | 使用者名稱 | string | Y | UI 操作取得 userPassword | 使用者密碼 | string | Y / N | (1).UI 操作取得<br>(2).ttLognumberype = 4 才必填 userTitleCode | 使用者title code | number | Y | (1).UI 操作取得<br>(2).整數,int type companyName | 公司名稱 | string | Y | UI 操作取得 officeNationCode | 公司國別代碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type officeStateCode | 公司洲別代碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type<br>(3).officeStateCode與officeOtherState至少填一個(二擇一) officeOtherState | 公司其他洲別 | string | Y / N | (1).UI 操作取得<br>(2).officeStateCode與officeOtherState至少填一個(二擇一) officeAddress | 公司地址 | string | Y | UI 操作取得 companyWebsite | 公司網址 | string | Y | UI 操作取得 quantity | 數量 | number | N | (1).UI 操作取得<br>(2).整數,int type quantityUnit | 數量單位代碼 | number | N | (1).UI 操作取得<br>(2).整數,int type purchaseAmount | 購買金額 | number | N | (1).UI 操作取得<br>(2).整數,int type officeTelCountryCode | 公司電話國碼 | number | N | (1).UI 操作取得<br>(2).整數,int type officeTel | 公司電話 | string | N | UI 操作取得 officeTelExt | 公司電話分機 | string | N | UI 操作取得 mobileCountry | 使用者手機國碼 | string | N | UI 操作取得 mobile | 使用者手機 | string | N | UI 操作取得 keywords | 商機關鍵字 | string | N | (1).UI 操作取得<br>(2).多組用逗號區隔 attachs | 商機附件id | string | N | (1).UI 操作取得<br>(2).至多3個 url | 下商機網址 | string | Y | server site 取得 ip | 下商機IP | string | Y | server site 取得 catalogId | 6 碼產業別 id | number | Y | (1).UI 操作取得<br>(2).整數,int type supplierTypes | 供應商類型 | string | Y | (1).UI 操作取得<br>(2).多筆用逗號區隔 expiryDate | 到期日期 | string | Y | (1).UI 操作取得<br>(2).YYYYMMDD<br>(3).時間最小是明天 meetingDateBegin | meeting時間(起) | string | Y | (1).UI 操作取得<br>(2).YYYYMMDD<br>(3).時間最小是明天 meetingDateEnd | meeting時間(迄) | string | Y | (1).UI 操作取得<br>(2).YYYYMMDD<br>(3).時間最小是明天 - 範例 - 登入 ```json= { "dynamicKey" : "4296543e69524891fcdeff2ed60aa31d", "ttLoginType" : 1, "domainId" : 2, "languageId" : 42, "subject" : "test MST", "message" : "test MST", "userEmail" : "roy.huang@hyweb.com.tw", "userName" : "UAT-roy", "userPassword" : "", "userTitleCode" : 412, "companyName" : "HYWEB TECHNOLOGY CO., LTD.", "officeNationCode" : 582, "officeStateCode" : 931, "officeOtherState" : "", "officeAddress" : "5F.-6, No.8, Taiyuan 1st St., Zhubei City, Hsinchu County 302, Taiwan (R.O.C.)", "companyWebsite" : "http://www.hyweb.com.tw", "quantity" : null, "quantityUnit" : 1575, "purchaseAmount" : null, "officeTelCountryCode" : "886", "officeTel" : "23956966", "officeTelExt" : "2501", "mobileCountry" : null, "mobile" : null, "keywords" : null, "attachs" : null, "url" : "https://www.ttstaging.com.tw/business/MeetSuppliernumberaiwan", "ip" : "127.0.0.1", "catalogId" : 1991, "supplierTypes" : "1667,1668,1669,1670", "expiryDate" : "20211231", "meetingDateBegin" : "20211231", "meetingDateEnd" : "20211231" } ``` #### offer-to-sell 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ---------------------|-----------------|---------|:-------:|------------------ dynamicKey | dynamic key | string | Y | 時效為5分,參考 [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) ttLoginType | 登入狀態 | number | Y | (1).header 取得<br>(2).1: TT_USER(1)、2: SOCIAL_USER<br>(3).整數,int type domainId | domain id | number | Y | (1).header 取得<br>(2).整數,int type languageId | 語系id | number | Y | (1).header 取得(目前頁面的語系)<br>(2).整數,int type subject | 主旨 | string | Y | UI 操作取得 message | 訊息內容 | string | Y | UI 操作取得 agentUserId | 待刊者id | number | Y | (1).UI 操作取得<br>(2).整數,long type<br>EX: 2147483647 userEmail | 使用者email | string | Y | UI 操作取得 userName | 使用者名稱 | string | Y | UI 操作取得 userTitleCode | 使用者title code | number | Y | (1).UI 操作取得<br>(2).整數,int type companyName | 公司名稱 | string | Y | UI 操作取得 officeNationCode | 公司國別代碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type companyWebsite | 公司網址 | string | Y | UI 操作取得 officeTelCountryCode | 公司電話國碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type officeTel | 公司電話 | string | Y | UI 操作取得 officeTelExt | 公司電話分機 | string | Y | UI 操作取得 attachs | 商機附件id | string | N | (1).UI 操作取得<br>(2).至多3個 url | 下商機網址 | string | Y | server site 取得 ip | 下商機IP | string | Y | server site 取得 catalogId | 6 碼產業別 id | number | Y | (1).UI 操作取得<br>(2).整數,int type expiryDate | 到期日期 | string | Y | (1).UI 操作取得<br>(2).YYYYMMDD<br>(3).時間最小是明天 - 範例 - 登入 ```json= { "dynamicKey" : "ead63e3e6dc64c4607a984967eb5eddc", "ttLognumberype" : 1, "domainId" : 2, "languageId" : 42, "subject" : "test offer to sell", "message" : "test offer to sell", "agentUserId" : -44, "userEmail" : "k3@hyweb.com.tw", "userName" : "UAT-k3", "userTitleCode" : 412, "companyName" : "test company name", "officeNationCode" : 582, "companyWebsite" : "http://www.hyweb.com.tw", "officeTelCountryCode" : "886", "officeTel" : "23956966", "officeTelExt" : null, "attachs" : null, "url" : "https://www.ttstaging.com.tw/business/TradingPost", "ip" : "127.0.0.1", "catalogId" : 1991, "supplierTypes" : "1667,1668,1669,1670", "expiryDate" : "20211231" } ``` #### fav-product - favSupplierInfo 規則 - (公司id + @@@ + 型錄Id + @@@ + 語系id + ###) * N組 - EX: - 65@@@1589605@@@42### - 65@@@1589605@@@42###65@@@123@@@41###65@@@123@@@41### - 65@@@1589605@@@42###65@@@123@@@41###147927@@@123@@@41### 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ---------------------|-----------------|---------|:-------:|------------------ dynamicKey | dynamic key | string | Y | 時效為5分,參考 [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) ttLoginType | 登入狀態 | number | Y | (1).header 取得<br>(2).1: TT_USER(1)、2: SOCIAL_USER、4: REGISTER<br>(3).整數,int type domainId | domain id | number | Y | (1).header 取得<br>(2).整數,int type languageId | 語系id | number | Y | (1).header 取得(目前頁面的語系)<br>(2).整數,int type favSupplierInfo | 供應商選擇產品清單的資料集合 | string | Y | (1). UI 操作取得<br>(2).(公司id + @@@ + 型錄Id + @@@ + 語系id + ###) * N組 (註:數字帶入,逗號區隔,不能有空白) message | 訊息內容 | string | Y | UI 操作取得 userEmail | 使用者email | string | Y | UI 操作取得 userName | 使用者名稱 | string | Y | UI 操作取得 userPassword | 使用者密碼 | string | Y / N | (1).UI 操作取得<br>(2).ttLognumberype = 4 才必填 userTitleCode | 使用者title code | number | Y | (1).UI 操作取得<br>(2).整數,int type companyName | 公司名稱 | string | Y | UI 操作取得 officeNationCode | 公司國別代碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type officeStateCode | 公司洲別代碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type<br>(3).officeStateCode與officeOtherState至少填一個(二擇一) officeOtherState | 公司其他洲別 | string | Y / N | (1).UI 操作取得<br>(2).officeStateCode與officeOtherState至少填一個(二擇一) officeAddress | 公司地址 | string | Y | UI 操作取得 companyWebsite | 公司網址 | string | Y | UI 操作取得 recommendMatch | Recommend matching <br>suppliers if this <br>supplier doesn't <br>contact me within <br>2 working days | boolean | Y | UI 操作取得 showBizEmail | 是否顯示買主email | boolean | Y | UI 操作取得 quantity | 數量 | number | N | (1).UI 操作取得<br>(2).整數,int type quantityUnit | 數量單位代碼 | number | N | (1).UI 操作取得<br>(2).整數,int type purchaseAmount | 購買金額 | number | N | (1).UI 操作取得<br>(2).整數,int type officeTelCountryCode | 公司電話國碼 | number | N | (1).UI 操作取得<br>(2).整數,int type officeTel | 公司電話 | string | N | UI 操作取得 officeTelExt | 公司電話分機 | string | N | UI 操作取得 mobileCountry | 使用者手機國碼 | string | N | UI 操作取得 mobile | 使用者手機 | string | N | UI 操作取得 keywords | 商機關鍵字 | string | N | (1).UI 操作取得<br>(2).多組用逗號區隔 attachs | 商機附件id | string | N | (1).UI 操作取得<br>(2).至多3個 url | 下商機網址 | string | Y | server site 取得 ip | 下商機IP | string | Y | server site 取得 - 範例 - 登入 ```json= { "dynamicKey" : "8615d3f7e0918ecf768a9347b709460f", "ttLoginType" : 1, "domainId" : 2, "languageId" : 42, "favSupplierInfo" : "65@@@1452595@@@42###147927@@@1895999@@@42###147927@@@1896775@@@42###", "message" : "test fav-product", "userEmail" : "roy.huang@hyweb.com.tw", "userName" : "roy", "userPassword" : "", "userTitleCode" : 412, "companyName" : "HYWEB TECHNOLOGY CO., LTD.", "officeNationCode" : 582, "officeStateCode" : 931, "officeOtherState" : "", "officeAddress" : "5F.-6, No.8, Taiyuan 1st St., Zhubei City, Hsinchu County 302, Taiwan (R.O.C.)", "companyWebsite" : "http://www.hyweb.com.tw", "recommendMatch" : true, "showBizEmail" : false, "quantity" : 987654, "quantityUnit" : 1575, "purchaseAmount" : 999999, "officeTelCountryCode" : null, "officeTel" : null, "officeTelExt" : null, "mobileCountry" : null, "mobile" : null, "keywords" : "k1,k2,k3,k4,k9999", "attachs" : "1,2,3", "url" : "https://www.ttstaging.com.tw/contact/PRODUCT?contactType=PRODUCT&productIds[1895999]=42&productIds[1452595]=42&productIds[1896775]=42", "ip" : "127.0.0.1" } ``` #### fav-company 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ---------------------|-----------------|---------|:-------:|------------------ dynamicKey | dynamic key | string | Y | 時效為5分,參考 [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) ttLoginType | 登入狀態 | number | Y | (1).header 取得<br>(2).1: TT_USER(1)、2: SOCIAL_USER、4: REGISTER<br>(3).整數,int type domainId | domain id | number | Y | (1).header 取得<br>(2).整數,int type languageId | 語系id | number | Y | (1).header 取得(目前頁面的語系)<br>(2).整數,int type favSuppliers | 供應商資料集合 | string | Y | (1).UI 操作取得<br>(2).數字帶入,多組逗號區隔,不能有空白 subject | 主旨 | string | Y | UI 操作取得 message | 訊息內容 | string | Y | UI 操作取得 userEmail | 使用者email | string | Y | UI 操作取得 userName | 使用者名稱 | string | Y | UI 操作取得 userPassword | 使用者密碼 | string | Y / N | (1).UI 操作取得<br>(2).ttLognumberype = 4 才必填 userTitleCode | 使用者title code | number | Y | (1).UI 操作取得<br>(2).整數,int type companyName | 公司名稱 | string | Y | UI 操作取得 officeNationCode | 公司國別代碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type officeStateCode | 公司洲別代碼 | number | Y | (1).UI 操作取得<br>(2).整數,int type<br>(3).officeStateCode與officeOtherState至少填一個(二擇一) officeOtherState | 公司其他洲別 | string | Y / N | (1).UI 操作取得<br>(2).officeStateCode與officeOtherState至少填一個(二擇一) officeAddress | 公司地址 | string | Y | UI 操作取得 companyWebsite | 公司網址 | string | Y | UI 操作取得 recommendMatch | Recommend matching <br>suppliers if this <br>supplier doesn't <br>contact me within <br>2 working days | boolean | Y | UI 操作取得 showBizEmail | 是否顯示買主email | boolean | Y | UI 操作取得 quantity | 數量 | number | N | (1).UI 操作取得<br>(2).整數,int type quantityUnit | 數量單位代碼 | number | N | (1).UI 操作取得<br>(2).整數,int type purchaseAmount | 購買金額 | number | N | (1).UI 操作取得<br>(2).整數,int type officeTelCountryCode | 公司電話國碼 | number | N | (1).UI 操作取得<br>(2).整數,int type officeTel | 公司電話 | string | N | UI 操作取得 officeTelExt | 公司電話分機 | string | N | UI 操作取得 mobileCountry | 使用者手機國碼 | string | N | UI 操作取得 mobile | 使用者手機 | string | N | UI 操作取得 keywords | 商機關鍵字 | string | N | (1).UI 操作取得<br>(2).多組用逗號區隔 attachs | 商機附件id | string | N | (1).UI 操作取得<br>(2).至多3個 url | 下商機網址 | string | Y | server site 取得 ip | 下商機IP | string | Y | server site 取得 - 範例 - 登入 ```json= { "dynamicKey" : "8615d3f7e0918ecf768a9347b709460f", "ttLoginType" : 1, "domainId" : 2, "languageId" : 42, "favSuppliers" : "38,40", "subject" : "test fav-company", "message" : "test fav-company", "userEmail" : "roy.huang@hyweb.com.tw", "userName" : "roy", "userPassword" : "", "userTitleCode" : 412, "companyName" : "HYWEB TECHNOLOGY CO., LTD.", "officeNationCode" : 582, "officeStateCode" : 931, "officeOtherState" : "", "officeAddress" : "5F.-6, No.8, Taiyuan 1st St., Zhubei City, Hsinchu County 302, Taiwan (R.O.C.)", "companyWebsite" : "http://www.hyweb.com.tw", "recommendMatch" : true, "showBizEmail" : false, "quantity" : null, "quantityUnit" : null, "purchaseAmount" : null, "officeTelCountryCode" : null, "officeTel" : null, "officeTelExt" : null, "mobileCountry" : null, "mobile" : null, "keywords" : "k1,k2,k3,k4,k9999", "attachs" : "1,2,3", "url" : "https://www.ttstaging.com.tw/contact/SUPPLIER?contactType=SUPPLIER&supplierIds[40]=42&supplierIds[38]=42", "ip" : "127.0.0.1" } ``` ------------------------------------------------------------------------ ### OUTPUT #### inquiry-product ```json= { "code" : <number> , // 代碼,0:ok、 < 0: error 使用 "errorMsg" : <string> , // 錯誤訊息 "data" : { "businessId" : <number> , // 商機id "mailRecordId" : <number> , // 寄信id,註冊會寄信 } } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|--------|----------|:--------:|-------------------------- code | 代碼 | number | N | 0:ok、 < 0: error 使用,[錯誤代碼對應表](#錯誤代碼對應表) errorMsg | 錯誤訊息 | string | N | 代碼 < 0 時,會紀錄錯誤訊息 data | 資料集合 | Object | N | [新增商機info(Object)](#新增商機info) #### 新增商機info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 -------------|--------|----------|:------:|-------------------------- businessId | 商機id | number | N | 整數,long type<br>EX: 2147483647 mailRecordId | 郵件id | number | Y / N | (1).整數,long type<br>EX: 2147483647<br>(2).只有註冊會寄信 - 範例 ```json= { "code" : 0, "errorMsg" : "", "data" : { "businessId" : 123, "mailRecordId" : 456 } } ``` #### 錯誤代碼對應表 Error Code | Error Java Type | Desc -----------|------------------------------|----------------------------------------------------------------------------------- -999 | ERR | 其他未定義的錯誤 -998 | ERR_EXECUTE_SQL | Java call DB 這段服務錯誤 <br>1. SP 執行錯誤或規格被異動 <br>2. Java 執行時錯誤 <br>3. DB connection 中斷 -997 | ERR_REQUIRE_FORM_DATA | 表單中有必填欄位是空值或沒滿足條件時 -996 | ERR_JSON_TRANSFER_OBJECT | JSON 格式轉成 Java Object 時錯誤 -994 | ERR_OBJECT_TRANSFER_JSON | Java Object 轉成 JSON 格式時錯誤 -993 | ERR_NULL | 透過 server 解析 client 的 ip、url 時錯誤 -991 | ERR_FAV_SUPPLIER_INFO_FORMAT | Java 在解析 Favorite Supplier 的 favSupplierInfo 欄位格式不正確 -986 | ERR_USER_ACCESS_TICKET | userAccessTicket 解析錯誤 -984 | ERR_ADD_FAIL | add fail,跟預期的不同 (非 SQL 執行錯誤),如:欄位過小 #### inquiry-company - 同 inquiry-product #### rfq - 同 inquiry-product #### trade-inquiry - 同 inquiry-product #### mso - 同 inquiry-product #### mst - 同 inquiry-product #### fav-product - 同 inquiry-product #### fav-company - 同 inquiry-product #### offer-to-sell ```json= { "code" : <number> , // 代碼,0:ok、 < 0: error 使用 "errorMsg" : <string> , // 錯誤訊息 "data" : { "businessId" : <number> , // 商機id } } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|--------|----------|:--------:|---------------------------------------- code | 代碼 | number | N | 0:ok、 < 0: error 使用,[錯誤代碼對應表](#錯誤代碼對應表) errorMsg | 錯誤訊息 | string | N | 代碼 < 0 時,會紀錄錯誤訊息 data | 資料集合 | Object | N | [offer-to-sell-新增商機info(Object)](#offer-to-sell-新增商機info) #### offer-to-sell-新增商機info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 -------------|--------|----------|:--------:|-------------------------------------------------- businessId | 商機id | number | N | 整數,long type<br>EX: 2147483647 - 範例 ```json= { "code" : 0, "errorMsg" : "", "data" : { "businessId" : 123 } } ``` ------------------------------------------------------------------------ ### SQL [參考](https://hackmd.io/kQegnS_oTGCx5MN1LOVDFQ?view#add-business) ------------------------------------------------------------------------ ## URI-O-12 Check business data - 檢測商機是否存在 - <div style="color:red">不存在(code < 0),則導入 404 頁面</div> ### URL - {TT-API網址}/business/success/{inquiry-product, inquiry-company, rfq, trade-inquiry, mso, mst, offer-to-sell, fav-product, fav-company}/{ bizId } - EX: - https://tt-api.taiwantrade.com/business/success/inquiry-product - https://tt-api.taiwantrade.com/business/success/inquiry-company - https://tt-api.taiwantrade.com/business/success/rfq - https://tt-api.taiwantrade.com/business/success/trade-inquiry - https://tt-api.taiwantrade.com/business/success/mso - https://tt-api.taiwantrade.com/business/success/mst - https://tt-api.taiwantrade.com/business/success/offer-to-sell - https://tt-api.taiwantrade.com/business/success/fav-product - https://tt-api.taiwantrade.com/business/success/fav-company - method : GET - body : application/json;charset=UTF-8 - query : None ### INPUT 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ---------|--------|----------|:--------:|--------------------------------------------- bizId | 商機id | number | Y | 1.透過 header 取得<br>(目前頁面的語系)<br>2.整數,long type<br>EX: 2147483647 bizType | 商機類型 | string | Y | 依據商機不同,輸入不同代碼類型,<br>inquiry-product, inquiry-company, rfq, trade-inquiry, mso, mst, offer-to-sell, fav-product, fav-company ### OUTPUT ```json= { "code" : <number> , // 代碼,0:ok、 < 0: error 使用 "errorMsg" : <string> , // 錯誤訊息 "data" : {} } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|--------|----------|:--------:|-------------------------- code | 代碼 | number | N | 0:ok、 < 0: error 使用,<br>[URI-O-12 錯誤代碼對應表](#URI-O-12-錯誤代碼對應表) errorMsg | 錯誤訊息 | string | N | 代碼 < 0 時,會紀錄錯誤訊息 data | 資料集合 | Object | Y | 空物件,{} - 範例 ```json= { "code" : 0, "errorMsg" : "", "data" : {} } ``` #### URI-O-12 錯誤代碼對應表 Error Code | Error Java Type | Desc -----------|-----------------|----------------------------------------------------------- -993 | ERR_NULL | 資料不存在 -998 | ERR_EXECUTE_SQL | Java call DB 這段服務錯誤 <br>Java 執行時錯誤 <br>2. DB connection 中斷 ### SQL [參考](https://hackmd.io/kQegnS_oTGCx5MN1LOVDFQ?view#Check-business-data) ------------------------------------------------------------------------ ## URI-O-13 Prepare catalog2 code data - 2 碼產業別清單 - 參考 [URI-049](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A70) ### URL - {TT-API網址}/taitracodes/{langId}/2 - EX: https://tt-api.taiwantrade.com/taitracodes/42/2 - method : GET - query : None ### INPUT 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ---------|--------|----------|:--------:|--------------------------------------------- langId | 語系id | number | Y | 1.透過 header 取得<br>(目前頁面的語系)<br>2.整數,int type ### OUTPUT - 範例 ```json= { "exception" : "", "trees": { "nodes" : [ { "nodes" : [], "id" : 1, "level" : 2, "code": : "51", "label" : "Agricultural & Foods" }, { "nodes" : [], "id" : 2, "level" : 2, "code": : "52", "label" : "Mineral & Metallurgy" }, ... ] } } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ----------|------------|---------|:-----------------:|------------------------------------- exception | 例外 | string | Y: 例外<br>N: NULL | NULL:正常 trees | tree資料集合 | Object | N | [catalog2-tree-info](#catalog2-tree-info) #### catalog2-tree-info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|-----------|---------------|:--------:|---------- nodes | nodes資料集合 | Array[Object] | N | [catalog2-nodes-info](#catalog2-nodes-info) #### catalog2-nodes-info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|-----------|---------------|:--------:|---------- nodes | 子Node資訊 | Array[Object] | Y | 不使用 id | 產業別 id | number | N | 整數,int type level | 產業別階層 | number | N | 固定是 2 碼 code | 產業別代碼 | string | N | label | 產業別名稱 | string | N | ------------------------------------------------------------------------ ## URI-O-14 Prepare catalog4 code data - 4 碼產業別清單 - 參考 [URI-049](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A70) ### URL - {TT-API網址}/taitracodes/{langId}/4/{ aliasCode2 } - EX: https://tt-api.taiwantrade.com/taitracodes/42/4/51 - method : GET - query : None ### INPUT 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 -----------|---------------|----------|:--------:|--------------------------------------------- langId | 語系id | number | Y | 1.透過 header 取得<br>(目前頁面的語系)<br>2.整數,int type aliasCode2 | 2碼產業別的代碼 | string | Y | ### OUTPUT - 範例 ```= { "exception" : "", "trees": { "nodes" : [ { "nodes": [], "id" : 36, "level" : 4, "code": : "5110", "label" : "Livestock" }, { "nodes": [], "id" : 37 "level" : 4, "code": : "5115", "label" : "Seafood" }, ... ] } } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ----------|------------|----------|:------------------:|------------------------------------------ exception | 例外 | string | Y: 例外<br>N: NULL | NULL:正常 trees | tree資料集合 | Object | N | [catalog4-tree-info](#catalog4-tree-info) #### catalog4-tree-info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|-----------|---------------|:--------:|-------------------------------------------- nodes | nodes資料集合 | Array[Object] | N | [catalog4-nodes-info](#catalog4-nodes-info) #### catalog4-nodes-info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|---------|---------------|:--------:|------------ nodes | 子Node資訊 | Array[Object] | Y | 不使用 id | 產業別 id | number | N | 整數,int type level | 產業別階層 | number | N | 固定是 4 碼 code | 產業別代碼 | string | N | label | 產業別名稱 | string | N | ------------------------------------------------------------------------ ## URI-O-15 Prepare catalog6 code data - 6 碼產業別清單 - 參考 [URI-049](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A70) ### URL - {TT-API網址}/taitracodes/{langId}/6/{ aliasCode2 }/{ aliasCode4 } - EX: https://tt-api.taiwantrade.com/taitracodes/42/6/51/5105 - method : GET - query : None ### INPUT 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 -----------|---------------|----------|:--------:|--------------------------------------------- langId | 語系id | number | Y | 1.透過 header 取得<br>(目前頁面的語系)<br>2.整數,int type aliasCode2 | 2碼產業別的代碼 | string | Y | aliasCode4 | 4碼產業別的代碼 | string | Y | ### OUTPUT - 範例 ```json= { "exception" : "", "trees": { "nodes" : [ { "nodes": [], "id" : 396, "level" : 6, "code": : "510505", "label" : "Chicken" }, { "nodes": [], "id" : 397, "level" : 6, "code": : "510510", "label" : "Pork" }, ... ] } } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ----------|------------|----------|:------------------:|------------------------------------------ exception | 例外 | string | Y: 例外<br>N: NULL | NULL:正常 trees | tree資料集合 | Object | N | [catalog6-tree-info](#catalog6-tree-info) #### catalog6-tree-info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|-----------|---------------|:--------:|-------------------------------------------- nodes | nodes資料集合 | Array[Object] | N | [catalog6-nodes-info](#catalog6-nodes-info) #### catalog6-nodes-info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|---------|---------------|:--------:|------------ nodes | 子Node資訊 | Array[Object] | Y | 不使用 id | 產業別 id | number | N | 整數,int type level | 產業別階層 | number | N | 固定是 6 碼 code | 產業別代碼 | string | N | label | 產業別名稱 | string | N | ------------------------------------------------------------------------ ## URI-O-16 Prepare supplier typedata ### URL - {TT-API網址}/business/supplier-type/{ langId } - method : GET - body : application/json;charset=UTF-8 - query : None ### INPUT 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 -------|---------|---------|:-------:|------------------ langId | 語系id | number | Y | 1.透過 header 取得<br>(目前頁面的語系)<br>2.整數,int type ### OUTPUT ```json= { "code" : 0, "errorMsg" : "", "data" : { "prepareSupplierTypeInfos" : [ { "cid" : <number>, "supplierType" : <string> }, ... ] } } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|----------|---------|:------:|------------ code | 代碼 | number | N | 0:ok、 < 0: error 使用 errorMsg | 錯誤訊息 | string | N | 代碼 < 0 時,會紀錄錯誤訊息 data | 資料集合 | Object | N | [prepareSupplierTypeInfos](#prepare-supplier-type-infos) #### prepare-supplier-type-infos 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 -------------------------|------------------|--------------|:-------:|---------------------------- prepareSupplierTypeInfos | 供應商類型資料集合 | Array(Object) | N | [供應商類型清單(Object)](#供應商類型清單) #### 供應商類型清單 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 -------------|-------------|---------|:-------:|------------- cid | 供應商類型 id | number | N | 整數,int type supplierType | 供應商類型名稱 | string | N | - 範例 ```json= { "code" : 0, "errorMsg" : "", "data" : { "prepareSupplierTypeInfos" : [ { "cid" : 1667, "supplierType" : "Manufacturer with export experience", }, { "cid" : 1668, "supplierType" : "Trading company", }, { "cid" : 1669, "supplierType" : "OEM producers", }, { "cid" : 1670: , "supplierType" : "ODM producers", }, ] } } ``` ### SQL [參考](https://hackmd.io/kQegnS_oTGCx5MN1LOVDFQ?view#Prepare-supplier-typedata) ------------------------------------------------------------------------ ## URI-O-17 Prepare language label tag - 參考 [URI-A-02 多語標籤 API](https://hackmd.io/Cbw7V8AETEOzCk4s7TgfwA?both ) ### URL - {TT-API網址}/labels/{langId} - EX: https://tt-api.taiwantrade.com/labels/42 ### INPUT 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ---------|--------|----------|:--------:|--------------------------------------------- langId | 語系id | number | Y | 1.透過 header 取得<br>(目前頁面的語系)<br>2.整數,int type ### 商機使用到的多語標籤 欄位名稱 | 資料型態| 英文語系欄位說明 -------------------------------------|--------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- contactsupplier | string | Contact Supplier home | string | Home customizedsourcing | string | Customized Sourcing Services tradeinquiry | string | Trade Inquiry meetsuppliersonline | string | Meet Suppliers Online meetsuppliersnumberaiwan | string | Meet Suppliers In Taiwan offertosell | string | Offer to Sell productionname | string | Product Name choosethecategoryitbelongsto | string | Product Category productdetails | string | Product Details preferredsuppliertype | string | Preferred Supplier Type expireddate | string | Expiry Date preferredmeetingdate | string | Preferred Meeting Date skypeid | string | Your Skype ID updatetomyprofile | string | update to my profile onlinemeetingplace | string | I'd like to have the online meeting at A TAITRA offic checktaitrasglobaloffices | string | Check TAITRA's global offices contactperson | string | Contact Person Name makethisofferexpireon | string | Make this offer expire on ez_step1 | string | Step 1 fillnumberheform | string | Fill in the form ez_step2 | string | Step 2 completion | string | Completion ez_quantity | string | Quantity estimatedannualpurchases | string | Estimated Purchase Amount USD message | string | Message insertatemplate | string | Insert a template businessmessagetextboxdefault | string | Dear Sir/Madam,\nI'm looking for products with the following specifications: fileuploadlimit | string | File formats maxfileslimit | string | Max 3 files (10MB in total). totalsize | string | Total size contactinformation | string | Contact Information viewandmodify | string | View and Modify collapse | string | Collapse email | string | Email fullname | string | Full Name companyname | string | Company Name individualbuyer | string | I'm an individual buyer countryregion | string | Country/Region stateprovincecity | string | State/Province/City ez_pleaseselect | string | Please Select otherstateprovincecity | string | Other State/Province/City companyaddress | string | Company Address companysite | string | Company Site notavailable | string | Not Available tel1 | string | Business Phone Number mobilephone | string | Mobile Phone Number changeswillbeautomaticallysaved | string | Changes will be automatically saved to your profile. recommendmatchingsupplier | string | Recommend other suppliers if this supplier doesn't reply. idontlikeshowmyemail | string | I'd like to show my email address to the suppliers I contact on Taiwantrade.com. bytickingthisbox | string | By ticking this box, you and the suppliers whom you contact from now will be able to see each other's email address on My Taiwantrade after the suppliers reply to your inquiries. keywordsofproducts | string | Keywords of products you are looking for thishelpstomorepreciselymatch | string | This helps to more precisely match your inquiry with potential suppliers. useorentertoseparatemultiplekeywords | string | 'Use "," or "enter" to separate multiple keywords.' ok | string | Submit suggestenterofficeemail | string | Your email will be your Taiwantrade.com login. createapassword | string | Create Password confirmpassword | string | Confirm Password iacceptthe | string | I accept the taiwantradecommembershipagreement | string | Taiwantrade.com Membership Agreement termsofuse | string | TTerms of Use and | string | and privacypolicy | string | Privacy Policy subject | string | Subject ### OUTPUT - 範例 ```json= { "code" : 0, "errorMsg" : "", "data" : { "label" : [ { "code" : "subject", "name" : "Subject", }, { "code" : "privacypolicy", "name" : "Privacy Policy", }, ... ] } } ``` ### SQL 無 ------------------------------------------------------------------------ ## URI-O-18 Prepare Custom Header data - 客製 Header 訊息 ### URL - {TT-API網址}/business/header/{langId}/{trade-inquiry, mso, mst, offer-to-sell} - EX: - https://tt-api.taiwantrade.com/business/header/41/trade-inquiry - https://tt-api.taiwantrade.com/business/header/42/mso - https://tt-api.taiwantrade.com/business/header/43/tmst - https://tt-api.taiwantrade.com/business/header/44/offer-to-sell - method : GET - body : application/json;charset=UTF-8 - query : None ### INPUT 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 ---------|--------|----------|:--------:|--------------------------------------------- langId | 語系id | number | Y | 1.透過 header 取得<br>(目前頁面的語系)<br>2.整數,int type bizType | 商機類型 | string | Y | 依據商機不同,輸入不同代碼類型,<br>trade-inquiry、mso、mst、offer-to-sell ### OUTPUT ```json= { "code" : <number> , // 代碼,0:ok、 < 0: error 使用 "errorMsg" : <string> , // 錯誤訊息 "data" : { "prepareCustomHeaderInfo" : { "contentHtml" : <string> , // header 訊息 } } } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|--------|----------|:--------:|--------------------------------------------------------- code | 代碼 | number | N | 0:ok、 < 0: error 使用 errorMsg | 錯誤訊息 | string | N | 代碼 < 0 時,會紀錄錯誤訊息 data | 資料集合 | Object | N | [Prepare Custom Header Info](#prepare-custom-header-info) #### prepare-custom-header-info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ------------------------|-----------------|---------|:--------:|-------------------- prepareCustomHeaderInfo | 客製Headr資料集合 | Object | N | [header資訊(Object)](#header資訊) #### header資訊 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ------------|-----------------------|---------|:--------:|------- contentHtml | 客製Headr訊息<br>(HTML格式) | string | N | header 訊息(含HTML) - 範例 ```json= { "code" : 0, "errorMsg" : "", "data" : { "prepareCustomHeaderInfo" : { "contentHtml" : "<p class="preHeader">Fill in this trade inquiry form below and we will email a list of recommended suppliers to you.</p>" } } } ``` ### SQL [參考](https://hackmd.io/kQegnS_oTGCx5MN1LOVDFQ?view#Prepare-Custom-Header-data) ------------------------------------------------------------------------ ## URI-O-19 Search Suggestions data - 查詢關鍵字 ### URL - {TT-API網址}/business/suggestion/{did} - EX: https://tt-api.taiwantrade.com/business/suggestion/2 - method : POST - body : application/json;charset=UTF-8 - query : None - old path - { FRONT 網址 }/searchSuggestions ### INPUT ```json= { "keyword" : "ab" } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 --------|----------|----------|:--------:|------ keyword | 關鍵字 | string | Y | 前後空白過濾後,才視同完整的關鍵字 did | domain id | number | Y | 1.透過 header 取得<br>(目前頁面的語系)<br>2.整數,int type ### OUTPUT ```json= { "code" : <number> , // 代碼,0:ok、 < 0: error 使用 "errorMsg" : <string> , // 錯誤訊息 "data" : { "searchSuggestionsInfos" : [ { "seq" : <number>, "catalog6Id" : <number>, "catalog6Name" : <string>, "alias2Code" : <string>, "alias4Code" : <string>, "word" : <string>, "hasTopKeyword" : <boolean> } ,... ] } } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|--------|----------|:--------:|---------------------------------------------------------- code | 代碼 | number | N | 0:ok、 < 0: error 使用 errorMsg | 錯誤訊息 | string | N | 代碼 < 0 時,會紀錄錯誤訊息 data | 資料集合 | Object | N | [SearchSuggestionsInfos](#search-suggestions-infos) #### search-suggestions-infos 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 -----------------------|------------|---------------|:--------:|------------------------ searchSuggestionsInfos | 產業別資料集合 | Array[Object] | N | [關鍵字資訊(Object)](#關鍵字資訊) #### 關鍵字資訊 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 --------------|------------------------|------------|:--------:|------------------------- seq | 排序編號 | number | N | 整數,int type catalog6Id | 6 碼產業別 | number | Y / N | 整數,int type catalog6Name | 6 碼產別名稱 | string | Y / N | alias2Code | 2 碼產別code | string | Y / N | alias4Code | 4 碼產別code | string | Y / N | word | 比對後的關鍵字詞 | string | N | hasTopKeyword | 無產業別排序中的第一個關鍵字 | boolean | N | 以此判斷有無產業別的分隔線 - 範例 - 關鍵字: "a" ```json= { "code" : 0 "errorMsg" : "" "data" : { "searchSuggestionsInfos" : [ { "seq" : 1, "catalog6Id" : 1969, "catalog6Name" : "Air Purifier", "alias2Code" : "65" "alias4Code" : "6520", "word" : "Air Purifier", "hasTopKeyword" : false } { "seq" : 2, "catalog6Id" : 1944, "catalog6Name" : "TV Receiver & Set-top Box", "alias2Code" : "64" "alias4Code" : "6440", "word" : "Android Tv Box", "hasTopKeyword" : false }, { "seq" : 3, "catalog6Id" : 1969, "catalog6Name" : "Toy Gun", "alias2Code" : "79" "alias4Code" : "7950", "word" : "Airsoft Gu", "hasTopKeyword" : false }, -- 無產業別,第一筆 { "seq" : 4, "catalog6Id" : null, "catalog6Name" : "", "alias2Code" : "" "alias4Code" : "", "word" : "Aaa12", "hasTopKeyword" : true }, { "seq" : 5, "catalog6Id" : null, "catalog6Name" : "", "alias2Code" : "" "alias4Code" : "", "word" : "Auto Parts", "hasTopKeyword" : false }, ,... ] } } ``` ### SQL [參考](https://hackmd.io/kQegnS_oTGCx5MN1LOVDFQ?view#Search-Suggestions-data) ------------------------------------------------------------------------ ## URI-O-20 Serach Catalog or Suggestions data - 透過產業別 2、4、6 碼或 關鍵字,找出符合條件的 產業別6 碼清單 - 排序: 產業別英文名稱 asc ### URL - {TT-API網址}/business/taitracodes/quick6/{langId} - EX: https://tt-api.taiwantrade.com/business/taitracodes/quick6/41 - method : POST - body : multipart/form-data ### INPUT ```json= { "suggestion" : "ab" } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 -----------|-----------|----------|:--------:|--------------------------------------------- langId | 語系id | number | Y | 1.透過 header 取得<br>(目前頁面的語系)<br>2.整數,int type suggestion | 產業別關鍵字或<br>產業別 2、4、6 碼 | string | Y | 前後空白過濾後,才視同完整的關鍵字 ### OUTPUT ```json= { "code" : <number> , // 代碼,0:ok、 < 0: error 使用 "errorMsg" : <string> , // 錯誤訊息 "data" : { "taitraCode6Infos" : [ { "catalog6Id" : <number>, "catalog6Name" : <string>, "catalog4Name" : <string>, "catalog2Name" : <string>, "alias2Code" : <string>, "alias4Code" : <string>, } ,... ] } } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|--------|----------|:--------:|---------------------------------------------------- code | 代碼 | number | N | 0:ok、 < 0: error 使用 errorMsg | 錯誤訊息 | string | N | 代碼 < 0 時,會紀錄錯誤訊息 data | 資料集合 | Object | N | [taitraCode6Infos](#taitra-code6-infos) #### taitra-code6-infos 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 -----------------|------------|---------------|:--------:|-------------------------------------- taitraCode6Infos | 產業別資料集合 | Array(Object) | N | [taitraCode6Info](#taitra-code6-info) #### taitra-code6-info 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 -------------|------------|---------|:--------:|----- catalog6Id | 6 碼產業別 | number | Y / N | 整數,int type catalog6Name | 6 碼產別名稱(依傳入的語系回傳對應的名稱) | string | N | 若帶入語系沒值,預設給英文名稱 catalog4Name | 4 碼產別名稱(依傳入的語系回傳對應的名稱) | string | N | 若帶入語系沒值,預設給英文名稱 catalog2Name | 2 碼產別名稱(依傳入的語系回傳對應的名稱) | string | N | 若帶入語系沒值,預設給英文名稱 alias2Code | 2 碼產別code | string | N | alias4Code | 4 碼產別code | string | N | - 範例 - 關鍵字: "water" ```json= { "code" : 0 "errorMsg" : "" "data" : { "taitraCode6Infos" : [ { "catalog6Id" : 2243, "catalog6Name" : "Air Purifier", "catalog4Name" : "Air Conditioning AppliancesZZ", "catalog2Name" : "Home Appliances", "alias4Code" : "6915", "alias2Code" : "69" }, { "catalog6Id" : 2484, "catalog6Name" : "Water Filter & Filter", "catalog4Name" : "Water Treatment Appliances", "catalog2Name" : "Home Appliances", "alias4Code" : "7060", "alias2Code" : "70" }, ,... ] } } ``` ### SQL [參考](https://hackmd.io/kQegnS_oTGCx5MN1LOVDFQ?view#Serach-Catalog-or-Suggestions-data) ------------------------------------------------------------------------ ## URI-O-21 Get file data by id - 透過 id 取得檔案資訊 - 需要先取得 dynamic key,在做上傳(時效為5分), - 參考 [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) ### URL - {TT-API網址}/file/info/id - method : POST - body : application/json;charset=UTF-8 ### INPUT 欄位名稱 | 欄位說明 | 資料型態 | 是否必填 | 備註 -----------|--------------|---------|:-------:|-------- dynamicKey | dynamic key | string | Y | 時效為5分,參考 [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) fileIds | 檔案id資料集合 | string | Y | 多筆用逗號區隔 uploadType | 上傳檔案類型 | number | Y | (1).整數,int type<br>(2).值有,1:暫存(商機使用)、2:存擋(保留),預設1 - 範例 ```json= { "dynamicKey" : "8615d3f7e0918ecf768a9347b709460f", "fileIds" : "32659037,32659098,32659099", "uploadType" : 1 } ``` ### OUTPUT ```json= { "code" : <number> , // 代碼,0:ok、 < 0: error 使用 "errorMsg" : <string> , // 錯誤訊息 "data" : { "fileInfos" : { "id" : <number> , // 附件 id "name" : <string> , // 附件名稱 "fileByte" : <number> , // 附件容量byte "url" : <string> , // 附件url } } } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|----------|---------|:-------:|-------------------------- code | 代碼 | number | N | 0:ok、 < 0: error 使用 errorMsg | 錯誤訊息 | string | N |代碼 < 0 時,會紀錄錯誤訊息 data | 資料集合 | Object | N | [附件資訊by-id](#附件資訊by-id) #### 附件資訊by-id 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ----------|-----------|---------------|:------:|--------------------------------------- fileInfos | 附件資料集合 | Array[Object] | N | [fileInfos(Object)](#file-info-by-id) #### file-info-by-id 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|-------------|----------|:--------:|------------------------------- id | 附件 id | number | N | 整數,long type<br>EX: 2147483647 name | 附件名稱 | string | N | fileByte | 附件容量 byte | number | N | 整數,long type<br>EX: 2147483647 url | 附件 url | string | N | - 範例 ```json= { "code" : 0, "errorMsg" : "", "data" : { "fileInfos" : [ { "id" : 33070422, "name" : "0546db0d-3ce8-4805-9fa6-6ca7b67392e5_33_201500014734_L-100x100.jpg", "fileByte" : 13995, "url" : "https://im01.ttstaging.com.tw/5b175743-69d8-4efd-a427-45ea0af8f8c3/0546db0d-3ce8-4805-9fa6-6ca7b67392e5_33_201500014734_L-100x100.jpg", }, { "id" : 33070423, "name" : "123.txt", "fileByte" : 13996, "url" : "https://im01.ttstaging.com.tw/51231233-69d8-4efd-a427-45ea0af8f8c3/123.txt", } ] } } ``` ### SQL [參考](https://hackmd.io/kQegnS_oTGCx5MN1LOVDFQ?view#Get-file-data-by-id) ------------------------------------------------------------------------ ## URI-O-22 Get file data by url - 透過 url 取得檔案資訊 - 需要先取得 dynamic key ### URL - {TT-API網址}/file/info/url - method : POST - body : application/json;charset=UTF-8 ### INPUT 欄位名稱 | 欄位說明 | 資料型態 | 是否必要 | 備註 -----------|---------------|----------|:-------:|---- dynamicKey | dynamic key | string | Y | 時效為5分,參考 [URI062](https://docs.google.com/spreadsheets/d/12U90GlZtqTFVemxzp5lFCv5l_eAZchVlOJN6xbRxDLI/edit#gid=0&range=A84) fileUrls | 檔案url資料集合 | string | Y | 多筆用逗號區隔 uploadType | 上傳檔案類型 | number | Y | (1).整數,int type<br>(2).值有,1:暫存(商機使用)、2:存擋(保留),預設1 - 範例 ```json= { "dynamicKey" : "8615d3f7e0918ecf768a9347b709460f", "fileUrls" : "https://im01.ttstaging.com.tw/5b175743-69d8-4efd-a427-45ea0af8f8c3/0546db0d-3ce8-4805-9fa6-6ca7b67392e5_33_201500014734_L-100x100.jp, https://file01.ttstaging.com.tw/bc90b77d-a9fa-420f-9b03-9b3ecb1d3ca2/frontContactSupplier.txt", "uploadType" : 1 } ``` ### OUTPUT ```json= { "code" : <number> , // 代碼,0:ok、 < 0: error 使用 "errorMsg" : <string> , // 錯誤訊息 "data" : { "fileInfos" : { "id" : <number> , // 附件 id "name" : <string> , // 附件名稱 "fileByte" : <number> , // 附件容量byte "url" : <string> , // 附件url } } } ``` 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|---------|---------|:-------:|-------------------------------- code | 代碼 | number | N | 0:ok、 < 0: error 使用 errorMsg | 錯誤訊息 | string | N | 代碼 < 0 時,會紀錄錯誤訊息 data | 資料集合 | Object | N | [附件資訊by-url](#附件資訊by-url) #### 附件資訊by-url 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ----------|------------|---------------|:-------:|--------------------------------------- fileInfos | 附件資料集合 | Array[Object] | N | [fileInfos(Object)](#file-info-by-url) #### file-info-by-url 欄位名稱 | 欄位說明 | 資料型態 | 是否空值 | 備註 ---------|--------------|---------|:-------:|------- id | 附件 id | number | N |整數,long type<br>EX: 2147483647 name | 附件名稱 | string | N | fileByte | 附件容量 byte | number | N | 整數,long type<br>EX: 2147483647 url | 附件 url | string | N | - 範例 ```json= { "code" : 0, "errorMsg" : "", "data" : { "fileInfos" : [ { "id" : 33070422, "name" : "0546db0d-3ce8-4805-9fa6-6ca7b67392e5_33_201500014734_L-100x100.jpg", "fileByte" : 13995, "url" : "https://im01.ttstaging.com.tw/5b175743-69d8-4efd-a427-45ea0af8f8c3/0546db0d-3ce8-4805-9fa6-6ca7b67392e5_33_201500014734_L-100x100.jpg", }, { "id" : 33070423, "name" : "123.txt", "fileByte" : 13996, "url" : "https://im01.ttstaging.com.tw/51231233-69d8-4efd-a427-45ea0af8f8c3/123.txt", } ] } } ``` ### SQL [參考](https://hackmd.io/kQegnS_oTGCx5MN1LOVDFQ?view#Get-file-data-by-url)