Try   HackMD

URI046 SEO Metadata (General) API

Tony Fan

tags: 舊API API規格

SEO Metadata (General)

(CP案)擴充項目清單

網址

  • path : ${TT-API網址}/domains/seo/{seoType}/{pageType}/{did}/{rowId}

Input JSON Path

  • path : ${TT-API網址}/domains/seo/{seoType}/{pageType}/{did}/{rowId}
  • method : GET
  • query : 無
  • body : 無

輸入參數說明

欄位名稱 欄位說明 型態 是否必要欄位
seoType SEO型態 String Y
pageType 頁面代碼 String Y
did 網別代碼 int Y
rowId SEO資料ID int Y
  • seoType : 切分為 normal / others 兩種型態,篩選條件如下:
  • pageType : 頁面代碼種類參考 SEO頁面分類所示的頁面代碼欄位
  • did : 網別代碼參考 URI001
  • rowId : 要輸入的資料ID請參考 SEO頁面分類所示的ROWID欄位

SEO頁面分類

參考 SEO頁面分類,篩選 API類 為 General 的SEO項目

CP案新增頁面需要用的項目請見 SEO頁面分類 CP案新增

Output JSON Path

{
  "meta": [
    {
      "seoLevel": <seoLevel>,
      "metaTypeId": <metaTypeId>,
      "did": <did>,
      "property": <property>,
      "propertyName": <propertyName>,
      "seoContent": <seoContent>
    }
  ]
}

輸出參數說明

SEO輸出欄位

欄位名稱 欄位說明 型態 是否可為空值
meta SEO項目列表 SEO項目欄位(Array) Y

SEO項目欄位

欄位名稱 欄位說明 型態 是否可為空值
seoLevel SEO層級 String N
metaTypeId SEO類型 int N
did SEO屬性 int N
property SEO屬性識別名 String Y
propertyName SEO屬性名稱 String N
seoContent SEO內容 String Y
  • seoLevel :
    • S : 客製SEO / G : 公版SEO
  • metaTypeId :
    • 1 一般類型 / 2 Html5 Semantic Elements / 3 Microdata(Schema.org) / 4 Community tag (OG/Google+) / 5 自訂Tag
  • did :
    • 2 標題屬性 / 3 敘述屬性 / 4 關鍵字屬性 / null (只有一般類型有屬性,其餘類型的屬性都是null)

API 邏輯

參考 URI046 API邏輯 (需有權限才能瀏覽)

範例

URI046 測試案例


URI047 SEO Metadata (Keyword) API

Tony Fan

tags: 舊API API規格

SEO Metadata (LP)

網址

  • path : ${TT-API網址}/domains/seokey/{seoType}/{pageType}/{did}/{catalogId}/{keyword}

Input JSON Path

  • path : ${TT-API網址}/domains/seokey/{seoType}/{pageType}/{did}/{catalogId}/{keyword}
  • method : GET
  • query : 無
  • body : 無

輸入參數說明

欄位名稱 欄位說明 型態 是否必要欄位
seoType SEO型態 String Y
pageType 頁面代碼 String Y
did 網別代碼 int Y
catalogId 產業別代碼 int Y
keyword 關鍵字 String Y
  • seoType : 切分為 normal / others 兩種型態,篩選條件如下:
  • pageType : 頁面代碼種類參考 SEO頁面分類所示的頁面代碼欄位
  • did : 網別代碼參考 URI001
  • catalogId : 要輸入的資料ID請參考 SEO頁面分類所示的catalogId欄位
  • keyword : 要輸入的資料ID請參考 SEO頁面分類所示的KEYWORD欄位

SEO頁面分類

參考 SEO頁面分類,篩選 API類 為 LP 的SEO項目

CP案新增頁面需要用到的項目為:

Output JSON Path

{
  "meta": [
    {
      "seoLevel": <seoLevel>,
      "metaTypeId": <metaTypeId>,
      "did": <did>,
      "property": <property>,
      "propertyName": <propertyName>,
      "seoContent": <seoContent>
    }
  ]
}

輸出參數說明

SEO輸出欄位

欄位名稱 欄位說明 型態 是否可為空值
meta SEO項目列表 SEO項目欄位(Array) Y

SEO項目欄位

欄位名稱 欄位說明 型態 是否可為空值
seoLevel SEO層級 String N
metaTypeId SEO類型 int N
did SEO屬性 int N
property SEO屬性識別名 String Y
propertyName SEO屬性名稱 String N
seoContent SEO內容 String Y
  • seoLevel :
    • S : 客製SEO / G : 公版SEO
  • metaTypeId :
    • 1 一般類型 / 2 Html5 Semantic Elements / 3 Microdata(Schema.org) / 4 Community tag (OG/Google+) / 5 自訂Tag
  • did :
    • 2 標題屬性 / 3 敘述屬性 / 4 關鍵字屬性 / null (只有一般類型有屬性,其餘類型的屬性都是null)

API 邏輯

參考 URI047 API邏輯 (需有權限才能瀏覽)

範例

參考 URI047 測試案例