通过此接口可批量查询运费模版。
1、页码和每页条数必须同时填写方可生效,否则将默认返回第1页、10条内容;
2、返回结果分页展示,通过请求参数的页码可以定位到具体第几页,每页条数控制每页返回的条数;
3、运送方式默认为快递,新增运费模板时不填写;
4、城市代码可通过接口“suning.custom.city.query”获取对应城市名称。
名称 | 类型 | 是否必须 | 示例值 | 描述 |
---|---|---|---|---|
appMethod | String | Y | suning.custom.category.query | 方法名 |
appRequestTime | String | Y | 2012-04-25 20:23:30 | 时间戳,格式为yyyy-MM-dd HH:mm:ss,例如:2012-04-25 20:23:30。API服务端允许客户端请求时间误差为10分钟。 |
format | String | N | XML | 默认xml,可指定格式为xml,json |
appKey | String | Y | b0c332a133c102765f39de********** | 分配给应用的访问令牌 |
versionNo | String | Y | v1.2 | API的版本,目前为v1.2版本 |
signInfo | String | Y | 460d7ff15b073e463125b4********** | appSecret,appMethod ,appRequestTime, appKey, versionNo, 请求报文base64加密后的数据顺序MD5(32位小写),其中appSecret为appKey对应的密钥 |
access_token | String | N | a1c5c62b08df3a3cbf7efd********** | 采用OAuth授权方式为必填参数 |
名称 | 类型 | 是否必须 | 示例值 | 描述 |
---|---|---|---|---|
pageNo | String | N | 1 | 页码。取值范围:大于零的整数;默认值为1,即返回第一页数据。 |
pageSize | String | N | 10 | 每页条数。取值范围:大于零的整数;最大值:50。默认值:10。 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
freighttemplatename | String | null | 运费模板名称。 |
freighttemplateid | String | null | 运费模板Id。 |
shippingtype | String | null | 运费方式。0:表示买家承担服务费; 1:表示卖家承担服务费 |
valuationtype | String | null | 计价方式。 0:表示按件数计算运费 ;1:表示按重量计算运费 ;2:表示按体积计算运费; |
firstItem | String | null | 首件数 |
firstitemFare | String | null | 首件运费 |
continuedItem | String | null | 续件数量 |
continueditemFare | String | null | 续件运费 |
totetype | String | null | 运送方式。默认为快递 |
sperencod | String | null | 特定模板-地区代码。,多个以逗号隔开。 |
speprovencod | String | null | 特定模板-省,多个以逗号隔开。 |
specityencod | String | null | 特定模板-市,多个以逗号隔开。 |
firstweight | String | null | 首重量 |
firstweightfare | String | null | 首重量运费 |
continuedweight | String | null | 续重量 |
continuedweightfare | String | null | 续重量运费 |
firstbulk | String | null | 首体积 |
firstbulkfare | String | null | 首体积运费 |
continuedtbulk | String | null | 续体积 |
continuedbulkfare | String | null | 续体积运费 |
nationalcityflag | String | null | 默认运费 |
specificarea | String | null | 运费特定区域模板中文描述 |
<sn_responseContent> <sn_head> <pageTotal>1</pageTotal> <pageNo>1</pageNo> <totalSize>2</totalSize> <returnMessage>biz.handler.data-get:success</returnMessage> </sn_head> <sn_body> <freightTemplate> <freighttemplatename>全国模板</freighttemplatename> <freighttemplateid>c88a56855a5145119c74d1316d956ff1</freighttemplateid> <totetype>快递</totetype> <shippingtype>0</shippingtype> <nationalcityflag>全国</nationalcityflag> <firstItem>1</firstItem> <firstitemFare>12.00</firstitemFare> <continuedItem>1</continuedItem> <continueditemFare>2.00</continueditemFare> <valuationtype>0</valuationtype> <firstweight>0.00</firstweight> <firstweightfare>0.00</firstweightfare> <continuedweight>0.00</continuedweight> <continuedweightfare>0.00</continuedweightfare> <firstbulk>0.00</firstbulk> <firstbulkfare>0.00</firstbulkfare> <continuedtbulk>0.00</continuedtbulk> <continuedbulkfare>0.00</continuedbulkfare> <freightList> <sperencod></sperencod> <speprovencod>050,040,070,090,250,290,260,280,300</speprovencod> <specityencod></specityencod> <firstItem>1</firstItem> <firstitemFare>15.00</firstitemFare> <continuedItem>1</continuedItem> <continueditemFare>5.00</continueditemFare> <firstweight>0.00</firstweight> <firstweightfare>0.00</firstweightfare> <continuedweight>0.00</continuedweight> <continuedweightfare>0.00</continuedweightfare> <firstbulk>0.00</firstbulk> <firstbulkfare>0.00</firstbulkfare> <continuedtbulk>0.00</continuedtbulk> <continuedbulkfare>0.00</continuedbulkfare> <specificarea>西藏,山西,内蒙古,辽宁,黑龙江,陕西,新疆,甘肃,青海</specificarea> </freightList> <freightList> <sperencod></sperencod> <speprovencod>050,040,070,090,250,290,260,280,300</speprovencod> <specityencod></specityencod> <firstItem>1</firstItem> <firstitemFare>15.00</firstitemFare> <continuedItem>1</continuedItem> <continueditemFare>5.00</continueditemFare> <firstweight>0.00</firstweight> <firstweightfare>0.00</firstweightfare> <continuedweight>0.00</continuedweight> <continuedweightfare>0.00</continuedweightfare> <firstbulk>0.00</firstbulk> <firstbulkfare>0.00</firstbulkfare> <continuedtbulk>0.00</continuedtbulk> <continuedbulkfare>0.00</continuedbulkfare> <specificarea>西藏,山西,内蒙古,辽宁,黑龙江,陕西,新疆,甘肃,青海</specificarea> </freightList> </freightTemplate> <freightTemplate> <freighttemplatename>全国模板</freighttemplatename> <freighttemplateid>c88a56855a5145119c74d1316d956ff1</freighttemplateid> <totetype>快递</totetype> <shippingtype>0</shippingtype> <nationalcityflag>全国</nationalcityflag> <firstItem>1</firstItem> <firstitemFare>12.00</firstitemFare> <continuedItem>1</continuedItem> <continueditemFare>2.00</continueditemFare> <valuationtype>0</valuationtype> <firstweight>0.00</firstweight> <firstweightfare>0.00</firstweightfare> <continuedweight>0.00</continuedweight> <continuedweightfare>0.00</continuedweightfare> <firstbulk>0.00</firstbulk> <firstbulkfare>0.00</firstbulkfare> <continuedtbulk>0.00</continuedtbulk> <continuedbulkfare>0.00</continuedbulkfare> <freightList> <sperencod></sperencod> <speprovencod>050,040,070,090,250,290,260,280,300</speprovencod> <specityencod></specityencod> <firstItem>1</firstItem> <firstitemFare>15.00</firstitemFare> <continuedItem>1</continuedItem> <continueditemFare>5.00</continueditemFare> <firstweight>0.00</firstweight> <firstweightfare>0.00</firstweightfare> <continuedweight>0.00</continuedweight> <continuedweightfare>0.00</continuedweightfare> <firstbulk>0.00</firstbulk> <firstbulkfare>0.00</firstbulkfare> <continuedtbulk>0.00</continuedtbulk> <continuedbulkfare>0.00</continuedbulkfare> <specificarea>西藏,山西,内蒙古,辽宁,黑龙江,陕西,新疆,甘肃,青海</specificarea> </freightList> <freightList> <sperencod></sperencod> <speprovencod>050,040,070,090,250,290,260,280,300</speprovencod> <specityencod></specityencod> <firstItem>1</firstItem> <firstitemFare>15.00</firstitemFare> <continuedItem>1</continuedItem> <continueditemFare>5.00</continueditemFare> <firstweight>0.00</firstweight> <firstweightfare>0.00</firstweightfare> <continuedweight>0.00</continuedweight> <continuedweightfare>0.00</continuedweightfare> <firstbulk>0.00</firstbulk> <firstbulkfare>0.00</firstbulkfare> <continuedtbulk>0.00</continuedtbulk> <continuedbulkfare>0.00</continuedbulkfare> <specificarea>西藏,山西,内蒙古,辽宁,黑龙江,陕西,新疆,甘肃,青海</specificarea> </freightList> </freightTemplate> </sn_body> </sn_responseContent>
{ "sn_responseContent": { "sn_head": { "pageTotal": "1", "pageNo": "1", "totalSize":"2", "returnMessage": "biz.handler.data-get:success" }, "sn_body": { "freightTemplate": [ { "freighttemplatename": "全国模板", "freighttemplateid": "c88a56855a5145119c74d1316d956ff1", "totetype": "快递", "shippingtype": "0", "nationalcityflag": "全国", "firstItem": "1", "firstitemFare": "12.00", "continuedItem": "1", "continueditemFare": "2.00", "valuationtype": "0", "firstweight": "0.00", "firstweightfare": "0.00", "continuedweight": "0.00", "continuedweightfare": "0.00", "firstbulk": "0.00", "firstbulkfare": "0.00", "continuedtbulk": "0.00", "continuedbulkfare": "0.00", "freightList": [ { "sperencod": "", "speprovencod": "050,040,070,090,250,290,260,280,300", "specityencod": "", "firstItem": "1", "firstitemFare": "15.00", "continuedItem": "1", "continueditemFare": "5.00", "firstweight": "0.00", "firstweightfare": "0.00", "continuedweight": "0.00", "continuedweightfare": "0.00", "firstbulk": "0.00", "firstbulkfare": "0.00", "continuedtbulk": "0.00", "continuedbulkfare": "0.00", "specificarea": "西藏,山西,内蒙古,辽宁,黑龙江,陕西,新疆,甘肃,青海" }, { "sperencod": "", "speprovencod": "050,040,070,090,250,290,260,280,300", "specityencod": "", "firstItem": "1", "firstitemFare": "15.00", "continuedItem": "1", "continueditemFare": "5.00", "firstweight": "0.00", "firstweightfare": "0.00", "continuedweight": "0.00", "continuedweightfare": "0.00", "firstbulk": "0.00", "firstbulkfare": "0.00", "continuedtbulk": "0.00", "continuedbulkfare": "0.00", "specificarea": "西藏,山西,内蒙古,辽宁,黑龙江,陕西,新疆,甘肃,青海" } ] }, { "freighttemplatename": "全国模板", "freighttemplateid": "c88a56855a5145119c74d1316d956ff1", "totetype": "快递", "shippingtype": "0", "nationalcityflag": "全国", "firstItem": "1", "firstitemFare": "12.00", "continuedItem": "1", "continueditemFare": "2.00", "valuationtype": "0", "firstweight": "0.00", "firstweightfare": "0.00", "continuedweight": "0.00", "continuedweightfare": "0.00", "firstbulk": "0.00", "firstbulkfare": "0.00", "continuedtbulk": "0.00", "continuedbulkfare": "0.00", "freightList": [ { "sperencod": "", "speprovencod": "050,040,070,090,250,290,260,280,300", "specityencod": "", "firstItem": "1", "firstitemFare": "15.00", "continuedItem": "1", "continueditemFare": "5.00", "firstweight": "0.00", "firstweightfare": "0.00", "continuedweight": "0.00", "continuedweightfare": "0.00", "firstbulk": "0.00", "firstbulkfare": "0.00", "continuedtbulk": "0.00", "continuedbulkfare": "0.00", "specificarea": "西藏,山西,内蒙古,辽宁,黑龙江,陕西,新疆,甘肃,青海" }, { "sperencod": "", "speprovencod": "050,040,070,090,250,290,260,280,300", "specityencod": "", "firstItem": "1", "firstitemFare": "15.00", "continuedItem": "1", "continueditemFare": "5.00", "firstweight": "0.00", "firstweightfare": "0.00", "continuedweight": "0.00", "continuedweightfare": "0.00", "firstbulk": "0.00", "firstbulkfare": "0.00", "continuedtbulk": "0.00", "continuedbulkfare": "0.00", "specificarea": "西藏,山西,内蒙古,辽宁,黑龙江,陕西,新疆,甘肃,青海" } ] } ] } } }
异常码 | 错误描述 | 解决方案 |
---|---|---|
sys.check.page-param:error | 每页条数参数错误 | 请输入正确的条数 |
biz.handler.data-get:no-result | 页码无结果 | 请输入正确的页码 |
sys.check.pagesize-format:error | 每页条数格式错误 | 取值范围:大于零的整数;最大值:50;默认值:10 |
异常码 | 错误描述 | 解决方案 |
---|---|---|
sys.check.user-permission:inexistence | 访问令牌不存在 | 更换访问令牌 |
sys.check.user-permission:overdue | 访问令牌已过期 | 请使用刷新令牌刷新 |
sys.check.api-permission:inexistence | Api方法不存在 | 请参考帮助中心 |
sys.check.api-permission:overdue | Api方法已过期 | 请参考帮助中心 |
sys.check.method-permission:authority | 无权操作此api | 确认是否有访问该方法权限 |
sys.auth.vendor-request:errory | 无权操作此供应商 | 请确认供应商编码是否正确 |
sys.controller.api-request:limit | Api请求受控 | 超过请求次数 |
sys.check.app-time:error | 请求参数错误api请求时间误差大 | 参考帮助中心 |
sys.check.request-params:error | 请求报文结构错误 | 参考帮助中心、日期格式等 |
sys.check.starttime-format:error | 请求开始时间错误 | 参考帮助中心、日期格式等 |
biz.handler.data-get:success | 业务数据查询成功 | 无 |
biz.handler.data-get:fail | 业务数据查询失败 | 检查请求条件 |
biz.handler.data-get:no-result | 业务数据结果为空 | 无 |
sys.check.pageno-format:error | pageNo格式错误,只允许1到99999之间的整数 | 检查pageNo输入是否有误 |
sys.check.pagesize-format:error | pageSize格式错误,只允许1到50之间的整数(订单相关是1到100) | 检查pageSize输入是否有误 |
sys.check.page-param:error | pageNo或者pageSize不在要求范围内,pageNo只允许1到99999之间的整数,pageSize只允许1到50之间的整数(订单相关是1到100) | 检查pageNo和pageSize输入是否有误 |
sys.check.miss-time:starttime | 不存在开始时间(节点) | 检查输入 |
sys.check.miss-time:endtime | 不存在结束时间(节点) | 检查输入 |
sys.check.starttime-value:null | 开始时间为空(值) | 检查输入 |
sys.check.endtime-value:null | 结束时间为空(值) | 检查输入 |
sys.check.starttime-format:error | 校验开始时间不合法,格式yyyy-MM-dd HH:mm:ss | 检查时间格式 |
sys.check.endtime-format:error | 校验结束时间不合法,格式yyyy-MM-dd HH:mm:ss | 检查时间格式 |
sys.check.query-time:error | 开始时间是否小于结束时间 | 检查开始和结束时间大小 |
sys.check.query-time:outofrange | 时间查询是否超出指定范围 | 检查时间范围 |
sys.check.app-sign:null | 签名信息为空 | 检查签名信息 |
sys.check.app-sign:error | 签名信息错误 | 检查签名信息 |
sys.check.missing-parameter:apiversion | API版本号未指定 | 检查API版本号 |
sys.check.missing-parameter:appRequestTime | 请求时间丢失 | 检查请求时间 |
sys.check.missing-nestElement:sn_body | 缺少sn_body节点 | 检查sn_body是否存在 |
sys.check.user-permission:inexistence | 用户key不存在 | 检查用户key是否存在 |
biz.handler.batch-handler:no-support | 非查询类API不支持批量操作 | 检查API类型 |
biz.handler.request-message:error | 查询类API输入多个业务节点 | 检查业务节点 |
sys.check.header-param:null | header参数为空 | 请检查header参数 |
sys.controller.api-access:limit | 访问限制 | 无 |
sys.controller.api-frequency:limit | 访问频率限制 | 无 |
sys.error.network:failure | 网络异常 | 无 |
sys.error.network-status:? | 响应失败 ?为状态码 | 无 |
sys.check.snunionid.length.is.not:48 | 混淆会员编码长度不是48位 | 使用转换器转换混淆会员编码规定要求混淆会员编码48位 |
Q:什么是特殊地区运费?
A:在运费模板当中,设定某些地区为特殊地区,另行设定运费,特殊地区执行为之另行设定的运费。