获取商品批量折扣请求结果

相关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 商家商品编号
NeweggItemNumber 否(如果已经提供Seller Part#) Integer 新蛋商品编号

Schema: GetVolumeDiscountRequest.xsd

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 商家商品编号
NeweggItemNumber String 新蛋商品编号
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