/v1/Product/GetAttachedList

取得商店的加購品/贈品資料

Attribute

Value

API Name

取加購品/贈品 (/Product/GetAttachedList)

API Desc

取得商店的加購品/贈品資料

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/GetAttachedList OR https://tw.ews.mall.yahooapis.com/oauth/v1/Product/GetAttachedList

Change Log

*

Request parameters

Parameter

Value

Description

ProductType

string(Require)

商品型態

  • Addon/Freebie
  • Addon:加購品
  • Freebie:贈品

ProductStatus

string(14/Require)

商品狀態

  • Online:上架中
  • OnlineLowstock:上架中低庫存
  • OnlineNostock:上架中無庫存
  • Offline:已下架
  • NotOnline:未上架

Position

int(Require)

由第幾筆開始拿資料

Count

int(Require)

資料筆數

Count=1~100

Response fields

Field

Description

AttachedList

包含此商店的Attached Product List,屬性:

  • Count:資料筆數

TotalCount

符合ProductType和ProductStatus的總資料筆數

Attached

包含一筆Attached Product的資料,屬性:

  • Id :商品編號

CustomizeId

自訂貨號 (string/30)

Name

商品名稱 (string/150)

SalePrice

網路價 (number/12,2)

賣場上的銷售價格,當 ProductType=Freebie 時 SalePrice=Null

CostPrice

成本價 (number/12,2)

CurrentStock

商品目前庫存量 (int)

Sample response

JSON sample

