# URI054 代碼API > [name=Tony Fan] ###### tags: `舊API` `API規格` 代碼查詢 ## (CP案)擴充項目清單 - 擴充代碼:參考 [代碼對應說明表 CP案新增](#new_codemeta) - 擴充參數:`parentCode`,參考 [Input 規格](#規格) - 客製`post-country` `user-country`的輸出欄位:`telcode`,參考 [Output 規格](#規格1) ## 網址 - path : `${TT-API網址}/codemetas/{languageId}/{codemetaId}` ## Input JSON Path - path : `${TT-API網址}/codemetas/{languageId}/{codemetaId}` - method : GET - query : - parentId:父類別value - parentCode:父類別code - body : 無 ### 輸入參數說明 代碼查詢欄位 | 欄位名稱 | 欄位說明 | 型態 | 是否必要欄位 | | -------- | -------- | -------- | -------- | | languageId | 語系代碼 | number | Y | | codemetaId | 在 TT 資料庫內之 code meta | String | Y | | parentId | 父類別的value | String | N | | parentCode | 父類別的code | number | N | * languageId : 參考 URI054 language * codemetaId : 種類參考[代碼對應說明](#代碼對應說明表) * parentId : 輸入對應父類別(參考[代碼對應說明](#代碼對應說明表)父類別)中的`value`,即可獲得該父類別下的codemetaId代碼表 * parentCode : 輸入對應父類別(參考[代碼對應說明](#代碼對應說明表)父類別)中的`code`,即可獲得該父類別下的codemetaId代碼表 #### 代碼對應說明表 <table> <tr><th> codemetaId </th><th> 說明 </th><th> 顯示telcode </th><th> 父類別 </th><th> (使用API)</th></tr> <tr><td>product-sort</td><td>產品排序之下拉選單</td><td></td><td></td><td>(URI009)</td></tr> <tr><td>payment-method</td><td>付款方式</td><td></td><td></td><td>(URI010)</td></tr> <tr><td>product-industry</td><td>產品產業別</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>product-category</td><td>產品子產業別</td><td></td><td>product-industry</td><td>(URI041)</td></tr> <tr><td>product-certification</td><td>產品認證</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>product-main-export-market</td><td>產品主要出口市場</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>product-shipping-way</td><td>產品運送方式</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>product-co-certification</td><td>產品認證機構</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>supplier-industry</td><td>供應商產業別</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>supplier-category</td><td>供應商子產業別</td><td></td><td>supplier-industry</td><td>(URI041)</td></tr> <tr><td>supplier-certification</td><td>供應商認證</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>supplier-main-export-market</td><td>供應商主要出口市場</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>supplier-company-business-type</td><td>供應商業務類型</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>supplier-co-certification</td><td>供應商認證機構</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>company-industry</td><td>公司產業別</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>company-certification</td><td>公司認證</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>company-main-export-market</td><td>公司主要出口市場</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>company-company-business-type</td><td>公司業務類型</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>event-industry</td><td>活動產業別</td><td></td><td></td><td>(URI041)</td></tr> <tr id="event-continent"><td>event-continent</td><td>活動國家所屬洲別</td><td></td><td></td><td>(URI041)</td></tr> <tr id="event-country"><td>event-country</td><td>活動國家</td><td>是</td><td>event-continent</td><td>(URI041)</td></tr> <tr><td>event-sort</td><td>活動排序之下拉選單</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>news-category</td><td>新聞子產業別</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>news-continent</td><td>新聞發布國家洲別</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>news-sort</td><td>新聞排序之下拉選單</td><td></td><td></td><td>(URI041)</td></tr> <tr><td>language</td><td>語系</td><td></td><td></td><td></td></tr> <tr id="new_codemeta"><td colspan="5"> <font color=""> 以下為CP案新增 </td></tr> <tr><td>event-type</td><td>活動類型</td><td></td><td></td><td><a href="https://hackmd.io/0Y9UgB7FTueY-Z30pxxqLg#%E8%BC%B8%E5%87%BA%E5%8F%83%E6%95%B8%E8%AA%AA%E6%98%8E">(URI-B-02)</a></td></tr> <tr><td>offer-type</td><td>商機類型</td><td></td><td></td><td><a href="https://hackmd.io/x5Kdn5wlS_-aogB5mrToCA#%E5%BE%8C%E5%88%86%E9%A1%9E%E6%A2%9D%E4%BB%B6%E6%AC%84%E4%BD%8Dgroups">(URI-D-01) <a href="https://hackmd.io/MOjJmwQ5TcywiKpzOgW02w#%E8%BC%B8%E5%87%BA%E5%8F%83%E6%95%B8%E8%AA%AA%E6%98%8E">(URI-D-02) </a> </td></tr> <tr><td>post-category</td><td>商機產業別</td><td></td><td></td><td><a href="https://hackmd.io/x5Kdn5wlS_-aogB5mrToCA#%E5%BE%8C%E5%88%86%E9%A1%9E%E6%A2%9D%E4%BB%B6%E6%AC%84%E4%BD%8Dgroups">(URI-D-01)</td></tr> <tr><td>post-continent</td><td>商機洲別</td><td></td><td></td><td><a href="https://hackmd.io/x5Kdn5wlS_-aogB5mrToCA#%E5%BE%8C%E5%88%86%E9%A1%9E%E6%A2%9D%E4%BB%B6%E6%AC%84%E4%BD%8Dgroups">(URI-D-01)</td></tr> <tr><td>post-country</td><td>商機國家</td><td>是</td><td>post-continent</td><td> <a href="https://docs.google.com/spreadsheets/d/1FfU1adulMCzdWNQNjagsm5rHYhokRwhKfzY-Lurvw9Q/edit#gid=0&range=B60">(URI-O-03)</a> <a href="https://hackmd.io/x5Kdn5wlS_-aogB5mrToCA#%E5%BE%8C%E5%88%86%E9%A1%9E%E6%A2%9D%E4%BB%B6%E6%AC%84%E4%BD%8Dgroups">(URI-D-01)</td></tr> <tr><td>post-day</td><td>商機發佈時間間距</td><td></td><td></td><td><a href="https://hackmd.io/x5Kdn5wlS_-aogB5mrToCA#%E5%BE%8C%E5%88%86%E9%A1%9E%E6%A2%9D%E4%BB%B6%E6%AC%84%E4%BD%8Dgroups">(URI-D-01)</a></td></tr> <tr><td>user-title-code</td><td>會員稱謂代碼</td><td></td><td></td><td><a href="https://hackmd.io/-Cwy_fKaSrGXsgpVsUA0ZA#%E8%BC%B8%E5%85%A5%E5%8F%83%E6%95%B8%E8%AA%AA%E6%98%8E">(URI-G-02)</a></td></tr> <tr><td>user-country</td><td>會員國家</td><td>是</td><td></td><td><a href="https://hackmd.io/-Cwy_fKaSrGXsgpVsUA0ZA#%E8%BC%B8%E5%85%A5%E5%8F%83%E6%95%B8%E8%AA%AA%E6%98%8E">(URI-G-02)</a></td></tr> <tr id="user-country-state"><td>user-country-state</td><td>會員國家行政區</td><td></td><td>user-country</td><td> <a href="https://hackmd.io/-Cwy_fKaSrGXsgpVsUA0ZA#%E8%BC%B8%E5%85%A5%E5%8F%83%E6%95%B8%E8%AA%AA%E6%98%8E">(URI-G-02)</a> <a href="https://docs.google.com/spreadsheets/d/1FfU1adulMCzdWNQNjagsm5rHYhokRwhKfzY-Lurvw9Q/edit#gid=0&range=B69">(URI-O-04)</a></td></tr> <tr id="quantity-unit"><td>quantity-unit</td><td>數量單位</td><td></td><td></td><td><a href="https://docs.google.com/spreadsheets/d/1FfU1adulMCzdWNQNjagsm5rHYhokRwhKfzY-Lurvw9Q/edit#gid=0&range=B52">(URI-O-02)</a></td></tr> <tr id="appellation"><td>appellation</td><td>稱謂appellation</td><td></td><td></td><td><a href="https://docs.google.com/spreadsheets/d/1FfU1adulMCzdWNQNjagsm5rHYhokRwhKfzY-Lurvw9Q/edit#gid=0">(URI-O-01)</a></td></tr> </table> ## Output JSON Path ```=json { "pagelabel" : <pagelabel>, //代碼分類名稱 ex payment-method, "label": [ { "value": <value>, // 系統ID 2307, "code": <code>, //顯示code識別碼(字串唯一值), "name": <name>, //顯示名稱 Paypal "telcode": <telcode> // `post-country` `user-country` 輸出對應的國碼 }, } ``` ### 輸出參數說明 代碼輸出欄位 | 欄位名稱 | 欄位說明 | 型態 | 是否可為空值 | | -------- | -------- | -------- | -------- | | pagelabel | 代碼分類名稱 | String | N | | label | 代碼 | [`代碼欄位(Array)`](#代碼欄位) | Y | ##### 代碼欄位 | 欄位名稱 | 欄位說明 | 型態 | 是否可為空值 | | -------- | -------- | -------- |-------- | | value | codemetaId | String | N | | code | 顯示code識別碼(字串唯一值) | String | N | | name | 顯示名稱 | String | N | | telcode | 國家國碼 | String | Y | ## API 邏輯 參考 [URI054 API邏輯](https://hackmd.io/szw3h1UCRt6Nu7lPVWhILg) (需有權限才能瀏覽) ### 範例 參考 [URI054 測試案例](https://docs.google.com/spreadsheets/d/1I4Zbb8aJw4Ndt-e6Pw3pdBtQMZg1DNlHsRvg7YogstU/edit#gid=762893995)
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up