API接口目录

平台业务

商品API
价格API
库存API
销售准备API
交易API
退货退款API(新)
财务API
店铺API
物流API
促销API
分销API
发票API
招商API
换货API
互动营销API
退货退款API
客服API
平台营销API
风控API
会员通API
账房API
财务记账API
异常码自查工具
suning.custom.freighttemplatenew.add 商家新增运费模板api
¥免费

通过此接口可新增运费模版。

1、通过此接口新增的运费模板名称不能重复;

2、运费方式选择卖家承担运费则后续信息可不填写;

3、如果模版内不含特殊地区运费,可不填写相关信息;

4、如果模板内含有特殊地区运费,可直接填写省份编码或城市代码,设置多个可以逗号隔开。如需设置不同特殊地区运费,则需另起节点传输;

5、城市代码可通过接口“suning.custom.city.query”获取;

6、运送方式默认为快递,新增运费模板时不填写。

公共参数
请求参数
名称 类型 是否必须 示例值 描述
specialListStringN
speProvenCodeStringN140,150,160省编码
speRenCodeStringN243区编码
speCityEnCodeStringN000001000174,000001000175,000001000176市编码
speFirstItemStringN5首件费用,计价方式为0时必填
speContinuedItemStringN10续件数量,计价方式为0时必填
speFirstItemFareStringN10.02首件费用,计价方式为0时必填
speContinuedItemFareStringN2.03续件费用,计价方式为0时必填
speFirstWeightStringN5.07首重,计价方式为1时必填
speContinuedWeightStringN3.03续重,计价方式为1时必填
speFirstWeightFareStringN10.01首重费用,计价方式为1时必填
speContinuedWeightFareStringN2.05续重费用,计价方式为1时必填
speFirstBulkStringN10.08首体积,计价方式为2时必填
speContinuedtBulkStringN5.02续体积,计价方式为2时必填
speFirstBulkFareStringN5.02首体积价格,运送方式为2时必填
speContinuedtBulkFareStringN5.01续体积价格,运送方式为2时必填
commonMapStringN
supplierTypeStringNH商户类型,海外购商户必填H
continuedBulkFareStringN2.01体积续费,计价方式为2时必填
continuedItemStringN5续件数量,计价方式为0时必填
continuedItemFareStringN3.01续件费用,计价方式为0时必填
continuedtBulkStringN2.01续体积,计价方式为2时必填
continuedWeightStringN5.01续重,计价方式为1时必填
continuedWeightFareStringN2.01续重费用,计价方式为1时必填
firstBulkStringN3.01首体积,计价方式为2时必填
firstBulkFareStringN10.01体积首费,计价方式为2时必填
firstItemStringN10首件数量,计价方式为0时必填
firstItemFareStringN10.01首件费用,计价方式为0时必填
firstWeightStringN10.01首重,计价方式为1时必填
firstWeightFareStringN3.01首重费用,计价方式为1时必填
freightTemplateNameStringY模版名称模版名称
shippingTypeStringY00:卖家承担运费;1:买家承担运费
taxTypeStringN0税费承担方 1卖家承担,0买家承担,商户类型为H时必填
valuationTypeStringY00:按件计费;1:按重量计费;2:按体积计费
vendorCodeStringY0070057239商户编码
响应参数
名称 类型 示例值 描述
resultStringYY:成功;N:失败
descString模版名称重复异常描述
请求示例
  • XML示例
  • JSON示例
复制全部代码
                                