{
  "Response":{
    "@Status":"ok",
    "TotalCount":25,
    "ProductList":{
      "@Count":3,
      "Product":[
        {
          "@Id":"p094912693",
          "CustomizeId":"",
          "Name":"add on price test",
          "SalePrice":123456789,
          "CostPrice":0,
          "CurrentStock":999
        },
        {
          "@Id":"p094912860",
          "CustomizeId":"",
          "Name":"\u52a0\u8cfc\u54c1-ddd",
          "SalePrice":11,
          "CostPrice":0,
          "CurrentStock":3
        },
        {
          "@Id":"p094912865",
          "CustomizeId":"",
          "Name":"notify1",
          "SalePrice":11,
          "CostPrice":0,
          "CurrentStock":11
        }
      ]
    }
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <TotalCount>25</TotalCount>
  <ProductList Count="3">
    <Product Id="p094912693">
      <CustomizeId><![CDATA[]]></CustomizeId>
      <Name><![CDATA[add on price test]]></Name>
      <SalePrice>123456789</SalePrice>
      <CostPrice>0</CostPrice>
      <CurrentStock>999</CurrentStock>
    </Product>
    <Product Id="p094912860">
      <CustomizeId><![CDATA[]]></CustomizeId>
      <Name><![CDATA[加購品-ddd]]></Name>
      <SalePrice>11</SalePrice>
      <CostPrice>0</CostPrice>
      <CurrentStock>3</CurrentStock>
    </Product>
    <Product Id="p094912865">
      <CustomizeId><![CDATA[]]></CustomizeId>
      <Name><![CDATA[notify1]]></Name>
      <SalePrice>11</SalePrice>
      <CostPrice>0</CostPrice>
      <CurrentStock>11</CurrentStock>
    </Product>
  </ProductList>
</Response>

Errors

ErrorCode

ErrorMessage

1601

StoreId is empty

1602

ProductType is empty

1603

ProductStatus is empty

1604

Position is empty or not numeric

1605

Count is empty or not numeric

1606

unknow ProductType

1607

unknow ProductStatus


/v2/Product/SubmitVerifyMain

Attribute

Value

API Name

驗證主商品內容 (SubmitVerifyMain)

API Desc

驗證刊登的主商品內容以及資料是否正確

Version

2

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v2/Product/SubmitVerifyMain OR https://tw.ews.mall.yahooapis.com/oauth/v2/Product/SubmitVerifyMain

Change Log

  • 2011/08 - Init Version.

Request parameters

Parameter

Value

Description

SaleType

string (20/Require)

商品銷售方式

  • Normal: 一般方式(現貨銷售)
  • PreSaleByShipDate: 預購 (指定出貨日期)
  • PreSaleByShipdays: 預購 (訂購後多少天出貨)

SaleTypeInfo

string (Optional)

商品銷售資訊,對應 SaleType 填入對應的值

  • SaleType=PreSaleByShipDate 時,SaleTypeInfo 需填寫日期,ex:2021/1/31 代表 2021/1/31 出貨
  • SaleType=PreSaleByShipdays 時,SaleTypeInfo 需填寫數字,ex:20 代表訂購後20個工作天出貨

ProductName

string (150/Require)

商品名稱

MallCategoryId

int (12/Require)

商城商品分類代號

商品欲刊登的 leaf 層 category id

StoreCategoryId

int (Optional)

商品歸類

可接受多筆,請重複使用此 parameter

ex:StoreCategoryId=1234&StoreCategoryId=1235

MarketPrice

number (12,2/Optional)

商品市價

SalePrice

number (12,2/Require)

網路價

賣場上的銷售價格,需大於 0 且大於 CostPrice (成本價)

CostPrice

number (12,2/Optional)

成本價

MaxBuyNum

int (3/Optional)

最高購買數量

商品一次最多可被購買的數量 (default:30)

可接受1~100

ShortDescription

string (200/Require)

商品簡述

VideoPath

string (256/Optional)

商品影音檔Path

符合YouTube短網址

LongDescription

string (Optional)

商品介紹

LinkAddon

string (Optional)

加購品

可帶多個加購品商品編號,請重複使用此 parameter。若沒有加購品,請勿加入此 parameter。

ex:LinkAddon=p01234&LinkAddon=p01256

LinkFreebie

string (Optional)

贈品

可帶多個贈品商品編號,請重複使用此 parameter。若沒有贈品,請勿加入此 parameter。

ex:LinkFreebie=p01278&LinkFreebie=p01290

PayTypeId

int (Require)

付款方式代號

商品可接受的付款方式,可帶多個付款方式,請重複使用此parameter

ex:PayTypeId=1&PayTypeId=1

ShippingId

int (Require)

物流方式代號

商品可接受的物流方式,可帶多個物流方式,請重複使用此parameter

ex:ShippingId=1&ShippingId=1

Attribute.n.Name

string (Optional)

商品屬性欄位名稱

  • 可建立多組商品屬性資料
  • 一組商品屬性資料包含:Attribute.n.Name + Attribute.n.Value
  • 請將 parameter 中的 "n" 以數字代換
  • 食品類別填寫範例:Attribute.1.Name=食品業者登錄字號&Attribute.2.Name=產地&Attribute.3.Name=原料原產地
  • 更多說明請參考 https://s.yimg.com/cv/apiv2/apiGuide/ProductAttributes.pdf

Attribute.n.Value

string (Optional)

商品屬性欄位內容

  • 可建立多組商品屬性資料
  • 一組商品屬性資料包含:Attribute.n.Name + Attribute.n.Value
  • 請將 parameter 中的 "n" 以數字代換
  • 食品類別填寫範例:Attribute.1.Value=F-170762591-00000&Attribute.2.Value=台灣&Attribute.3.Value=台灣
  • 更多說明請參考 https://s.yimg.com/cv/apiv2/apiGuide/ProductAttributes.pdf

ProductPromotion.n.Amount

int (Optional)

商品促銷方式 - 數量可建立多組商品促銷方式資料

一組商品屬性資料包含:ProductPromotion.n.Amount + ProductPromotion.n.Price

請將 parameter 中的 "n" 以數字代換,ex:ProductPromotion.1.Amount=5

ProductPromotion.n.Amount 必須大於 ProductPromotion.(n-1).Amount

ProductPromotion.n.Price

int (Optional)

商品促銷方式 - 價格

請將 parameter 中的 "n" 以數字代換,ex:ProductPromotion.1.Price=100

ProductPromotion.n.Price必須小於網路價,而且要小於ProductPromotion.(n-1).Price

IsTaxFree

int(Optional)

此商品是否為免稅商品

商店為免稅商店及商品刊登於免稅分類時,此設定才能被設定為1。(default:0)

當此設定為1時,就不得設定加購品

SpecTypeDimension

string (required)

商品規格, 為無規格、一階商品或是二階商品

  • 0: 無規格商品
  • 1: 商品規格為一階層
  • 2: 商品規格為二階層

CustomizedMainProductId

string (Optional)

商品主貨號 (商品無規格時適用)

Stock

string (Optional)

商品庫存量 (商品無規格時適用)

SaftyStock

string (Optional)

商品庫存最低警告量 (商品無規格時適用)

SpecDimension1

string (Optional)

商品規格名稱1 ex:顏色

SpecDimension2

string (Optional)

商品規格名稱2 ex:尺寸

SpecDimension1Description

string (Optional)

第一個商品規格名稱描述,可新增多筆,最多 40 筆。

ex:SpecDimension1Description=White&SpecDimension1Description=Yellow

注意:所有商品展開後,商品規格總數不得超過 60 種。

SpecDimension2Description

string (Optional)

第二個商品規格名稱描述,可新增多筆,最多 40 筆。

ex:SpecDimension2Description=XL&SpecDimension2Description=XS

注意:所有商品展開後,商品規格總數不得超過 60 種。

Response fields

Field

Description

ProductId

商品編號 (string)

Mall給每一個商品的唯一商品編號

ErrorMsgList

包含此商品verify的error message list

ErrorMsg

包含一組error message

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response":{
    "@Status":"ok"
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok"></Response>

Errors

ErrorCode

ErrorMessage

1310

Attribute: 商品屬性為非合法值

1311

Attribute: 商品屬性不可為空值

1351

商品總數超過上限

1352

加購品超出上限 {max addon limit}

1353

贈品超出上限 {max gift limit}

1354

當商品為免稅時,不可設定加購品

1355

非合法的商店代號

1356

Spec: 規格不可為空值

1371

Promotion: 數量與價錢必須是成對的值

1372

Attribute: 欄位名稱和欄位內容必須是成對的值

其它錯誤請參閱共用錯誤表


/v2/Product/SubmitMain (New)

Attribute

Value

API Name

刊登主商品 (SubmitMain)

API Desc

刊登主商品

Version

2

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v2/Product/SubmitMain OR https://tw.ews.mall.yahooapis.com/oauth/v2/Product/SubmitMain

Change Log

  • 2011/08 - Init Version.

Request parameters

Parameter

Value

Description

SaleType

string (20/Require)

商品銷售方式

  • Normal: 一般方式(現貨銷售)
  • PreSaleByShipDate: 預購 (指定出貨日期)
  • PreSaleByShipdays: 預購 (訂購後多少天出貨)

SaleTypeInfo

string (Optional)

商品銷售資訊,對應 SaleType 填入對應的值

  • SaleType=PreSaleByShipDate 時,SaleTypeInfo 需填寫日期,ex:2021/1/31 代表 2021/1/31 出貨
  • SaleType=PreSaleByShipdays 時,SaleTypeInfo 需填寫數字,ex:20 代表訂購後20個工作天出貨

ProductName

string (150/Require)

商品名稱

MallCategoryId

int (12/Require)

商城商品分類代號

商品欲刊登的 leaf 層 category id

StoreCategoryId

int (Optional)

商品歸類

可接受多筆,請重複使用此 parameter

ex:StoreCategoryId=1234&StoreCategoryId=1235

MarketPrice

number (12,2/Optional)

商品市價

SalePrice

number (12,2/Require)

網路價

賣場上的銷售價格,需大於 0 且大於 CostPrice (成本價)

CostPrice

number (12,2/Optional)

成本價

MaxBuyNum

int (3/Optional)

最高購買數量

商品一次最多可被購買的數量 (default:30)

可接受1~100

ShortDescription

string (200/Require)

商品簡述

VideoPath

string (256/Optional)

商品影音檔Path

符合YouTube短網址

LongDescription

string (Optional)

商品介紹

LinkAddon

string (Optional)

加購品

可帶多個加購品商品編號,請重複使用此 parameter。若沒有加購品,請勿加入此 parameter。

ex:LinkAddon=p01234&LinkAddon=p01256

LinkFreebie

string (Optional)

贈品

可帶多個贈品商品編號,請重複使用此 parameter。若沒有贈品,請勿加入此 parameter。

ex:LinkFreebie=p01278&LinkFreebie=p01290

PayTypeId

int (Require)

付款方式代號

商品可接受的付款方式,可帶多個付款方式,請重複使用此parameter

ex:PayTypeId=1&PayTypeId=1

ShippingId

int (Require)

物流方式代號

商品可接受的物流方式,可帶多個物流方式,請重複使用此parameter

ex:ShippingId=1&ShippingId=1

Attribute.n.Name

string (Optional)

商品屬性欄位名稱

  • 可建立多組商品屬性資料
  • 一組商品屬性資料包含:Attribute.n.Name + Attribute.n.Value
  • 請將 parameter 中的 "n" 以數字代換
  • 食品類別填寫範例:Attribute.1.Name=食品業者登錄字號&Attribute.2.Name=產地&Attribute.3.Name=原料原產地
  • 更多說明請參考 https://s.yimg.com/cv/apiv2/apiGuide/ProductAttributes.pdf

Attribute.n.Value

string (Optional)

商品屬性欄位內容

  • 可建立多組商品屬性資料
  • 一組商品屬性資料包含:Attribute.n.Name + Attribute.n.Value
  • 請將 parameter 中的 "n" 以數字代換
  • 食品類別填寫範例:Attribute.1.Value=F-170762591-00000&Attribute.2.Value=台灣&Attribute.3.Value=台灣
  • 更多說明請參考 https://s.yimg.com/cv/apiv2/apiGuide/ProductAttributes.pdf

ProductPromotion.n.Amount

int (Optional)

商品促銷方式 - 數量可建立多組商品促銷方式資料

一組商品屬性資料包含:ProductPromotion.n.Amount + ProductPromotion.n.Price

請將 parameter 中的 "n" 以數字代換,ex:ProductPromotion.1.Amount=5

ProductPromotion.n.Amount 必須大於 ProductPromotion.(n-1).Amount

ProductPromotion.n.Price

int (Optional)

商品促銷方式 - 價格

請將 parameter 中的 "n" 以數字代換,ex:ProductPromotion.1.Price=100

ProductPromotion.n.Price必須小於網路價,而且要小於ProductPromotion.(n-1).Price

IsTaxFree

int(Optional)

此商品是否為免稅商品

商店為免稅商店及商品刊登於免稅分類時,此設定才能被設定為1。(default:0)

當此設定為1時,就不得設定加購品

SpecTypeDimension

string (required)

商品規格, 為無規格、一階商品或是二階商品

  • 0: 無規格商品
  • 1: 商品規格為一階層
  • 2: 商品規格為二階層

CustomizedMainProductId

string (Optional)

商品主貨號 (商品無規格時適用)

Stock

string (Optional)

商品庫存量 (商品無規格時適用)

SaftyStock

string (Optional)

商品庫存最低警告量 (商品無規格時適用)

SpecDimension1

string (Optional)

商品規格名稱1 ex:顏色

SpecDimension2

string (Optional)

商品規格名稱2 ex:尺寸

SpecDimension1Description

string (Optional)

第一個商品規格名稱描述,可新增多筆,最多 40 筆。

ex:SpecDimension1Description=White&SpecDimension1Description=Yellow

注意:所有商品展開後,商品規格總數不得超過 60 種。

SpecDimension2Description

string (Optional)

第二個商品規格名稱描述,可新增多筆,最多 40 筆。

ex:SpecDimension2Description=XL&SpecDimension2Description=XS

注意:所有商品展開後,商品規格總數不得超過 60 種。

Sample Request:

https://tw.ews.mall.yahooapis.com/stauth/v2/Product/SubmitMain?SaleType=Normal&ProductName=%E6%B8%AC%E8%A9%A6API%E5%88%8A%E7%99%BB%E7%84%A1%E8%A6%8F%E6%A0%BC%E5%95%86%E5%93%810613&MallCategoryId=152984711&SalePrice=1&ShortDescription=%E6%B8%AC%E8%A9%A6%E5%95%86%E5%93%81%E4%B8%8D%E6%9C%83%E5%87%BA%E8%B2%A8%EF%BC%8C%E8%AB%8B%E5%8B%BF%E8%B3%BC%E8%B2%B7&PayTypeId=1&ShippingId=1&SpecTypeDimension=0&Stock=100&SaftyStock=1&Format=xml
                                   OR
https://tw.ews.mall.yahooapis.com/oauth/v2/Product/SubmitMain?SaleType=Normal&ProductName=%E6%B8%AC%E8%A9%A6API%E5%88%8A%E7%99%BB%E7%84%A1%E8%A6%8F%E6%A0%BC%E5%95%86%E5%93%810613&MallCategoryId=152984711&SalePrice=1&ShortDescription=%E6%B8%AC%E8%A9%A6%E5%95%86%E5%93%81%E4%B8%8D%E6%9C%83%E5%87%BA%E8%B2%A8%EF%BC%8C%E8%AB%8B%E5%8B%BF%E8%B3%BC%E8%B2%B7&PayTypeId=1&ShippingId=1&SpecTypeDimension=0&Stock=100&SaftyStock=1&Format=xml

Response fields

Field

Description

ProductId

商品編號 (string)

Mall給每一個商品的唯一商品編號

ErrorMsgList

包含此商品verify的error message list

ErrorMsg

包含一組error message

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response":{
    "@Status":"ok",
    "ProductId":"p098547550"
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <ProductId>p094947545</ProductId>
</Response>

Errors

ErrorCode

ErrorMessage

1310

Attribute: 商品屬性為非合法值

1311

Attribute: 商品屬性不可為空值

1351

商品總數超過上限

1352

加購品超出上限 {max addon limit}

1353

贈品超出上限 {max gift limit}

1354

當商品為免稅時,不可設定加購品

1355

非合法的商店代號

1356

Spec: 規格不可為空值

1371

Promotion: 數量與價錢必須是成對的值

1372

Attribute: 欄位名稱和欄位內容必須是成對的值

其它錯誤請參閱共用錯誤表


/v1/Product/UpdateAddon

更新單一加購品資料

Attribute

Value

API Name

更新單一加購品 (/Product/UpdateAddon)

API Desc

更新單一加購品資料

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/UpdateAddon OR https://tw.ews.mall.yahooapis.com/oauth/v1/Product/UpdateAddon

Change Log

*

Request parameters

Parameter

Value

Description

ProductId

string (16/Require)

商品編號

ProductName

string (150/Optional)

商品名稱

SalePrice

number (12,2/Optional)

網路價

賣場上的銷售價格

大於0 & 大於"成本價"

CostPrice

number (12,2/Optional)

成本價

ShortDescription

string (200/Optional)

商品簡述

Response fields

Field

Description

ProductId

商品編號 (string)

Mall給每一個商品的唯一商品編號

ErrorMsgList

包含此商品verify的error message list

ErrorMsg

包含一組error message

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response":{
    "@Status":"ok",
    "ProductId":"p098547550"
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <ProductId>p094947545</ProductId>
</Response>

Errors

ErrorCode

ErrorMessage

1351

商品總數超過上限

1355

非合法的商店代號

其它錯誤請參閱共用錯誤表


/v1/Product/SubmitVerifyAddon

驗證刊登的加購品內容

Attribute

Value

API Name

驗證加購品內容 (Product/SubmitVerifyAddon)

API Desc

驗證刊登的加購品內容格式以及資料是否有正確

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/SubmitVerifyAddon OR https://tw.ews.mall.yahooapis.com/oauth/v1/Product/SubmitVerifyAddon

Change Log

*

Request parameters

Parameter

Value

Description

ProductType

string (12/Require)

商品型態

  • Addon/Freebie
  • Addon:加購品
  • Freebie:贈品

ProductName

string (150/Require)

商品名稱

SalePrice

number (12,2/Require)

網路價

賣場上的銷售價格

大於0 & 大於"成本價"

CostPrice

number (12,2/Optional)

成本價

ShortDescription

string (200/Require)

商品簡述

SpecDescription

string (64/Require)

此欄位請帶入'-'

Stock

int (4/Require)

商品庫存量

可接受1~999

SaftyStock

int (4/Require)

商品安全庫存最低警告量

不可小於1

CustomizedProductId

string (90/Optional)

自訂貨號

Sample Request:

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/SubmitVerifyAddon?&Format=xml

Response fields

Field

Description

ErrorMsgList

包含此商品verify的error message list

ErrorMsg

包含一組error message

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response":{
    "@Status":"ok"
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
</Response>

Errors

ErrorCode

ErrorMessage

1351

商品總數超過上限

1355

非合法的商店代號

其它錯誤請參閱共用錯誤表


/v1/Product/SubmitAddon

刊登加購品

Attribute

Value

API Name

刊登加購品 (/Product/SubmitAddon)

API Desc

刊登加購品

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/SubmitAddon OR https://tw.ews.mall.yahooapis.com/oauth/v1/Product/SubmitAddon

Change Log

*

Request parameters

Parameter

Value

Description

ProductType

string (12/Require)

商品型態

  • Addon/Freebie
  • Addon:加購品
  • Freebie:贈品

ProductName

string (150/Require)

商品名稱

SalePrice

number (12,2/Require)

網路價

賣場上的銷售價格

大於0 & 大於"成本價"

CostPrice

number (12,2/Optional)

成本價

ShortDescription

string (200/Require)

商品簡述

Spec.1.Description

string (64/Require)

此欄位請帶入'-'

Spec.1.Stock

int (4/Require)

商品庫存量

可接受1~999

Spec.1.SaftyStock

int (4/Require)

商品安全庫存最低警告量

不可小於1

Spec.1.CustomizedProductId

string (90/Optional)

自訂貨號

Sample Request:

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/SubmitAddon?&Format=xml

Response fields

Field

Description

ProductId

商品編號 (string)

Mall給每一個商品的唯一商品編號

ErrorMsgList

包含此商品verify的error message list

ErrorMsg

包含一組error message

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response":{
    "@Status":"ok",
    "ProductId":"p098547550"
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <ProductId>p094947545</ProductId>
</Response>

Errors

ErrorCode

ErrorMessage

1351

商品總數超過上限

1355

非合法的商店代號

其它錯誤請參閱共用錯誤表


/v1/Product/SubmitVerifyFreebie

驗證刊登的贈品內容

Attribute

Value

API Name

驗證刊登的贈品內容 (/Product/SubmitVerifyFreebie)

API Desc

驗證刊登的贈品內容資料格式是否有錯誤

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/SubmitVerifyFreebie OR https://tw.ews.mall.yahooapis.com/oauth/v1/Product/SubmitVerifyFreebie

Change Log

*

Request parameters

Parameter

Value

Description

ProductType

string (12/Require)

商品型態

  • Addon/Freebie
  • Addon:加購品
  • Freebie:贈品

ProductName

string (150/Require)

商品名稱

SalePrice

number (12,2/Require)

網路價

賣場上的銷售價格

大於0 & 大於"成本價"

CostPrice

number (12,2/Optional)

成本價

ShortDescription

string (200/Require)

商品簡述

SpecDescription

string (64/Require)

此欄位請帶入'-'

Stock

int (4/Require)

商品庫存量

可接受1~999

SaftyStock

int (4/Require)

商品安全庫存最低警告量

不可小於1

CustomizedProductId

string (90/Optional)

自訂貨號

Response fields

Field

Description

ErrorMsgList

包含此商品verify的error message list

ErrorMsg

包含一組error message

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response":{
    "@Status":"ok"
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
</Response>

Errors

ErrorCode

ErrorMessage

1351

商品總數超過上限

1355

非合法的商店代號

其它錯誤請參閱共用錯誤表


/v1/Product/SubmitFreebie

刊登贈品

Attribute

Value

API Name

刊登贈品 (/Product/SubmitFreebie)

API Desc

刊登贈品

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/SubmitFreebie OR https://tw.ews.mall.yahooapis.com/oauth/v1/Product/SubmitFreebie

Change Log

*

Request parameters

Parameter

Value

Description

ProductType

string (12/Require)

商品型態

  • Addon/Freebie
  • Addon:加購品
  • Freebie:贈品

ProductName

string (150/Require)

商品名稱

SalePrice

number (12,2/Require)

網路價

賣場上的銷售價格

大於0 & 大於"成本價"

CostPrice

number (12,2/Optional)

成本價

ShortDescription

string (200/Require)

商品簡述

Spec.1.Description

string (64/Require)

此欄位請帶入'-'

Spec.1.Stock

int (4/Require)

商品庫存量

可接受1~999

Spec.1.SaftyStock

int (4/Require)

商品安全庫存最低警告量

不可小於1

Spec.1.CustomizedProductId

string (90/Optional)

自訂貨號

Sample Request:

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/SubmitFreebie?&Format=xml

Response fields

Field

Description

ProductId

商品編號 (string)

Mall給每一個商品的唯一商品編號

ErrorMsgList

包含此商品verify的error message list

ErrorMsg

包含一組error message

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <ProductId>p094947545</ProductId>
</Response>

Errors

ErrorCode

ErrorMessage

1351

商品總數超過上限

1355

非合法的商店代號

其它錯誤請參閱共用錯誤表


/v1/Product/UploadImage

商品圖片上傳

Attribute

Value

API Name

圖片上傳 (/Product/UploadImage)

API Desc

商品圖片上傳 Category 資訊

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/UploadImage OR https://tw.ews.mall.yahooapis.com/oauth/v1/Product/UploadImage

Change Log

*

簽章製作只需針對以下參數來製作 ApiKey,TimeStamp,MainImage,ProductId,Format,Purge

圖檔上傳容量限制:單個圖檔限制:3MB,一次上傳最大量: 10MB

Request parameters

Parameter

Value

Description

ProductId

string(Required)

商品編號

ImageFile[n]

File (Required)

Image Filename n: 1~10

主商品:10張

加購品:1 張

贈品: 1張

  • 此參數不加入簽章(Signature)運算

更多說明請參考

https://s.yimg.com/cv/apiv2/apiGuide/UploadImageSampleCodePHP.pdf

MainImage

string(Optional)

商品主圖的 ImageFile

Image Filename: ImageFile1~ImageFile10

主商品:1~10

加購品:1 (default value)

贈品: 1 (default value)

Purge

string(Optional)

true:將該商品之前上傳所有圖片刪除,保留此次上傳的圖片

false:不清除商品之前上傳的所有圖片

Sample Request:

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/UploadImage?ProductId=p0740162419939&MainImage=ImageFile1&Purge=false&Format=xml
                                   OR
https://tw.ews.mall.yahooapis.com/oauth/v1/Product/UploadImage?ProductId=p0740162419939&MainImage=ImageFile1&Purge=false&Format=xml

Response fields

Field

Description

SuccessList

成功的圖片列表

Image

成功圖片資訊(Name: 圖片名稱;IsMainImage: 是否為商品主圖;FileName: 上傳後的圖檔檔名)

FailList

上傳失敗列表

Image

失敗圖片資訊(Name: 圖片名稱)

PicList

上傳後的商品圖列表

ImageName

上傳後的圖檔檔名

ErrorCode

錯誤代碼

ErrorMessage

錯誤訊息

Sample response

JSON sample

{
  "Response": {
    "@Status": "ok",
    "SuccessList": {
      "Image": [
        {
          "@Name": "ImageFile1",
          "@IsMainImage": "false",
          "@FileName": "p094917013-item-0144xf2x0600x0366-m.jpg"
        },
        {
          "@Name": "ImageFile2",
          "@IsMainImage": "false",
          "@FileName": "p094917013-item-5276xf2x0600x0366-m.jpg"
        },
        {
          "@Name": "ImageFile3",
          "@IsMainImage": "false",
          "@FileName": "p094917013-item-4588xf2x0600x0366-m.jpg"
        },
        {
          "@Name": "ImageFile4",
          "@IsMainImage": "false",
          "@FileName": "p094917013-item-0443xf2x0600x0366-m.jpg"
        },
        {
          "@Name": "ImageFile5",
          "@IsMainImage": "false",
          "@FileName": "p094917013-item-2616xf2x0600x0366-m.jpg"
        },
        {
          "@Name": "ImageFile6",
          "@IsMainImage": "false",
          "@FileName": "p094917013-item-0657xf2x0600x0366-m.jpg"
        },
        {
          "@Name": "ImageFile7",
          "@IsMainImage": "false",
          "@FileName": "p094917013-item-5190xf1x0600x0366-m.jpg"
        },
        {
          "@Name": "ImageFile8",
          "@IsMainImage": "false",
          "@FileName": "p094917013-item-4015xf2x0600x0366-m.jpg"
        },
        {
          "@Name": "ImageFile9",
          "@IsMainImage": "false",
          "@FileName": "p094917013-item-2541xf1x0600x0366-m.jpg"
        },
        {
          "@Name": "ImageFile10",
          "@IsMainImage": "false",
          "@FileName": "p094917013-item-8575xf2x0600x0366-m.jpg"
        }
      ]
    },
    "FailList": [

    ],
    "PicList": {
      "ImageName": [
        "p094917013-item-0144xf2x0600x0366-m.jpg",
        "p094917013-item-5276xf2x0600x0366-m.jpg",
        "p094917013-item-4588xf2x0600x0366-m.jpg",
        "p094917013-item-0443xf2x0600x0366-m.jpg",
        "p094917013-item-2616xf2x0600x0366-m.jpg",
        "p094917013-item-0657xf2x0600x0366-m.jpg",
        "p094917013-item-5190xf1x0600x0366-m.jpg",
        "p094917013-item-4015xf2x0600x0366-m.jpg",
        "p094917013-item-2541xf1x0600x0366-m.jpg",
        "p094917013-item-8575xf2x0600x0366-m.jpg"
      ]
    }
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <SuccessList>
    <Image Name="ImageFile1" IsMainImage="false" FileName="p094917009-item-8858xf2x0600x0366-m.jpg"/>
    <Image Name="ImageFile2" IsMainImage="false" FileName="p094917009-item-6278xf2x0600x0366-m.jpg"/>
    <Image Name="ImageFile3" IsMainImage="false" FileName="p094917009-item-6115xf1x0600x0366-m.jpg"/>
    <Image Name="ImageFile4" IsMainImage="false" FileName="p094917009-item-5652xf2x0600x0366-m.jpg"/>
    <Image Name="ImageFile5" IsMainImage="false" FileName="p094917009-item-4860xf2x0600x0366-m.jpg"/>
    <Image Name="ImageFile6" IsMainImage="false" FileName="p094917009-item-7255xf2x0600x0366-m.jpg"/>
    <Image Name="ImageFile7" IsMainImage="false" FileName="p094917009-item-5151xf1x0600x0366-m.jpg"/>
    <Image Name="ImageFile8" IsMainImage="false" FileName="p094917009-item-4881xf1x0600x0366-m.jpg"/>
    <Image Name="ImageFile9" IsMainImage="false" FileName="p094917009-item-9061xf2x0600x0366-m.jpg"/>
    <Image Name="ImageFile10" IsMainImage="false" FileName="p094917009-item-2393xf1x0600x0366-m.jpg"/>
  </SuccessList>
  <PicList>
    <ImageName>p094917009-item-8858xf2x0600x0366-m.jpg</ImageName>
    <ImageName>p094917009-item-6278xf2x0600x0366-m.jpg</ImageName>
    <ImageName>p094917009-item-6115xf1x0600x0366-m.jpg</ImageName>
    <ImageName>p094917009-item-5652xf2x0600x0366-m.jpg</ImageName>
    <ImageName>p094917009-item-4860xf2x0600x0366-m.jpg</ImageName>
    <ImageName>p094917009-item-7255xf2x0600x0366-m.jpg</ImageName>
    <ImageName>p094917009-item-5151xf1x0600x0366-m.jpg</ImageName>
    <ImageName>p094917009-item-4881xf1x0600x0366-m.jpg</ImageName>
    <ImageName>p094917009-item-9061xf2x0600x0366-m.jpg</ImageName>
    <ImageName>p094917009-item-2393xf1x0600x0366-m.jpg</ImageName>
  </PicList>
</Response>

Sample Code (PHP)

請按此 參考PHP Sample Code 及相關參數說明。

Errors

ErrorCode

ErrorMessage

1101

無上傳檔案

1156

圖片檔案大小太大{max size} bytes

1157

圖片寬度太大。最大為 {max size}

1158

圖片高度太大。最大為 {max size}

1159

圖片格式錯誤

1160

圖片格式不支援

1161

檔案編號取得失敗

1162

縮圖製作失敗

1163

系統錯誤(權限問題)

1164

系統錯誤(未知的錯誤)

1171

超過圖片上傳數量

其它錯誤請參閱共用錯誤表


/v1/Product/GetMainList

取得商店的主商品列表資料

Attribute

Value

API Name

取得主商品列表 (/Product/GetMainList)

API Desc

取得商店主商品列表資料

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/GetMainList OR https://tw.ews.mall.yahooapis.com/oauth/v1/Product/GetMainList

Change Log

*

Request parameters

Parameter

Value

Description

StoreCategoryId

string(Optional)

需填入leaf層的category Id (空值代表不分類別)

ProductStatus

string(14/Optional)

商品狀態 (空值代表不分狀態)

  • Online:上架中
  • OnlineLowstock:上架中低庫存
  • OnlineNostock:上架中無庫存
  • OnlineOffByReserve:上架中已到期
  • OfflineWaitByReserve:已預約上架
  • Offline:已下架
  • NotOnline:未上架

Keyword

string(Optional)

根據關鍵字進行 商品名稱 的搜尋

OrderBy

string(Optional)

列表資料依據 更新時間 的排列順序

  • Desc:降冪排列(預設值)
  • Asc:升冪排列

Position

int(Require)

由第幾筆開始拿資料

Count

int(Require)

資料筆數

Count=1~100

Response fields

Field

Description

MainList

包含此商店的Main Product List,屬性:

  • Count:資料筆數

TotalCount

符合StoreCategoryId和ProductStatus的總資料筆數

Main

包含一筆Main Product的資料,屬性:

  • Id :商品編號

Name

商品名稱 (string/150)

SalePrice

網路價 (number/12,2)

賣場上的銷售價格,當 ProductType=Freebie 時 SalePrice=Null

CostPrice

成本價 (number/12,2)

SpecList

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

Spec

包含一筆Main Product的規格:

  • Id :商品編號

SpecDescription

型號說明

CustomizeId

自訂貨號 (string)

CurrentStock

商品目前庫存量 (int)

SaftyStock

商品安全庫存最低警告量 (int)

Sample response

JSON sample

{
  "Response": {
    "@Status": "ok",
    "TotalCount": "25",
    "MainList": {
      "@Count": 3,
      "Product": [
        {
          "Main": {
            "@Id": "p094910899",
            "Name": "peter test 2009-12-23",
            "SalePrice": 333,
            "CostPrice": 0,
            "Spec": [
              {
                "@Id": 1,
                "SpecDescription ": "-",
                "CustomizeId": "",
                "CurrentStock": 3,
                "SaftyStock": 1
              }
            ]
          }
        },
        {
          "Main": {
            "@Id": "p094910600",
            "Name": "ZAKKA idea- \u52d5\u7269\u5c0f\u4e16\u754c\u58c1\u8cbc-\u8eb2\u96e8\u5927\u8c61",
            "SalePrice": 399,
            "CostPrice": 0,
            "Spec": [
              {
                "@Id": 1,
                "SpecDescription ": "-",
                "CustomizeId": "",
                "CurrentStock": 996,
                "SaftyStock": 1
              }
            ]
          }
        },
        {
          "Main": {
            "@Id": "p094910584",
            "Name": "\u5317\u6d77\u73cd\u73e0\u9805\u934a~\u5927\u512a\u5f85",
            "SalePrice": 1800,
            "CostPrice": 0,
            "Spec": [
              {
                "@Id": 1,
                "SpecDescription ": "\u7d2b",
                "CustomizeId": "",
                "CurrentStock": 91,
                "SaftyStock": 1
              },
              {
                "@Id": 2,
                "SpecDescription ": "\u767d",
                "CustomizeId": "",
                "CurrentStock": 88,
                "SaftyStock": 1
              },
              {
                "@Id": 3,
                "SpecDescription ": "\u7c89",
                "CustomizeId": "",
                "CurrentStock": 99,
                "SaftyStock": 1
              }
            ]
          }
        }
      ]
    }
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <TotalCount>25</TotalCount>
  <MainList Count="3">
    <Product>
      <Main Id="p094910899">
        <Name>peter test 2009-12-23</Name>
        <SalePrice>333</SalePrice>
        <CostPrice>0</CostPrice>
        <Spec Id="1">
          <SpecDescription>-</SpecDescription>
          <CustomizeId/>
          <CurrentStock>3</CurrentStock>
          <SaftyStock>1</SaftyStock>
        </Spec>
      </Main>
    </Product>
    <Product>
      <Main Id="p094910600">
        <Name>ZAKKA idea- 動物小世界壁貼-躲雨大象</Name>
        <SalePrice>399</SalePrice>
        <CostPrice>0</CostPrice>
        <Spec Id="1">
          <SpecDescription>-</SpecDescription>
          <CustomizeId/>
          <CurrentStock>996</CurrentStock>
          <SaftyStock>1</SaftyStock>
        </Spec>
      </Main>
    </Product>
    <Product>
      <Main Id="p094910584">
        <Name>北海珍珠項鍊~大優待</Name>
        <SalePrice>1800</SalePrice>
        <CostPrice>0</CostPrice>
        <Spec Id="1">
          <SpecDescription>紫</SpecDescription>
          <CustomizeId/>
          <CurrentStock>91</CurrentStock>
          <SaftyStock>1</SaftyStock>
        </Spec>
        <Spec Id="2">
          <SpecDescription>白</SpecDescription>
          <CustomizeId/>
          <CurrentStock>88</CurrentStock>
          <SaftyStock>1</SaftyStock>
        </Spec>
        <Spec Id="3">
          <SpecDescription>粉</SpecDescription>
          <CustomizeId/>
          <CurrentStock>99</CurrentStock>
          <SaftyStock>1</SaftyStock>
        </Spec>
      </Main>
    </Product>
  </MainList>
</Response>

Errors

ErrorCode

ErrorMessage

1801

StoreCategoryId為空值

1802

ProductStatus為空值

1803

Position為空值或非數字

1804

Count為空值或非數字

1805

StoreCategoryId並不存在

1806

非法的ProductStatus


/v2/Product/GetMainList (Beta)

此功能為測試版,名稱與參數仍有可能變動

取得商店的主商品列表資料 (接續讀取版,無商品數上限)

Attribute

Value

API Name

取得主商品列表 (/Product/GetMainList)

API Desc

取得商店主商品列表資料

與 v1 的差異是:不能以 Keyword 進行過濾、不能指定排序,但可取回 所有商品資料而不受總數限制

Version

2

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v2/Product/GetMainList OR https://tw.ews.mall.yahooapis.com/oauth/v2/Product/GetMainList

Change Log

*

Request parameters

Parameter

Value

Description

ProductStatus

string(14/Optional)

商品狀態 (空值代表不分狀態)

  • Online:上架中
  • Offline:已下架
  • NotOnline:未上架

AfterProductId

string(Optional)

從這筆 Product ID 的下一筆開始 取得商品資料 (回傳資料將不包含這筆 Product ID)

若未傳遞則從頭開始取得

Position

int(Optional)

由第幾筆開始拿資料

Count

int(Require)

此次最多取回資料筆數

Count=1~500

Response fields

Field

Description

MainList

包含此商店的 Main Product List

筆數可能小於指定的 Count,就算小於指定的 Count 只要有回應 Continuation 就代表資料尚未結束,必須繼續讀取

  • @Count: 此次回傳的筆數
  • Product: 內含 @Count 筆 Main Product entry 項目

LastProductId

此次回傳的最後一筆 Product ID (string)

下次呼叫傳遞完全相同參數且帶此值給 AfterProductId 就會繼續 取得後面的商品資料

Total

符合ProductStatus的總資料筆數

Main Product entry

Field

Description

Main

代表一筆主商品,內含下列 Product entry 欄位

Product entry

Field

Description

@Id

商品編號 (string/16)

Name

商品名稱 (string/150)

Barcode

商品條碼 (string/16)

CostPrice

成本價 (number/12,2)

MarketPrice

商品市價 (number/12,2)

SalePrice

網路價 (number/12,2)

ReserveOnlineTime

預約上架時間 (timestamp)

ReserveOfflineTime

預約下架時間 (timestamp)

Spec

規格列表,內含下列 Spec entry 構成的 list

  • 已預約上架: ProductStatus == OFFLINE 且 ReserveOnlineTime != 0
  • 上架中已到期: ProductStatus == ONLINE 且 ReserveOfflineTime != 0 且 ReserveOfflineTime < NOW
Spec entry

Field

Description

@Id

規格編號 (int)

SpecDescription

型號說明 (string/64)

CustomizeId

自訂貨號 (string/90)

CurrentStock

商品目前庫存量 (int)

SaftyStock

商品安全庫存最低警告量 (int)

Barcode

商品條碼 (string/16)

Sample Response

{
  "Response": {
    "@Status": "ok",
    "MainList": {
      "@Count": 2,
      "Product": [
        {
          "Main": {
            "@Id": "p0275131621",
            "Name": "1測試賣場僅提供測試人員使用,商品內容與商品皆為測試使用, 所有訂單一律取消",
            "SalePrice": 100,
            "CostPrice": 0,
            "MarketPrice": 0,
            "Barcode": "",
            "ReserveOnlineTime": 0,
            "ReserveOfflineTime": 0,
            "Spec": [
              {
                "@Id": 1,
                "SpecDescription ": "-",
                "CustomizeId": "",
                "CurrentStock": 0,
                "SaftyStock": 2,
                "Barcode": ""
              }
            ]
          }
        },
        {
          "Main": {
            "@Id": "p0275131622",
            "Name": "2測試賣場僅提供測試人員使用,商品內容與商品皆為測試使用, 所有訂單一律取消",
            "SalePrice": 100,
            "CostPrice": 0,
            "MarketPrice": 0,
            "Barcode": "",
            "ReserveOnlineTime": 0,
            "ReserveOfflineTime": 0,
            "Spec": [
              {
                "@Id": 1,
                "SpecDescription ": "-",
                "CustomizeId": "",
                "CurrentStock": 0,
                "SaftyStock": 2,
                "Barcode": ""
              }
            ]
          }
        }
      ]
    },
    "Total": 20,
    "LastProductId": "p0275131622"
  }
}

/v3/Product/GetMain (New)

取得單一主商品資料

Attribute

Value

API Name

取得商品資料 (/Product/GetMain)

API Desc

取得單一主商品資料

Version

3

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v3/Product/GetMain OR https://tw.ews.mall.yahooapis.com/oauth/v3/Product/GetMain

Change Log

  • 2011/09 Init Version.

Request parameters

Parameter

Value

Description

ProductId

string(16/Require)

商品編號

DispLongDesc

string(16/Optional)

yes: 顯示詳細說明 no: 不顯示詳細說明 未帶入此參數或是設定為 yes 時,API response 會包含詳細說明

Response fields

Field

Description

ProductId

商品編號 Mall給每一個商品的唯一商品編號

SaleType

商品銷售方式

  • Normal/PreSaleByShipDate/PreSaleByShipdays
  • Normal:一般方式(現貨銷售)
  • PreSaleByShipDate:DATE 預購 by shipDate(指定出貨日期)
  • PreSaleByShipdays:DAYS 預購 by shipdays(訂購後多少天出貨)

SaleTypeInfo

商品銷售資訊

  • Normal:empty this field
  • PreSaleByShipDate: Date(2009/11/30)
  • PreSaleByShipdays:Days(20)

ProductStatus

商品狀態

  • Online:上架中
  • OnlineLowstock:上架中低庫存
  • OnlineNostock:上架中無庫存
  • Offline:已下架
  • CcBlock:客服下架
  • Delete:刪除
  • NotOnline:未上架

ProductName

商品名稱

MallCategoryId

商品歸類

可能有多筆StoreCategoryId=1234&StoreCategoryId=1235

MarketPrice

商品市價

SalePrice

網路價

CostPrice

成本價

MaxBuyNum

最高購買數量

1~100,商品一次最多可被購買的數量(default:30)

ShortDescription

商品簡述

VideoPath

商品影音檔Path符合youtube短網址

LongDescription

商品介紹

LinkAddonList

加購品列表

LinkFreebieList

贈品列表

PayTypeIdList

付款方式代號列表

ShippingIdList

物流方式代號列表

ImageList

包含此商品的商品圖list

Name

商品圖名稱

IsMainImage

是否為商品主圖true:是商品主圖

false:不是商品主圖

ImageUrl

商品圖Url

FullSizeImageUrl

商品大圖Url

SpecList

包含此商品的規格list

@Id

商品規格編號

SpecDescription

商品規格此商品沒有spec,此欄位顯示'-'

CurrentStock

商品庫存量1~999

SaftySock

商品安全庫存最低警告量

CustomizedProductId

自訂貨號

BarCode

商品條碼

IsConsignedItem

商品是否入倉

AttributeList

包含此商品的屬性list

Name

商品屬性名稱

Content

商品屬性欄位內容依據getMallCategory中的AttributeSpec填

PromotionList

包含此商品的促銷方式list

Amount

商品促銷方式 - 數量商品促銷方式的數量,數量必須大於(n-1).amount

Price

商品促銷方式 - 價格商品促銷方式的價格,價格必須小於網路價,而且要比小於(n-1).price

SpecDimension1

商品規格名稱一

SpecDimension2

商品規格名稱二

CustomizedMainProductId

商品主貨號

SpecTypeDimension

商品規格 (0: 無規格商品, 1: 一個規格商品, 2: 二個規格商品)

StoreCategoryList

商店自訂分類列表

Sample response

JSON sample

{
  "Response": {
    "@Status": "ok", 
    "Product": {
      "CostPrice": 0, 
      "CustomizedMainProductId": "A-12345", 
      "ImageList": {
        "Image": [
          {
            "FullSizeImageUrl": "https://tw.bid.yimg.com/pimg2/64/3b/p09491457373-item-9292xf2x0600x0553-m.jpg",
            "ImageUrl": "https://tw.bid.yimg.com/pimg2/52/52/p09491457373-item-9292xf2x0600x0553-s.jpg", 
            "IsMainImage": "true", 
            "Name": "p09491457373-item-9292xf2x0600x0553-m.jpg"
          }, 
          {
            "FullSizeImageUrl": "https://tw.bid.yimg.com/pimg2/c1/38/p09491457373-item-5969xf2x0507x0600-m.jpg",
            "ImageUrl": "https://tw.bid.yimg.com/pimg2/dd/56/p09491457373-item-5969xf2x0507x0600-s.jpg", 
            "IsMainImage": "false", 
            "Name": "p09491457373-item-5969xf2x0507x0600-m.jpg"
          }, 
          {
            "FullSizeImageUrl": "https://tw.bid.yimg.com/pimg2/41/39/p09491457373-item-1109xf2x0507x0600-m.jpg",
            "ImageUrl": "https://tw.bid.yimg.com/pimg2/32/d9/p09491457373-item-1109xf2x0507x0600-s.jpg", 
            "IsMainImage": "false", 
            "Name": "p09491457373-item-1109xf2x0507x0600-m.jpg"
          }
        ]
      }, 
      "IsTaxFree": 0, 
      "LinkAddonList": {
        "LinkAddon": [
          {
            "@Id": "p09491436060", 
            "Desc": "YIV_FILTER_STRIPPEDYIV_FILTER_STRIPPED", 
            "Image": {
              "FullSizeImageUrl": "", 
              "ImageUrl": ""
            }, 
            "ProductStatus": "Online", 
            "_Title": "\u6e2c\u8a66\u52a0\u8cfc\u54c12015"
          }
        ]
      }, 
      "LinkFreebieList": {
        "LinkFreebie": [
          {
            "@Id": "p09491435984", 
            "Desc": "test", 
            "Image": {
              "FullSizeImageUrl": "", 
              "ImageUrl": ""
            }, 
            "ProductStatus": "Online", 
            "_Title": "\u6eff\u4ef6\u9001"
          }
        ]
      }, 
      "MallCategoryId": 152984610, 
      "MarketPrice": 10, 
      "MaxBuyNum": 20, 
      "PayTypeIdList": {
        "PayTypeId": [
          {
            "@Id": 1
          }, 
          {
            "@Id": 2
          }, 
          {
            "@Id": 4
          }, 
          {
            "@Id": 5
          }, 
          {
            "@Id": 6
          }, 
          {
            "@Id": 7
          }, 
          {
            "@Id": 8
          }, 
          {
            "@Id": 9
          }, 
          {
            "@Id": 10
          }, 
          {
            "@Id": 11
          }
        ]
      }, 
      "ProductId": "p09491457373", 
      "ProductStatus": "NotOnline", 
      "SalePrice": 10, 
      "SaleType": "Normal", 
      "SaleTypeInfo": "", 
      "ShippingIdList": {
        "ShippingId": [
          {
            "@Id": 1
          }, 
          {
            "@Id": 2
          }, 
          {
            "@Id": 3
          }, 
          {
            "@Id": 80
          }
        ]
      }, 
      "SpecDimensionList": {
        "SpecDimension": [
          {
            "@Id": 1, 
            "DescriptionList": {
              "Description": [
                {
                  "@Id": 1, 
                  "_Name": "\u7d05\u8272"
                }, 
                {
                  "@Id": 2, 
                  "_Name": "\u9ec3\u8272"
                }
              ]
            }
          }, 
          {
            "@Id": 2, 
            "DescriptionList": {
              "Description": [
                {
                  "@Id": 1, 
                  "_Name": "L"
                }
              ]
            }
          }
        ]
      }, 
      "SpecList": {
        "Spec": [
          {
            "@Id": 1, 
            "CurrentStock": 1, 
            "CustomizedProductId": "Q-1234",
            "BarCode": "12341234",            
            "DimensionList": {
              "Dimension": [
                {
                  "@Id": 1, 
                  "Description": {
                    "@Id": 1
                  }
                }, 
                {
                  "@Id": 2, 
                  "Description": {
                    "@Id": 1
                  }
                }
              ]
            }, 
            "SaftyStock": 1, 
            "Stock": 1, 
            "_SpecDescription": "\u7d05\u8272/L"
          }, 
          {
            "@Id": 2, 
            "CurrentStock": 1, 
            "CustomizedProductId": "Q-5678", 
            "BarCode": "50345234",
            "DimensionList": {
              "Dimension": [
                {
                  "@Id": 1, 
                  "Description": {
                    "@Id": 2
                  }
                }, 
                {
                  "@Id": 2, 
                  "Description": {
                    "@Id": 1
                  }
                }
              ]
            }, 
            "SaftyStock": 1, 
            "Stock": 1, 
            "_SpecDescription": "\u9ec3\u8272/L"
          }
        ]
      }, 
      "SpecTypeDimension": 2, 
      "StoreCategoryList": "", 
      "_LongDescription": "\u5546\u54c1\u4ecb\u7d39\u5340\u57df\n", 
      "_ProductName": "API \u7bc4\u4f8b\u6e2c\u8a66\u5546\u54c1", 
      "_ShortDescription": "\u5546\u54c1\u7c21\u8ff0\u5340\u57df", 
      "_SpecDimension1": "\u984f\u8272", 
      "_SpecDimension2": "\u5c3a\u5bf8", 
      "_VideoPath": ""
    }
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
    <Response Status="ok">
        <Product>
            <ProductId>p09491457373</ProductId>
            <ProductStatus>NotOnline</ProductStatus>
            <SpecDimensionList>
                <SpecDimension Id="1">
                    <DescriptionList>
                        <Description Id="1">
                            <Name>
                                <![CDATA[紅色]]>
                            </Name>
                        </Description>
                        <Description Id="2">
                            <Name>
                                <![CDATA[黃色]]>
                            </Name>
                        </Description>
                    </DescriptionList>
                </SpecDimension>
                <SpecDimension Id="2">
                    <DescriptionList>
                        <Description Id="1">
                            <Name>
                                <![CDATA[L]]>
                            </Name>
                        </Description>
                    </DescriptionList>
                </SpecDimension>
            </SpecDimensionList>
            <SaleType>Normal</SaleType>
            <SaleTypeInfo>
            </SaleTypeInfo>
            <MallCategoryId>152984610</MallCategoryId>
            <StoreCategoryList>
            </StoreCategoryList>
            <CustomizedMainProductId>A-12345</CustomizedMainProductId>
            <SpecTypeDimension>2</SpecTypeDimension>
            <MarketPrice>10</MarketPrice>
            <SalePrice>10</SalePrice>
            <CostPrice>0</CostPrice>
            <MaxBuyNum>20</MaxBuyNum>
            <ShippingIdList>
                <ShippingId Id="1">
                </ShippingId>
                <ShippingId Id="2">
                </ShippingId>
                <ShippingId Id="3">
                </ShippingId>
                <ShippingId Id="80">
                </ShippingId>
            </ShippingIdList>
            <PayTypeIdList>
                <PayTypeId Id="1">
                </PayTypeId>
                <PayTypeId Id="2">
                </PayTypeId>
                <PayTypeId Id="4">
                </PayTypeId>
                <PayTypeId Id="5">
                </PayTypeId>
                <PayTypeId Id="6">
                </PayTypeId>
                <PayTypeId Id="7">
                </PayTypeId>
                <PayTypeId Id="8">
                </PayTypeId>
                <PayTypeId Id="9">
                </PayTypeId>
                <PayTypeId Id="10">
                </PayTypeId>
                <PayTypeId Id="11">
                </PayTypeId>
            </PayTypeIdList>
            <LinkAddonList>
                <LinkAddon Id="p09491436060">
                    <Title>
                        <![CDATA[測試加購品2015]]>
                    </Title>
                    <Image>
                        <FullSizeImageUrl>
                        </FullSizeImageUrl>
                        <ImageUrl>
                        </ImageUrl>
                    </Image>
                    <Desc>YIV_FILTER_STRIPPEDYIV_FILTER_STRIPPED</Desc>
                    <ProductStatus>Online</ProductStatus>
                </LinkAddon>
            </LinkAddonList>
            <LinkFreebieList>
                <LinkFreebie Id="p09491435984">
                    <Title>
                        <![CDATA[滿件送]]>
                    </Title>
                    <Image>
                        <FullSizeImageUrl>
                        </FullSizeImageUrl>
                        <ImageUrl>
                        </ImageUrl>
                    </Image>
                    <Desc>test</Desc>
                    <ProductStatus>Online</ProductStatus>
                </LinkFreebie>
            </LinkFreebieList>
            <ImageList>
                <Image>
                    <Name>p09491457373-item-9292xf2x0600x0553-m.jpg</Name>
                    <IsMainImage>true</IsMainImage>
                    <ImageUrl>https://tw.bid.yimg.com/pimg2/52/52/p09491457373-item-9292xf2x0600x0553-s.jpg</ImageUrl>
                    <FullSizeImageUrl>http://tw.bid.yimg.com/pimg2/64/3b/p09491457373-item-9292xf2x0600x0553-m.jpg</FullSizeImageUrl>
                </Image>
                <Image>
                    <Name>p09491457373-item-5969xf2x0507x0600-m.jpg</Name>
                    <IsMainImage>false</IsMainImage>
                    <ImageUrl>https://tw.bid.yimg.com/pimg2/dd/56/p09491457373-item-5969xf2x0507x0600-s.jpg</ImageUrl>
                    <FullSizeImageUrl>http://tw.bid.yimg.com/pimg2/c1/38/p09491457373-item-5969xf2x0507x0600-m.jpg</FullSizeImageUrl>
                </Image>
                <Image>
                    <Name>p09491457373-item-1109xf2x0507x0600-m.jpg</Name>
                    <IsMainImage>false</IsMainImage>
                    <ImageUrl>https://tw.bid.yimg.com/pimg2/32/d9/p09491457373-item-1109xf2x0507x0600-s.jpg</ImageUrl>
                    <FullSizeImageUrl>https://tw.bid.yimg.com/pimg2/41/39/p09491457373-item-1109xf2x0507x0600-m.jpg</FullSizeImageUrl>
                </Image>
            </ImageList>
            <IsTaxFree>0</IsTaxFree>
            <ProductName>
                <![CDATA[API 範例測試商品]]>
            </ProductName>
            <ShortDescription>
                <![CDATA[商品簡述區域]]>
            </ShortDescription>
            <VideoPath>
                <![CDATA[]]>
            </VideoPath>
            <LongDescription>
                <![CDATA[商品介紹區域
                ]]>
            </LongDescription>
            <SpecDimension1>
                <![CDATA[顏色]]>
            </SpecDimension1>
            <SpecDimension2>
                <![CDATA[尺寸]]>
            </SpecDimension2>
            <SpecList>
                <Spec Id="1">
                    <SpecDescription>
                        <![CDATA[紅色/L]]>
                    </SpecDescription>
                    <CustomizedProductId>Q-1234</CustomizedProductId>
                    <BarCode>12341234</BarCode>
                    <CurrentStock>1</CurrentStock>
                    <SaftyStock>1</SaftyStock>
                    <Stock>1</Stock>
                    <DimensionList>
                        <Dimension Id="1">
                            <Description Id="1">
                            </Description>
                        </Dimension>
                        <Dimension Id="2">
                            <Description Id="1">
                            </Description>
                        </Dimension>
                    </DimensionList>
                </Spec>
                <Spec Id="2">
                    <SpecDescription>
                        <![CDATA[黃色/L]]>
                    </SpecDescription>
                    <CustomizedProductId>Q-5678</CustomizedProductId>
                    <BarCode>50345234</BarCode>
                    <CurrentStock>1</CurrentStock>
                    <SaftyStock>1</SaftyStock>
                    <Stock>1</Stock>
                    <DimensionList>
                        <Dimension Id="1">
                            <Description Id="2">
                            </Description>
                        </Dimension>
                        <Dimension Id="2">
                            <Description Id="1">
                            </Description>
                        </Dimension>
                    </DimensionList>
                </Spec>
            </SpecList>
        </Product>
    </Response>

Errors

ErrorCode

ErrorMessage

1384

商品編號非主商品

其它錯誤請參閱共用錯誤表


/v1/Product/GetAddon

取得單一加購品資料

Attribute

Value

API Name

取得加購品資料 (/Product/GetAddon)

API Desc

取得單一加購品資料

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/GetAddon OR https://tw.ews.mall.yahooapis.com/oauth/v1/Product/GetAddon

Change Log

*

Request parameters

Parameter

Value

Description

ProductId

string(16/Require)

商品編號

Response fields

Field

Description

ProductId

商品編號 Mall給每一個商品的唯一商品編號

ProductStatus

商品狀態

  • Online:上架中
  • OnlineLowstock:上架中低庫存
  • OnlineNostock:上架中無庫存
  • Offline:已下架
  • CcBlock:客服下架
  • Delete:刪除
  • NotOnline:未上架

ProductName

商品名稱

ImageMain

商品主圖

縮圖url

MarketPrice

商品市價

SalePrice

網路價

CostPrice

成本價

ShortDescription

商品簡述

SpecList

包含此商品的規格list

@Id

商品規格編號

SpecDescription

商品規格此商品沒有spec,此欄位顯示'-'

CurrentStock

商品庫存量1~999

SaftySock

商品安全庫存最低警告量

CustomizedProductId

自訂貨號

Sample response

JSON sample

{ "Response" : { "@Status" : "ok",
      "Product" : { "CostPrice" : 100,
          "ImageMain" : "https://b-iu101.ac.tw1.yahoo.com/pimg1/c0/05/p09498618-itema-1991xf1x0300x0183-s.jpg",
          "MarketPrice" : 0,
          "ProductId" : "p09498618",
          "ProductName" : "清涼櫻花剉冰111",
          "ProductStatus" : "Online",
          "SalePrice" : 200,
          "ShortDescription" : "白玉櫻花剉冰~清涼退火又消暑",
          "spec" : [ { "@Id" : 1,
                "CurrentStock" : 300,
                "CustomizedProductId" : "",
                "SpecDescription " : "-",
                "Stock" : 1
              } ]
        }
    } }

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <Product>
    <ProductId>p09498618</ProductId>
    <ProductStatus>Online</ProductStatus>
    <ProductName>清涼櫻花剉冰111</ProductName>
    <ShortDescription>白玉櫻花剉冰~清涼退火又消暑</ShortDescription>
    <spec Id="1">
      <SpecDescription>-</SpecDescription>
      <CustomizedProductId/>
      <CurrentStock>300</CurrentStock>
      <Stock>1</Stock>
    </spec>
    <ImageMain>https://b-iu101.ac.tw1.yahoo.com/pimg1/c0/05/p09498618-itema-1991xf1x0300x0183-s.jpg</ImageMain>
    <MarketPrice>0</MarketPrice>
    <SalePrice>200</SalePrice>
    <CostPrice>100</CostPrice>
  </Product>
</Response>

Errors

ErrorCode

ErrorMessage

1385

商品編號非加購品

其它錯誤請參閱共用錯誤表


/v1/Product/GetFreebie

取得單一贈品資料

Attribute

Value

API Name

取得贈品資料 (/Product/GetFreebie)

API Desc

取得單一贈品資料

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/GetFreebie OR https://tw.ews.mall.yahooapis.com/oauth/v1/Product/GetFreebie

Change Log

*

Request parameters

Parameter

Value

Description

ProductId

string(16/Require)

商品編號

Response fields

Field

Description

ProductId

商品編號 Mall給每一個商品的唯一商品編號

ProductStatus

商品狀態

  • Online:上架中
  • OnlineLowstock:上架中低庫存
  • OnlineNostock:上架中無庫存
  • Offline:已下架
  • CcBlock:客服下架
  • Delete:刪除
  • NotOnline:未上架

ProductName

商品名稱

ImageMain

商品主圖

縮圖url

CostPrice

成本價

ShortDescription

商品簡述

SpecList

包含此商品的規格list

@Id

商品規格編號

SpecDescription

商品規格此商品沒有spec,此欄位顯示'-'

CurrentStock

商品庫存量1~999

SaftySock

商品安全庫存最低警告量

CustomizedProductId

自訂貨號

Sample response

JSON sample

{ "Response" : { "@Status" : "ok",
      "Product" : { "CostPrice" : 10,
          "ImageMain" : "https://tw.bid.yimg.com/pimg1/a7/a7/p09499467-itema-1253xf1x0300x0157-s.jpg",
          "ProductId" : "p09499467",
          "ProductName" : "Jeff test 贈品",
          "ProductStatus" : "Online",
          "ShortDescription" : "test test tttt",
          "spec" : [ { "@Id" : 1,
                "CurrentStock" : 500,
                "CustomizedProductId" : "",
                "SpecDescription " : "-",
                "Stock" : 5
              } ]
        }
    } }

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <Product>
    <ProductId>p09499467</ProductId>
    <ProductStatus>Online</ProductStatus>
    <ProductName>Jeff test 贈品</ProductName>
    <ShortDescription>test test tttt</ShortDescription>
    <spec Id="1">
      <SpecDescription>-</SpecDescription>
      <CustomizedProductId/>
      <CurrentStock>500</CurrentStock>
      <Stock>5</Stock>
    </spec>
    <ImageMain>https://tw.bid.yimg.com/pimg1/a7/a7/p09499467-itema-1253xf1x0300x0157-s.jpg</ImageMain>
    <CostPrice>10</CostPrice>
  </Product>
</Response>

Errors

ErrorCode

ErrorMessage

1386

商品編號非加贈品

其它錯誤請參閱共用錯誤表


/v1/Product/UpdateMain

更新單一主商品資料

Attribute

Value

API Name

更新商品資料 (/Product/UpdateMain)

API Desc

更新單一主商品資料

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/UpdateMain OR https://tw.ews.mall.yahooapis.com/oauth/v1/Product/UpdateMain

Change Log

  • 2011/07 - 新增 CustomizedMainProductId (自訂商品主貨號), SpecDimension1(商品規格名稱1), SpecDimension2 (商品規格名稱2)

Request parameters

Parameter

Value

Description

SaleType

string (20/Require)

商品銷售方式

  • Normal: 一般方式(現貨銷售)
  • PreSaleByShipDate: 預購 (指定出貨日期)
  • PreSaleByShipdays: 預購 (訂購後多少天出貨)

SaleTypeInfo

string (Optional)

商品銷售資訊,對應 SaleType 填入對應的值

  • SaleType=PreSaleByShipDate 時,SaleTypeInfo 需填寫日期,ex:2021/1/31 代表 2021/1/31 出貨
  • SaleType=PreSaleByShipdays 時,SaleTypeInfo 需填寫數字,ex:20 代表訂購後20個工作天出貨

ProductName

string (150/Require)

商品名稱

MallCategoryId

int (12/Require)

商城商品分類代號

商品欲刊登的 leaf 層 category id

StoreCategoryId

int (Optional)

商品歸類

可接受多筆,請重複使用此 parameter

ex:StoreCategoryId=1234&StoreCategoryId=1235

MarketPrice

number (12,2/Optional)

商品市價

SalePrice

number (12,2/Require)

網路價

賣場上的銷售價格,需大於 0 且大於 CostPrice (成本價)

CostPrice

number (12,2/Optional)

成本價

MaxBuyNum

int (3/Optional)

最高購買數量

商品一次最多可被購買的數量 (default:30)

可接受1~100

ShortDescription

string (200/Require)

商品簡述

VideoPath

string (256/Optional)

商品影音檔Path

符合YouTube短網址

LongDescription

string (Optional)

商品介紹

LinkAddon

string (Optional)

加購品

可帶多個加購品商品編號,請重複使用此 parameter。若沒有加購品,請勿加入此 parameter。

ex:LinkAddon=p01234&LinkAddon=p01256

LinkFreebie

string (Optional)

贈品

可帶多個贈品商品編號,請重複使用此 parameter。若沒有贈品,請勿加入此 parameter。

ex:LinkFreebie=p01278&LinkFreebie=p01290

PayTypeId

int (Require)

付款方式代號

商品可接受的付款方式,可帶多個付款方式,請重複使用此parameter

ex:PayTypeId=1&PayTypeId=1

ShippingId

int (Require)

物流方式代號

商品可接受的物流方式,可帶多個物流方式,請重複使用此parameter

ex:ShippingId=1&ShippingId=1

Attribute.n.Name

string (Optional)

商品屬性欄位名稱

  • 可建立多組商品屬性資料
  • 一組商品屬性資料包含:Attribute.n.Name + Attribute.n.Value
  • 請將 parameter 中的 "n" 以數字代換
  • 食品類別填寫範例:Attribute.1.Name=食品業者登錄字號&Attribute.2.Name=產地&Attribute.3.Name=原料原產地
  • 更多說明請參考 https://s.yimg.com/cv/apiv2/apiGuide/ProductAttributes.pdf

Attribute.n.Value

string (Optional)

商品屬性欄位內容

  • 可建立多組商品屬性資料
  • 一組商品屬性資料包含:Attribute.n.Name + Attribute.n.Value
  • 請將 parameter 中的 "n" 以數字代換
  • 食品類別填寫範例:Attribute.1.Value=F-170762591-00000&Attribute.2.Value=台灣&Attribute.3.Value=台灣
  • 更多說明請參考 https://s.yimg.com/cv/apiv2/apiGuide/ProductAttributes.pdf

ProductPromotion.n.Amount

int (Optional)

商品促銷方式 - 數量可建立多組商品促銷方式資料

一組商品屬性資料包含:ProductPromotion.n.Amount + ProductPromotion.n.Price

請將 parameter 中的 "n" 以數字代換,ex:ProductPromotion.1.Amount=5

ProductPromotion.n.Amount 必須大於 ProductPromotion.(n-1).Amount

ProductPromotion.n.Price

int (Optional)

商品促銷方式 - 價格

請將 parameter 中的 "n" 以數字代換,ex:ProductPromotion.1.Price=100

ProductPromotion.n.Price必須小於網路價,而且要小於ProductPromotion.(n-1).Price

IsTaxFree

int(Optional)

此商品是否為免稅商品

商店為免稅商店及商品刊登於免稅分類時,此設定才能被設定為1。(default:0)

當此設定為1時,就不得設定加購品

DeleteAddon

string(Optional)

此商品是否移除加購品資訊

如果要移除加購品資訊,則設定為 true。(default:false)

當此設定為 true 時,就不得使用 LinkAddon 設定加購品

DeleteFreebie

string(Optional)

此商品是否刪除贈品資訊

如果要移除贈品資訊,則設定為 true。(default:false)

當此設定為 true 時,就不得使用 LinkFreebie 設定贈品

CustomizedMainProductId

string(Optional)

自訂商品主貨號

SpecDimension1

string(Optional)

商品規格名稱1

SpecDimension2

string(Optional)

商品規格名稱2

DeleteProductPromotion

string(Optional)

此商品是否移除商品促銷方式

如果要移除促銷方式,則設定為 true。(default:false)

當此設定為 true 時,就不得使用 ProductPromotion 設定商品促銷方式

Sample Request:

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/UpdateMain?ProductId=p0740162400890&ProductName=%E6%B8%AC%E8%A9%A6API%E6%9B%B4%E6%96%B0%E5%95%86%E5%93%810613&SalePrice=2&ShortDescription=%E6%B8%AC%E8%A9%A6%E5%95%86%E5%93%81%EF%BC%8C%E4%B8%8D%E6%9C%83%E5%87%BA%E8%B2%A8%E3%80%82%E6%9B%B4%E6%96%B0%E6%96%87%E5%AD%97%E3%80%82&Format=xml
                                   OR
https://tw.ews.mall.yahooapis.com/oauth/v1/Product/UpdateMain?ProductId=p0740162400890&ProductName=%E6%B8%AC%E8%A9%A6API%E6%9B%B4%E6%96%B0%E5%95%86%E5%93%810613&SalePrice=2&ShortDescription=%E6%B8%AC%E8%A9%A6%E5%95%86%E5%93%81%EF%BC%8C%E4%B8%8D%E6%9C%83%E5%87%BA%E8%B2%A8%E3%80%82%E6%9B%B4%E6%96%B0%E6%96%87%E5%AD%97%E3%80%82&Format=xml

Response fields

Field

Description

ProductId

商品編號 (string)

Mall給每一個商品的唯一商品編號

ErrorMsgList

包含此商品verify的error message list

ErrorMsg

包含一組error message

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response":{
    "@Status":"ok",
    "ProductId":"p098547550"
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <ProductId>p094947545</ProductId>
</Response>

Errors

ErrorCode

ErrorMessage

1310

Attribute: 商品屬性為非合法值

1311

Attribute: 商品屬性不可為空值

1351

商品總數超過上限

1352

加購品超出上限 {max addon limit}

1353

贈品超出上限 {max gift limit}

1354

當商品為免稅時,不可設定加購品

1355

非合法的商店代號

1356

Spec: 規格不可為空值

1371

Promotion: 數量與價錢必須是成對的值

1372

Attribute: 欄位名稱和欄位內容必須是成對的值

1373

不得同時設定加購品以及移除加購品

1374

不得同時設定贈品以及移除贈品

1375

不得同時設定優惠條件又移除優惠條件

其它錯誤請參閱共用錯誤表


/v1/Product/UpdateAddon

更新單一加購品資料

Attribute

Value

API Name

更新單一加購品 (/Product/UpdateAddon)

API Desc

更新單一加購品資料

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/UpdateAddon OR https://tw.ews.mall.yahooapis.com/oauth/v1/Product/UpdateAddon

Change Log

*

Request parameters

Parameter

Value

Description

ProductId

string (16/Require)

商品編號

ProductName

string (150/Optional)

商品名稱

SalePrice

number (12,2/Optional)

網路價

賣場上的銷售價格

大於0 & 大於"成本價"

CostPrice

number (12,2/Optional)

成本價

ShortDescription

string (200/Optional)

商品簡述

Response fields

Field

Description

ProductId

商品編號 (string)

Mall給每一個商品的唯一商品編號

ErrorMsgList

包含此商品verify的error message list

ErrorMsg

包含一組error message

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response":{
    "@Status":"ok",
    "ProductId":"p098547550"
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <ProductId>p094947545</ProductId>
</Response>

Errors

ErrorCode

ErrorMessage

1351

商品總數超過上限

1355

非合法的商店代號

其它錯誤請參閱共用錯誤表


/v1/Product/UpdateFreebie

更新單一贈品資料

Attribute

Value

API Name

更新單一贈品資料 (/Product/UpdateFreebie)

API Desc

更新單一贈品資料

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/UpdateFreebie OR https://tw.ews.mall.yahooapis.com/oauth/v1/Product/UpdateFreebie

Change Log

*

Request parameters

Parameter

Value

Description

ProductId

string (16/Require)

商品編號

ProductName

string (150/Optional)

商品名稱

SalePrice

number (12,2/Optional)

網路價

賣場上的銷售價格

大於0 & 大於"成本價"

ShortDescription

string (200/Optional)

商品簡述

Response fields

Field

Description

ProductId

商品編號 (string)

Mall給每一個商品的唯一商品編號

ErrorMsgList

包含此商品verify的error message list

ErrorMsg

包含一組error message

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <ProductId>p094947545</ProductId>
</Response>

Errors

ErrorCode

ErrorMessage

1351

商品總數超過上限

1355

非合法的商店代號

其它錯誤請參閱共用錯誤表


/v1/Product/UpdateStock

更新商品庫存

Attribute

Value

API Name

更新商品庫存 (/Product/UpdateStock)

API Desc

更新特定單一商品庫存量

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/UpdateStock OR https://tw.ews.mall.yahooapis.com/oauth/v1/Product/UpdateStock

Change Log

*

Request parameters

Parameter

Value

Description

ProductId

string (16/Require)

商品編號

Spec.n.Id

int (3/Require)

規格編號 請將parameter中的"n"以數字代換 ex:Spec.1.Id=1

Spec.n.CustomizedProductId

string (90/Optional)

自訂貨號 此欄位有值將會與平台上的資料進行比對 請將parameter中的"n"以數字代換, ex:Spec.1.CustomizedProductId=w001

Spec.n.Action

string (3/Require)

對庫存做的動作(增加/減少) 請將parameter中的"n"以數字代換, add:增加 del:減少

Spec.n.Stock

int (4/Require)

庫存量 請將parameter中的"n"以數字代換,

Spec.n.ExpectStock

int (4/Optional)

期待完成後的商品庫存量 請將parameter中的"n"以數字代換,

Spec.n.SaftyStock

int (4/Optional)

商品安全庫存最低警告量

不可小於1 請將parameter中的"n"以數字代換,

Response fields

Field

Description

ProductId

商品編號 (string)

Mall給每一個商品的唯一商品編號

SuccessList

成功的規格列表

Spec

商品規格

@Id

商品規格編號

FailList

失敗的規格列表

Spec

商品規格

@Name

傳入的第n個商品規格

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response": {
    "@Status": "ok",
    "ProductId": "p094948102",
    "SuccessList": {
      "Spec": [
        {
          "@Id": 1
        },
        {
          "@Id": 2
        }
      ]
    },
    "FailList": [

    ]
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <ProductId>p094948099</ProductId>
  <SuccessList>
    <Spec Id="1"/>
    <Spec Id="2"/>
  </SuccessList>
</Response>

Errors

ErrorCode

ErrorMessage

1374

商品規格編號不存在

1375

期待完成後的商品庫存量不正確

其它錯誤請參閱共用錯誤表


/v1/Product/UpdateSpec

更新商品規格

Attribute

Value

API Name

更新商品規格 (/Product/UpdateSpec)

API Desc

更新特定單一商品規格

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/UpdateSpec OR https://tw.ews.mall.yahooapis.com/oauth/v1/Product/UpdateSpec

Change Log

*

Request parameters

Parameter

Value

Description

ProductId

string (16/Require)

商品編號

SpecId

number (3/Require)

商品規格編號

CustomizedProductId

string (90/Optional)

自訂貨號,當要刪除該筆自訂貨號時,請將 CustomizedProductId 設定為 -

BarCode

string (8 or 13/Optional)

商品條碼,當要刪除該筆商品條碼時,請將 BarCode 設定為 -

Sample Request:

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/UpdateSpec?ProductId=p0740162400890&SpecId=1&CustomizedProductId=%E8%87%AA%E8%A8%82%E8%B2%A8%E8%99%9F0613&BarCode=4990012585847&Format=xml
                                   OR
https://tw.ews.mall.yahooapis.com/oauth/v1/Product/UpdateSpec?ProductId=p0740162400890&SpecId=1&CustomizedProductId=%E8%87%AA%E8%A8%82%E8%B2%A8%E8%99%9F0613&BarCode=4990012585847&Format=xml

Response fields

Field

Description

ProductId

商品編號 (string)

Mall給每一個商品的唯一商品編號

SpecId

商品規格編號

ErrorMsgList

包含此商品verify的error message list

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response": {
    "@Status": "ok",
    "ProductId": "p094911467",
    "SpecId": 5
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <ProductId>p094911467</ProductId>
  <SpecId>5</SpecId>
</Response>

Errors

ErrorCode

ErrorMessage

1374

商品規格編號不存在

1384

商品編號不是主商品

其它錯誤請參閱共用錯誤表


/v1/Product/UpdateMultiSpec

批次更新商品規格

Attribute

Value

API Name

批次更新商品規格 (/Product/UpdateMultiSpec)

API Desc

批次更新多筆商品規格 (自訂貨號)

Version

1

Request URI

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/UpdateMultiSpec OR https://tw.ews.mall.yahooapis.com/oauth/v1/Product/UpdateMultiSpec

Change Log

  • 2011/08 - Init Version.

Request parameters

Parameter

Value

Description

ProductId

string (16/Require)

商品編號

Spec.n.Id

int (3/Require)

規格編號

Spec.n.CustomizedProductId

string (30/Required )

自訂貨號,當要刪除該筆自訂貨號時,請將 Spec.n.CustomizedProductId 設定為 -

Spec.n.BarCode

string (8 or 13/Required )

商品條碼,當要刪除該筆商品條碼時,請將 Spec.n.BarCode 設定為 -

Sample Request:

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/UpdateMultiSpec?ProductId=p0740162419939&Spec.1.Id=1&Spec.1.CustomizedProductId=%E8%A6%8F%E6%A0%BC1%E8%87%AA%E8%A8%82%E8%B2%A8%E8%99%9F0613%28%E9%BB%91%29&Spec.1.BarCode=4990012585847&Spec.2.Id=2&Spec.2.CustomizedProductId=%E8%A6%8F%E6%A0%BC2%E8%87%AA%E8%A8%82%E8%B2%A8%E8%99%9F0613%28%E9%8A%80%29&Spec.2.BarCode=4990012585847&Spec.3.Id=3&Spec.3.CustomizedProductId=%E8%A6%8F%E6%A0%BC3%E8%87%AA%E8%A8%82%E8%B2%A8%E8%99%9F0613%28%E9%87%91%29&Spec.3.BarCode=4990012585847&Format=xml
                                   OR
https://tw.ews.mall.yahooapis.com/oauth/v1/Product/UpdateMultiSpec?ProductId=p0740162419939&Spec.1.Id=1&Spec.1.CustomizedProductId=%E8%A6%8F%E6%A0%BC1%E8%87%AA%E8%A8%82%E8%B2%A8%E8%99%9F0613%28%E9%BB%91%29&Spec.1.BarCode=4990012585847&Spec.2.Id=2&Spec.2.CustomizedProductId=%E8%A6%8F%E6%A0%BC2%E8%87%AA%E8%A8%82%E8%B2%A8%E8%99%9F0613%28%E9%8A%80%29&Spec.2.BarCode=4990012585847&Spec.3.Id=3&Spec.3.CustomizedProductId=%E8%A6%8F%E6%A0%BC3%E8%87%AA%E8%A8%82%E8%B2%A8%E8%99%9F0613%28%E9%87%91%29&Spec.3.BarCode=4990012585847&Format=xml

Response fields

Field

Description

ProductId

商品編號 (string)

Mall給每一個商品的唯一商品編號

SuccessList

成功的規格列表

Spec

商品規格

@Id

商品規格編號

FailList

失敗的規格列表

Spec

商品規格

@Name

傳入的第n個商品規格

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response": {
    "@Status": "ok",
    "ProductId": "p094948102",
    "SuccessList": {
      "Spec": [
        {
          "@Id": 1
        },
        {
          "@Id": 2
        }
      ]
    },
    "FailList": [

    ]
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <ProductId>p094948099</ProductId>
  <SuccessList>
    <Spec Id="1"/>
    <Spec Id="2"/>
  </SuccessList>
</Response>

Errors

ErrorCode

ErrorMessage

1374

商品規格編號不存在

1375

期待完成後的商品庫存量不正確

其它錯誤請參閱共用錯誤表


/v2/Product/AddSpecDimension (New)

新增商品規格

Attribute

Value

API Name

新增商品規格 (/Product/AddSpecDimension)

API Desc

可以新增一階層或是二階層的商品規格, 取代舊有 /Product/AddSpec 功能

Version

2

Request URI

http://tw.ews.mall.yahooapis.com/stauth/v2/Product/AddSpecDimension OR http://tw.ews.mall.yahooapis.com/oauth/v2/Product/AddSpecDimension

Change Log

  • 2011/09 - Init Version.

Request parameters

Parameter

Value

Description

ProductId

string (16/Require)

商品編號

SpecDimension1Description

string (64/Optional)

第一階商品規格名稱描述編號,可新增多筆,最多 40 筆。

例如:SpecDimension1Description=L&SpecDimension1Description=M

SpecDimension2Description

string (64/Optional)

第二階商品規格名稱描述編號,可新增多筆,最多 40 筆。

例如:SpecDimension2Description=White&SpecDimension2Description=Yellow

注意:所有商品展開後,商品規格總數不得超過 60 種。

Response fields

Field

Description

ProductId

商品編號 (string)

Mall給每一個商品的唯一商品編號

SpecDimensionList

商品規格名稱編號

ErrorMsgList

包含此商品verify的error message list

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response": {
    "@Status": "ok", 
    "Product": {
      "@Id": "p09491457373", 
      "SpecDimensionList": {
        "SpecDimension": [
          {
            "@Id": 1, 
            "DescriptionList": {
              "Description": [
                {
                  "@Id": 3, 
                  "_Name": "\u6a58\u8272"
                }
              ]
            }
          }, 
          {
            "@Id": 2, 
            "DescriptionList": {
              "Description": [
                {
                  "@Id": 2, 
                  "_Name": "XL"
                }
              ]
            }
          }
        ]
      }, 
      "SpecList": {
        "Spec": [
          {
            "@Id": 3, 
            "CurrentStock": 0, 
            "CustomizedProductId": "", 
            "DimensionList": {
              "Dimension": [
                {
                  "@Id": 1, 
                  "Description": {
                    "@Id": 1
                  }
                }, 
                {
                  "@Id": 2, 
                  "Description": {
                    "@Id": 2
                  }
                }
              ]
            }, 
            "SaftyStock": 1, 
            "_SpecDescription": "\u7d05\u8272/XL"
          }, 
          {
            "@Id": 4, 
            "CurrentStock": 0, 
            "CustomizedProductId": "", 
            "DimensionList": {
              "Dimension": [
                {
                  "@Id": 1, 
                  "Description": {
                    "@Id": 2
                  }
                }, 
                {
                  "@Id": 2, 
                  "Description": {
                    "@Id": 2
                  }
                }
              ]
            }, 
            "SaftyStock": 1, 
            "_SpecDescription": "\u9ec3\u8272/XL"
          }, 
          {
            "@Id": 5, 
            "CurrentStock": 0, 
            "CustomizedProductId": "", 
            "DimensionList": {
              "Dimension": [
                {
                  "@Id": 1, 
                  "Description": {
                    "@Id": 3
                  }
                }, 
                {
                  "@Id": 2, 
                  "Description": {
                    "@Id": 1
                  }
                }
              ]
            }, 
            "SaftyStock": 1, 
            "_SpecDescription": "\u6a58\u8272/L"
          }, 
          {
            "@Id": 6, 
            "CurrentStock": 0, 
            "CustomizedProductId": "", 
            "DimensionList": {
              "Dimension": [
                {
                  "@Id": 1, 
                  "Description": {
                    "@Id": 3
                  }
                }, 
                {
                  "@Id": 2, 
                  "Description": {
                    "@Id": 2
                  }
                }
              ]
            }, 
            "SaftyStock": 1, 
            "_SpecDescription": "\u6a58\u8272/XL"
          }
        ]
      }
    }
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
    <Response Status="ok">
        <Product Id="p09491457373">
            <SpecDimensionList>
                <SpecDimension Id="1">
                    <DescriptionList>
                        <Description Id="3">
                            <Name>
                                <![CDATA[橘色]]>
                            </Name>
                        </Description>
                    </DescriptionList>
                </SpecDimension>
                <SpecDimension Id="2">
                    <DescriptionList>
                        <Description Id="2">
                            <Name>
                                <![CDATA[XL]]>
                            </Name>
                        </Description>
                    </DescriptionList>
                </SpecDimension>
            </SpecDimensionList>
            <SpecList>
                <Spec Id="3">
                    <SpecDescription>
                        <![CDATA[紅色/XL]]>
                    </SpecDescription>
                    <CustomizedProductId>
                    </CustomizedProductId>
                    <CurrentStock>0</CurrentStock>
                    <SaftyStock>1</SaftyStock>
                    <DimensionList>
                        <Dimension Id="1">
                            <Description Id="1">
                            </Description>
                        </Dimension>
                        <Dimension Id="2">
                            <Description Id="2">
                            </Description>
                        </Dimension>
                    </DimensionList>
                </Spec>
                <Spec Id="4">
                    <SpecDescription>
                        <![CDATA[黃色/XL]]>
                    </SpecDescription>
                    <CustomizedProductId>
                    </CustomizedProductId>
                    <CurrentStock>0</CurrentStock>
                    <SaftyStock>1</SaftyStock>
                    <DimensionList>
                        <Dimension Id="1">
                            <Description Id="2">
                            </Description>
                        </Dimension>
                        <Dimension Id="2">
                            <Description Id="2">
                            </Description>
                        </Dimension>
                    </DimensionList>
                </Spec>
                <Spec Id="5">
                    <SpecDescription>
                        <![CDATA[橘色/L]]>
                    </SpecDescription>
                    <CustomizedProductId>
                    </CustomizedProductId>
                    <CurrentStock>0</CurrentStock>
                    <SaftyStock>1</SaftyStock>
                    <DimensionList>
                        <Dimension Id="1">
                            <Description Id="3">
                            </Description>
                        </Dimension>
                        <Dimension Id="2">
                            <Description Id="1">
                            </Description>
                        </Dimension>
                    </DimensionList>
                </Spec>
                <Spec Id="6">
                    <SpecDescription>
                        <![CDATA[橘色/XL]]>
                    </SpecDescription>
                    <CustomizedProductId>
                    </CustomizedProductId>
                    <CurrentStock>0</CurrentStock>
                    <SaftyStock>1</SaftyStock>
                    <DimensionList>
                        <Dimension Id="1">
                            <Description Id="3">
                            </Description>
                        </Dimension>
                        <Dimension Id="2">
                            <Description Id="2">
                            </Description>
                        </Dimension>
                    </DimensionList>
                </Spec>
            </SpecList>
        </Product>
    </Response>

Errors

ErrorCode

ErrorMessage

1374

商品規格編號不存在

1377

不能刪除自訂貨號不相符或內定的規格

1378

商品規格數量必須大於0

其它錯誤請參閱共用錯誤表


/v1/Product/DeleteSpecDimension (New)

刪除商品規格

Attribute

Value

API Name

刪除商品規格 (/Product/DeleteSpecDimension)

API Desc

刪除商品第一階或是第二階的規格, 取代 /Product/DeleteSpec

Version

1

Request URI

http://tw.ews.mall.yahooapis.com/stauth/v1/Product/DeleteSpecDimension OR http://tw.ews.mall.yahooapis.com/oauth/v1/Product/DeleteSpecDimension

Change Log

  • 2011/08 - Init Version.

Request parameters

Parameter

Value

Description

ProductId

string (16/Require)

商品編號

SpecDimension1DescriptionId

number (3/Optional)

第一階商品規格名稱描述編號,可刪除多筆。

例如:SpecDimension1DescriptionId=1&SpecDimension1DescriptionId=2

SpecDimension2DescriptionId

number (3/Optional)

第二階商品規格名稱描述編號,可刪除多筆。

例如:SpecDimension2DescriptionId=1&SpecDimension2DescriptionId=2

Sample response

JSON sample

{
  "Response": {
    "@Status": "ok",
    "ProductId": "p094911467"
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <ProductId>p094911467</ProductId>
</Response>

Errors

ErrorCode

ErrorMessage

1374

商品規格編號不存在

1377

不能刪除自訂貨號不相符或內定的規格

1378

商品規格數量必須大於0

其它錯誤請參閱共用錯誤表


/v1/Product/Online

商品上架

Attribute

Value

API Name

商品上架 (/Product/Online)

API Desc

將單一商品上架

Version

1

Request URI

http://tw.ews.mall.yahooapis.com/stauth/v1/Product/Online OR http://tw.ews.mall.yahooapis.com/oauth/v1/Product/Online

Change Log

*

Request parameters

Parameter

Value

Description

ProductId

string (16/Require)

商品編號 ,可接受多筆

ex1.ProductId=p123456&ProductId=12345676,

ex2.ProductId=p123456&ProductId=12345676&ProductId=12345788,

每次limit=50

Response fields

Field

Description

SuccessList

成功的規格列表

Product

商品

@Id

商品編號

FailList

失敗的規格列表

Product

商品

@Id

商品編號

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response": {
    "@Status": "ok",
    "SuccessList": {
      "Product": [
        {
          "@Id": "p094948743"
        },
        {
          "@Id": "p094948744"
        },
        {
          "@Id": "p094948745"
        },
        {
          "@Id": "p094948746"
        },
        {
          "@Id": "p094948747"
        }
      ]
    },
    "FailList": [

    ]
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <SuccessList>
    <Product Id="p094948736"/>
    <Product Id="p094948737"/>
    <Product Id="p094948738"/>
    <Product Id="p094948739"/>
    <Product Id="p094948740"/>
  </SuccessList>
</Response>

Errors

ErrorCode

ErrorMessage

1381

不能上架狀態為

PDB_PRODUCT_STOCK_NOSTOCK,

PDB_PRODUCT_STATUS _CCBLOCK,

PDB_PRODUCT_STATUS_ONLINE

及出貨日期有問題的商品

其它錯誤請參閱共用錯誤表


/v1/Product/Offline

下架商品

Attribute

Value

API Name

下架商品 (/Product/Offline)

API Desc

將單一商品下架

Version

1

Request URI

http://tw.ews.mall.yahooapis.com/stauth/v1/Product/Offline OR http://tw.ews.mall.yahooapis.com/oauth/v1/Product/Offline

Change Log

*

Request parameters

Parameter

Value

Description

ProductId

string (16/Require)

商品編號 ,可接受多筆

ex1.ProductId=p123456&ProductId=12345676,

ex2.ProductId=p123456&ProductId=12345676&ProductId=12345788,

每次limit=50

Response fields

Field

Description

SuccessList

成功的規格列表

Product

商品

@Id

商品編號

FailList

失敗的規格列表

Product

商品

@Id

商品編號

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response": {
    "@Status": "ok",
    "SuccessList": {
      "Product": [
        {
          "@Id": "p094948743"
        },
        {
          "@Id": "p094948744"
        },
        {
          "@Id": "p094948745"
        },
        {
          "@Id": "p094948746"
        },
        {
          "@Id": "p094948747"
        }
      ]
    },
    "FailList": [

    ]
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <SuccessList>
    <Product Id="p094948736"/>
    <Product Id="p094948737"/>
    <Product Id="p094948738"/>
    <Product Id="p094948739"/>
    <Product Id="p094948740"/>
  </SuccessList>
</Response>

Errors

ErrorCode

ErrorMessage

1382

不能下架不是上架狀態的商品

其它錯誤請參閱共用錯誤表


/v1/Product/Delete

刪除商品

Attribute

Value

API Name

刪除商品 (/Product/Delete)

API Desc

刪除單一商品

Version

1

Request URI

http://tw.ews.mall.yahooapis.com/stauth/v1/Product/Delete OR http://tw.ews.mall.yahooapis.com/oauth/v1/Product/Delete

Change Log

*

Request parameters

Parameter

Value

Description

ProductId

string (16/Require)

商品編號 ,可接受多筆

ex1.ProductId=p123456&ProductId=12345676,

ex2.ProductId=p123456&ProductId=12345676&ProductId=12345788,

每次limit=50

Response fields

Field

Description

SuccessList

成功的規格列表

Product

商品

@Id

商品編號

FailList

失敗的規格列表

Product

商品

@Id

商品編號

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response": {
    "@Status": "ok",
    "SuccessList": {
      "Product": [
        {
          "@Id": "p094948743"
        },
        {
          "@Id": "p094948744"
        },
        {
          "@Id": "p094948745"
        },
        {
          "@Id": "p094948746"
        },
        {
          "@Id": "p094948747"
        }
      ]
    },
    "FailList": [

    ]
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <SuccessList>
    <Product Id="p094948736"/>
    <Product Id="p094948737"/>
    <Product Id="p094948738"/>
    <Product Id="p094948739"/>
    <Product Id="p094948740"/>
  </SuccessList>
</Response>

Errors

ErrorCode

ErrorMessage

1374

商品規格編號不存在

1376

下能刪除不是未上架或下架狀態的商品

1379

上架的商品不能刪除

1380

此商品已刪除過

1383

超過批次更新的最大量

其它錯誤請參閱共用錯誤表


/v1/Product/UpdateImage

更新商品圖片

Attribute

Value

API Name

更新圖片 (/Product/UpdateImage)

API Desc

更新商品圖片

Version

1

Request URI

http://tw.ews.mall.yahooapis.com/stauth/v1/Product/UpdateImage OR http://tw.ews.mall.yahooapis.com/oauth/v1/Product/UpdateImage

Change Log

*

Request parameters

Parameter

Value

Description

ProductId

string(16/Required)

商品編號

ImageNamen

string(255/Required)

Image Name n: 1~10

由UploadImage的API

得到的圖片檔名

ImageFilen

string(Required)

Image Filename n: 1~10

主商品:10張

加購品:1 張

贈品: 1張

  • 此參數不加入簽章(Signature)運算

MainImage

string(11/Optional)

商品主圖的ImageFile

Image Filename: ImageFile1~ImageFile10

主商品:1~10

加購品:1 (default value)

贈品: 1 (default value)

Sample Request:

https://tw.ews.mall.yahooapis.com/stauth/v1/Product/UpdateImage?ProductId=p0740162419939&ImageName1=p0740162419939-item-76e7xf4x1200x1600-m.jpg&MainImage=ImageFile1&Format=xml
                                   OR
https://tw.ews.mall.yahooapis.com/oauth/v1/Product/UpdateImage?ProductId=p0740162419939&ImageName1=p0740162419939-item-76e7xf4x1200x1600-m.jpg&MainImage=ImageFile1&Format=xml

Response fields

Field

Description

SuccessList

成功的圖片列表

Image

成功圖片資訊(Name: 圖片名稱;IsMainImage: 是否為商品主圖;FileName: 上傳後的圖檔檔名)

FailList

上傳失敗列表

Image

失敗圖片資訊(Name: 圖片名稱)

PicList

上傳後的商品圖列表

ImageName

上傳後的圖檔檔名

ErrorCode

錯誤代碼

ErrorMessage

錯誤訊息

Sample response

JSON sample

{
  "Response": {
    "@Status": "ok",
    "SuccessList": {
      "Image": [
        {
          "@Name": "ImageFile1",
          "@IsMainImage": "true",
          "@FileName": "p094917019-item-8661xf2x0600x0366-m.jpg"
        },
        {
          "@Name": "ImageFile2",
          "@IsMainImage": "false",
          "@FileName": "p094917019-item-1217xf2x0600x0366-m.jpg"
        }
      ]
    },
    "FailList": [

    ],
    "PicList": {
      "ImageName": [
        "p094917019-item-5351xf2x0600x0366-m.jpg",
        "p094917019-item-1217xf2x0600x0366-m.jpg"
      ]
    }
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <SuccessList>
    <Image Name="ImageFile1" IsMainImage="true" FileName="p094917016-item-7658xf2x0600x0366-m.jpg"/>
    <Image Name="ImageFile2" IsMainImage="false" FileName="p094917016-item-5271xf1x0600x0366-m.jpg"/>
  </SuccessList>
  <PicList>
    <ImageName>p094917016-item-2747xf1x0600x0366-m.jpg</ImageName>
    <ImageName>p094917016-item-5271xf1x0600x0366-m.jpg</ImageName>
  </PicList>
</Response>

Errors

ErrorCode

ErrorMessage

1101

無上傳檔案

1156

圖片檔案大小太大{max size} bytes

1157

圖片寬度太大。最大為 {max size}

1158

圖片高度太大。最大為 {max size}

1159

圖片格式錯誤

1160

圖片格式不支援

1161

檔案編號取得失敗

1162

縮圖製作失敗

1163

系統錯誤(權限問題)

1164

系統錯誤(未知的錯誤)

1171

超過圖片上傳數量

1172

不存在的圖檔檔名

其它錯誤請參閱共用錯誤表


/v1/Product/SetMainImage

設定商品主圖

Attribute

Value

API Name

設定商品主圖 (/Product/SetMainImage)

API Desc

設定某張圖片為商品主圖片

Version

1

Request URI

http://tw.ews.mall.yahooapis.com/stauth/v1/Product/SetMainImage OR http://tw.ews.mall.yahooapis.com/oauth/v1/Product/SetMainImage

Change Log

*

Request parameters

Parameter

Value

Description

ProductId

string(16/Required)

商品編號

ImageName

string(255/Required)

由UploadImage的API

得到的圖片檔名

IsMainImage

string(5/Optional)

true:是商品主圖

false:不是商品主圖

Response fields

Field

Description

ErrorMsgList

包含此商品verify的error message list

ErrorMsg

包含一組error message

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response": {
    "@Status": "ok"

   }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
</Response>

Errors

ErrorCode

ErrorMessage

1172

不存在的圖檔檔名

其它錯誤請參閱共用錯誤表


/v1/Product/DeleteImage

刪除商品圖

Attribute

Value

API Name

刪除圖片 (/Product/DeleteImage)

API Desc

刪除商品中的某張圖片

Version

1

Request URI

http://tw.ews.mall.yahooapis.com/stauth/v1/Product/DeleteImage OR http://tw.ews.mall.yahooapis.com/oauth/v1/Product/DeleteImage

Change Log

*

Request parameters

Parameter

Value

Description

ProductId

string(16/Required)

商品編號

ImageName

string(255/Required)

由UploadImage的API

得到的圖片檔名

Response fields

Field

Description

SuccessList

成功的規格列表

Image

商品

@ImageName

商品編號

FailList

失敗的規格列表

Image

商品

@ImageName

商品編號

ErrorCode

錯誤代碼 (string)

ErrorParameter

錯誤參數 (string)

ErrorMsg

錯誤訊息 (string)

Sample response

JSON sample

{
  "Response": {
    "@Status": "ok",
    "SuccessList": {
      "Image": [
        {
          "@ImageName": "p094917081-item-9781xf1x0600x0366-m.jpg"
        },
        {
          "@ImageName": "p094917081-item-2217xf1x0600x0366-m.jpg"
        }
      ]
    },
    "FailList": [

    ]
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <SuccessList>
    <Image ImageName="p094917077-item-5251xf2x0600x0366-m.jpg"/>
    <Image ImageName="p094917077-item-5346xf2x0600x0366-m.jpg"/>
  </SuccessList>
</Response>
</Response>

Errors

ErrorCode

ErrorMessage

1172

不存在的圖檔檔名

其它錯誤請參閱共用錯誤表


/v1/Product/SetupReserve

設定預約上下架時間

Attribute

Value

API Name

設定預約上下架時間 (/Product/SetupReserve)

API Desc

設定預約商品上下架時間

Version

1

Request URI

http://tw.ews.mall.yahooapis.com/stauth/v1/Product/SetupReserve OR http://tw.ews.mall.yahooapis.com/oauth/v1/Product/SetupReserve

Change Log

*

Request parameters

Parameter

Value

Description

ProductId

string(16/Required)

商品編號

ReserveOnlineTime

date(Optional)

預約上架時間

ReserveOfflineTime

date(Optional)

預約下架時間

Response fields

Parameter

Description

ProductId

商品編號

ErrorCode

錯誤代碼

ErrorMessage

錯誤訊息

Sample response

JSON sample

{   
  "Response": {      
    "@Status":"ok",      
    "ProductId":"p094950028"   
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <ProductId>p094950028</ProductId>
</Response>

Errors

ErrorCode

ErrorMessage

1901

缺少時間參數

1902

不正確的時間格式

1903

預約上架時間必須早於預約下架時間

1904

目前產品狀態不可設定預約功能

1905

已上架產品不可修改預約上架時間

1906

上架中產品不可設定預約上下架

1907

預約上架時間不可為空白

1908

預約上架時間必須早於商品出貨時間

其他錯誤請參閱共用錯誤表


/v1/Product/CancelReserve

取消預約上下架

Attribute

Value

API Name

取消預約上下架 (/Product/CancelReserve)

API Desc

取消預約商品上下架

Version

1

Request URI

http://tw.ews.mall.yahooapis.com/stauth/v1/Product/CancelReserve OR http://tw.ews.mall.yahooapis.com/oauth/v1/Product/CancelReserve

Change Log

*

Request parameters

Parameter

Value

Description

ProductId

string(16/Required)

商品編號,可接受多筆

ex1.ProductId=p123456&ProductId=12345676

每次limit=50

Response fields

Field

Description

SuccessList

成功的規格列表

Product

產品

@Id

產品編號

FailList

失敗的規格列表

Product

產品

@Id

產品編號

ErrorCode

錯誤代碼

ErrorMessage

錯誤訊息

Sample response

JSON sample

{
  "Response":{
    "@Status":"ok",
    "SuccessList": {
      "Product":[
        {"@Id":"p094950028"},
        {"@Id":"p094950029"}
      ]
    },
    "FailList":[]
  }
}

XML sample

<?xml version="1.0" encoding="UTF-8"?>
<Response Status="ok">
  <SuccessList>
    <Product Id="p094950028"></ProductId>
    <Product Id="p094950029"></ProductId>
  </SuccessList>
</Response>

Errors

ErrorCode

ErrorMessage

1951

目前的產品狀態無法取消

1952

產品尚未設定預約時間

其他錯誤請參閱共用錯誤表