/v1/MallCategory/Get

由SuperMall某一個category往下取得下一層的category資訊

Attribute

Value

API Name

取特定 Category 資訊 (/MallCategory/Get)

API Desc

由某一層 Category 往下取得下一層的 Category 資訊

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/MallCategory/Get OR https://tw.ews.mall.yahooapis.com/oauth/v1/MallCategory/Get

Change Log

*

Request parameters

Parameter

Value

Description

CategoryId

string (Require)

分類代號

一次只可select一個category id

ex:CategoryId=23000

Response fields

Field

Description

CategoryList

包含Category List,屬性:

  • Count:資料筆數

Category

包含一筆category的資料,屬性:

  • Id :下一層分類代號 (string 16)

Name

分類名稱 (string)

Sorting

排序位置 (int)

URL

分類頁面URL (string)

IsLink

是否為關聯性目錄 (string)

true/flase

IsLeaf

是否為最底層目錄 (string)

true/flase

Level

目錄所在的階層 (int)

Sample response

JSON sample

{  
  "Response": {    
    "@Status": "ok",     
    "CategoryList": {      
      "@Count": 3,       
      "Category": [        
        {          
          "@Id": "2092097149",           
          "IsLeaf": "false",           
          "IsLink": "false",           
          "Level": "4",           
          "Sorting": 1,           
          "Url": "http://tw.mall.yahoo.com/2092097149-category.html",           
          "Name": "Intel系列"        
        },         
        {          
          "@Id": "2092103619",
          "IsLeaf": "false",
          "IsLink": "false",
          "Level": "4",  
          "Sorting": 2,  
          "Url": "http://tw.mall.yahoo.com/2092103619-category.html", 
          "Name": "AMD系列"        
        }, 
        { 
          "@Id": "23408",           
          "IsLeaf": "true", 
          "IsLink": "false", 
          "Level": "4", 
          "Sorting": 3, 
          "Url": "http://tw.mall.yahoo.com/23408-category.html",
          "Name": "其他系列"
        }
      ]
    }
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <CategoryList Count="3">
    <Category Id="2092097149">
      <Name><![CDATA[Intel系列]]></Name>
      <Sorting>1</Sorting>
      <Url>http://tw.mall.yahoo.com/2092097149-category.html</Url>
      <IsLink>false</IsLink>
      <IsLeaf>false</IsLeaf>
      <Level>4</Level>
    </Category>
    <Category Id="2092103619">
      <Name><![CDATA[AMD系列]]></Name>
      <Sorting>2</Sorting>
      <Url>http://tw.mall.yahoo.com/2092103619-category.html</Url>
      <IsLink>false</IsLink>
      <IsLeaf>false</IsLeaf>
      <Level>4</Level>
    </Category>
    <Category Id="23408">
      <Name><![CDATA[其他系列]]></Name>
      <Sorting>3</Sorting>
      <Url>http://tw.mall.yahoo.com/23408-category.html</Url>
      <IsLink>false</IsLink>
      <IsLeaf>true</IsLeaf>
      <Level>4</Level></Category>
  </CategoryList>
</Response>

Errors

ErrorCode

ErrorMessage

1701

CategoryId is empty

1702

Unknow CategoryId

99

Internal server error


/v1/MallCategory/GetDetail

取得SuperMall的Leaf category detail資訊

Attribute

Value

API Name

取特定 Category 資訊 (/MallCategory/GetDetail)

API Desc

取得某層 Category 以下的 Leaf Category 資訊

Version

1

Request URI

http://tw.ews.mall.yahooapis.com/stauth/v1/MallCategory/GetDetail OR https://tw.ews.mall.yahooapis.com/oauth/v1/MallCategory/GetDetail

Change Log

*

Request parameters

Parameter

Value

Description

CategoryId

string (Require)

Leaf分類代號

一次可select多個category id,最大接受100個

ex:CategoryId=23000&CategoryId=23000

Response fields

Field

Description

SuccessList

包含成功的Category資料

CategoryList

包含Category List,屬性:

  • Count:資料筆數

Category

包含一筆Category的資料,屬性:

  • Id :分類代號

Name

分類名稱 (string)

Path

分類路徑名稱 (string)

URL

分類頁面URL (string)

ex:http://tw.mall.yahoo.com/23344-category.html

RestrictionList

包含此Category的限制rule list

Restriction

包含一組限制rule

RestrictionType

限制型態 (string)

ex:PayType: 不可使用的付款方式

ShippingType: 不可使用的運送方式

TaxFree: 不可設定商品為免稅

content

內容 (string)

ex:content=1 and RestrictionType=PayTpye,表示此category下的商品不可使用 PayType=1 的 付款方式

ProductAttributeList

包含此Category的商品屬性list

ProductAttribute

包含一組商品屬性

Name

商品屬性欄位名稱 (string)

IsMust

是否必填 (string)

Type

商品屬性欄位類型 (string)

string/ChoiceOf/CheckBoxOf

string:請填入字串

ChoiceOf:請選擇一個選項

CheckBoxOf:可複選

SpecList

包含此商品屬性欄位的規格list

Spec

商品屬性欄位規格 (string)

當 AttributeType=string AttributeSpec=10 , 表示此欄位最大可以輸入的長度為10。

當 AttributeType=ChoiceOf/CheckBoxOf AttributeSpec=可供選擇的選項。

FailList

包含失敗的Category資料

CategoryList

包含Category List,屬性:

  • Count:資料筆數

Category

包含一筆Category的資料,屬性:

  • Id :分類代號

ErrorCode

錯誤代碼 (int)

ErrorMessage

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response":{
    "@Status":"ok",
    "SuccessList":{
      "CategoryList":{
        "@Count":1,
        "Category":[
          {
            "@Id":"2092064084",
            "Name":"餐飲折扣券",
            "Path":"運動、戶外與休閒 > 休閒/旅遊票券 > 餐飲折扣券",
            "Url":"http://tw.mall.yahoo.com/2092064084-category.html",
            "ProductAttributeList":{
              "ProductAttribute":[
                {"Name":"使用期限",
                "IsMust":"false",
                "Type":"string",
                "SpecList":{
                  "Spec":[
                    "14",
                    "14"
                  ]
                }
             }
           ]
         }
       }
     ]
   }
  },
  "FailList":{
    "CategoryList":{
      "@Count":0, 
      "Category":[]
      }
    }
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <SuccessList>
    <CategoryList Count="1">
    <Category Id="2092064084">
      <Name><![CDATA[餐飲折扣券]]></Name>
      <Path><![CDATA[運動、戶外與休閒 > 休閒/旅遊票券 > 餐飲折扣券]]></Path>
      <Url>http://tw.mall.yahoo.com/2092064084-category.html</Url>
        <ProductAttributeList>
          <ProductAttribute>
            <Name><![CDATA[使用期限]]></Name>
            <IsMust>false</IsMust>
            <Type>string</Type>
            <SpecList>
              <Spec><![CDATA[14]]></Spec>
              <Spec><![CDATA[14]]></Spec>
            </SpecList>
          </ProductAttribute>
        </ProductAttributeList>
      </Category>
    </CategoryList>
  </SuccessList>
  <FailList>
    <CategoryList Count="0">
    </CategoryList>
  </FailList>
</Response>

Errors

ErrorCode

ErrorMessage

1501

Unknow category

1502

{$categoryId} is not leaf category

99

Internal server error