獲取商品批量折扣請求結果

相關URL

Newegg.com: https://api.newegg.com/marketplace/contentmgmt/item/volumediscount?sellerid={sellerid}
Neweggbusiness.com: https://api.newegg.com/marketplace/b2b/contentmgmt/item/volumediscount?sellerid={sellerid}
Newegg.ca: https://api.newegg.com/marketplace/can/contentmgmt/item/volumediscount?sellerid={sellerid}

註:請確保您的請求URL全都是小寫(除Seller ID)並且不能包含任何空格或者分行符號。

參數

名稱 是否必填? 描述
sellerid 您在新蛋商城的商家編號

相關請求資訊

HTTP方式 是否需要認證? 請求格式 回覆格式 頻率限制
PUT 需要 XML,Json XML,Json 100 請求/小時

請求文件主體

屬性 是否必填? 格式 描述
OperationType String 固定值:GetVolumeDiscountRequest
SellerPartNumber 否(如果已經提供NE#) Integer Seller Part# 商家商品編號
NeweggItemNumber 否(如果已經提供Seller Part#) Integer NE Item# 新蛋商品編號

Schema: GetVolumeDiscountRequest.xsd

示例:XML, Request

PUT https://api.newegg.com/marketplace/contentmgmt/item/volumediscount?sellerid={SellerID}
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Content-Type: application/xml
Accept: application/xml

<NeweggAPIRequest >
    <OperationType>GetVolumeDiscountRequest</OperationType>
    <RequestBody>
        <NeweggItemNumber>9SIA0010287920</NeweggItemNumber>
    </RequestBody>
</NeweggAPIRequest>

示例:Json, Request

POST https://api.newegg.com/marketplace/contentmgmt/item/volumediscount?sellerid={SellerID}
Authorization: 720ddc067f4d115bd544aff46bc75634
SecretKey: 21EC2020-3AEA-1069-A2DD-08002B30309D
Content-Type: application/json
Accept: application/json

{
    "OperationType": "GetVolumeDiscountRequest",
    "RequestBody": {
        "NeweggItemNumber": "9SIA0010287920"
    }
}

回覆文件主體

屬性 格式 描述
IsSuccess String 用於確認操作是否成功
固定值:True
SellerID String 您的商家編號
OperationType String 固定值:GetVolumeDiscountResponse
SellerPartNumber String Seller part# 商家商品編號
NeweggItemNumber String NE Item# 新蛋商品編號
Priority Integer 為商品批量折扣設置階梯
Quantity Integer 為當前階梯的商品批量折扣設置階梯數量
SellingPrice Decimal 為當前階梯的商品批量折扣設置階梯單價
EnableFreeShipping Integer 為當前階梯的商品批量設置運輸方式

Schema: GetVolumeDiscountResponse.xsd

示例: XML, Response

<?xml version="1.0" encoding="utf-8"?>
<NeweggAPIResponse>
    <IsSuccess>true</IsSuccess>
    <OperationType>GetVolumeDiscountResponse</OperationType>
    <SellerID>a001</SellerID>
    <ResponseBody>
        <ItemVolumeDiscountInfo>
            <SellerPartNumber>B0147001</SellerPartNumber>
            <NeweggItemNumber>9SIA0010287920</NeweggItemNumber>
            <DiscountSetting>
                <Tier>
                    <Priority>1</Priority>
                    <Quantity>12</Quantity>
                    <SellingPrice>110</SellingPrice>
                    <EnableFreeShipping>0</EnableFreeShipping>
                </Tier>
                <Tier>
                    <Priority>2</Priority>
                    <Quantity>20</Quantity>
                    <SellingPrice>105</SellingPrice>
                    <EnableFreeShipping>0</EnableFreeShipping>
                </Tier>
            </DiscountSetting>
        </ItemVolumeDiscountInfo>
    </ResponseBody>
</NeweggAPIResponse>

示例: Json, Response

{
    "IsSuccess": "true",
    "OperationType": "GetVolumeDiscountResponse",
    "SellerID": "a001",
    "ResponseBody": {
        "ItemVolumeDiscountInfo": {
            "SellerPartNumber": "B0147001",
            "NeweggItemNumber": "9SIA0010287920",
            "DiscountSetting": {
                "Tier": {
                    "Priority": "2",
                    "Quantity": "20",
                    "SellingPrice": "105",
                    "EnableFreeShipping": "0"
                }
            }
        }
    }
}

請求失敗錯誤資訊

常規HTTP錯誤回應,請參考回覆失敗錯誤代碼清單

錯誤代碼 描述
CT001 Invalid ItemNumber
無效的商品編號
CT002 Invalid SellerPartNumber
無效的 Seller Part #
CT059 Item number or seller part# is required
商品編號或 Seller Part#必填。
CT060 Not found. The requested item does not have volume discount yet
找不到相關資訊。請求中的商品當前沒有設置商品批量折扣。

示例: XML, Response

<?xml version="1.0" encoding="utf-8"?>
<Errors>
    <Error>
        <Code>CT001</Code>
        <Message>Invalid ItemNumber</Message>
    </Error>
</Errors>

示例: Json, Response

[
    {
        "Code": "CT001",
        "Message": "Invalid ItemNumber"
    }
]

更新日期:10/15/2018