<sn_request>
  <sn_body>
    <freightTemplate>
      <commonMap>
        <firstWeight>10.01</firstWeight>
        <continuedWeightFare>2.01</continuedWeightFare>
        <continuedBulkFare>2.01</continuedBulkFare>
        <firstBulk>3.01</firstBulk>
        <freightTemplateName>模版名称</freightTemplateName>
        <shippingType>0</shippingType>
        <firstItem>10</firstItem>
        <firstWeightFare>3.01</firstWeightFare>
        <firstBulkFare>10.01</firstBulkFare>
        <continuedItem>5</continuedItem>
        <continuedItemFare>3.01</continuedItemFare>
        <continuedWeight>5.01</continuedWeight>
        <supplierType>H</supplierType>
        <firstItemFare>10.01</firstItemFare>
        <continuedtBulk>2.01</continuedtBulk>
        <taxType>0</taxType>
        <valuationType>0</valuationType>
      </commonMap>
      <specialList>
        <speProvenCode>140,150,160</speProvenCode>
        <speContinuedItem>10</speContinuedItem>
        <speContinuedWeight>3.03</speContinuedWeight>
        <speFirstItem>5</speFirstItem>
        <speRenCode>243</speRenCode>
        <speFirstBulkFare>5.02</speFirstBulkFare>
        <speContinuedItemFare>2.03</speContinuedItemFare>
        <speContinuedWeightFare>2.05</speContinuedWeightFare>
        <speCityEnCode>000001000174,000001000175,000001000176</speCityEnCode>
        <speFirstBulk>10.08</speFirstBulk>
        <speFirstItemFare>10.02</speFirstItemFare>
        <speContinuedtBulkFare>5.01</speContinuedtBulkFare>
        <speFirstWeight>5.07</speFirstWeight>
        <speFirstWeightFare>10.01</speFirstWeightFare>
        <speContinuedtBulk>5.02</speContinuedtBulk>
      </specialList>
      <vendorCode>0070057239</vendorCode>
    </freightTemplate>
  </sn_body>
</sn_request>

			
                                
                                
{
  "sn_request": {
    "sn_body": {
      "freightTemplate": {
        "commonMap": {
          "firstWeight": "10.01",
          "continuedWeightFare": "2.01",
          "continuedBulkFare": "2.01",
          "firstBulk": "3.01",
          "freightTemplateName": "模版名称",
          "shippingType": "0",
          "firstItem": "10",
          "firstWeightFare": "3.01",
          "firstBulkFare": "10.01",
          "continuedItem": "5",
          "continuedItemFare": "3.01",
          "continuedWeight": "5.01",
          "supplierType": "H",
          "firstItemFare": "10.01",
          "continuedtBulk": "2.01",
          "taxType": "0",
          "valuationType": "0"
        },
        "specialList": [
          {
            "speProvenCode": "140,150,160",
            "speContinuedItem": "10",
            "speContinuedWeight": "3.03",
            "speFirstItem": "5",
            "speRenCode": "243",
            "speFirstBulkFare": "5.02",
            "speContinuedItemFare": "2.03",
            "speContinuedWeightFare": "2.05",
            "speCityEnCode": "000001000174,000001000175,000001000176",
            "speFirstBulk": "10.08",
            "speFirstItemFare": "10.02",
            "speContinuedtBulkFare": "5.01",
            "speFirstWeight": "5.07",
            "speFirstWeightFare": "10.01",
            "speContinuedtBulk": "5.02"
          }
        ],
        "vendorCode": "0070057239"
      }
    }
  }
}
			
                                
响应示例
  • XML示例
  • JSON示例
复制全部代码
                              
<sn_responseContent>
  <sn_body>
    <addFreighttemplatenew>
      <result>Y</result>
      <desc>模版名称重复</desc>
    </addFreighttemplatenew>
  </sn_body>
</sn_responseContent>

			
                              
                              
{
  "sn_responseContent": {
    "sn_body": {
      "addFreighttemplatenew": {
        "result": "Y",
        "desc": "模版名称重复"
      }
    }
  }
}
			
                              
异常示例
  • XML示例
  • JSON示例
复制全部代码

  
  	API异常码
  	异常码中文描述
  

                           	  
{
  "sn_responseContent": {
    "sn_error": {
      "error_code": "API异常码",
      "error_msg": "异常码中文描述"
    }
  }
}
                           		
业务异常码
异常码 错误描述 解决方案
biz.custom.addfreighttemplatenew.enumeration-error:* 参数的可选值错误 请检查此参数的值,*号表示参数字段名
biz.custom.addfreighttemplatenew.missing-parameter:* 参数必填 请检查此参数的值,*号表示参数字段名
biz.custom.addfreighttemplatenew.format-error:* 参数格式错误 请检查此参数的值,*号表示参数字段名
biz.custom.addfreighttemplatenew.length-overlong:* 参数的值超过规定长度 请检查此参数的值,*号表示参数字段名
isp.sys.service.unavailable.fims 服务不可用 请联系苏宁技术人员
公共异常码
API工具
FAQ