dsc.goods.freight.info.get (获取单条商品运费模板信息API)

获取单条商品运费模板信息API,获取商品运费模板相关信息。

公共参数

请求地址:
环境 HTTP请求地址 HTTPS请求地址
正式环境 http://www.xxx.com/api.php https://www.xxx.com/api.php
公共请求参数:
名称 类型 是否必须 描述
method String API接口名称
app_key String API接口AppKey

请求参数

名称 类型 是否必须 示例值 更多限制 描述
tid Number 可选 (唯一性) 商品运费模板ID
format type 必须 json json或xml 接口类型

响应参数

名称 类型 示例值 描述
tid Number 运费模板ID
ru_id Number 商家ID
type String 0 计算方式(0:按统一运费;1:按叠加运费;)
title Number 标题
update_time String 更新时间
shipping_id String 2,9,14 配送方式ID(字符串拼接方式)
shipping_fee String 2.60 配送方式金额
area_id String 220,221,222,223,224,225,226,227,228 地区市级ID(字符串拼接方式)
top_area_id String 16,25,31 地区省份ID(字符串拼接方式)
sprice String 5.60 地区金额

请求示例

  • PHP
$url="http(s)://www.xxx.com/api.php?app_key=A788F457-1A7D-4CC7-ABA0-BFE212BCCD9A&method=dsc.goods.freight.info.get&tid=1&format=xml"
$Http = new Http();
$Http->doGet($url);

响应示例

  • XML
  • JSON
<dsc>
<info>
<tid>1</tid>
<ru_id>0</ru_id>
<type>1</type>
<title>江浙沪地区</title>
<shipping_id>9,16</shipping_id>
<shipping_fee>1.30</shipping_fee>
<area_id>220,221,222,223,224,225,226,227,228,229,230,231,232,321,383,384,385,386,387,388,389,390,391,392,393</area_id>
<top_area_id>16,25,31</top_area_id>
<sprice>6.00</sprice>
</info>
</dsc>
{
"info": {
"tid": "1",
"ru_id": "0",
"type": "1",
"title": "江浙沪地区",
"shipping_id": "9,16",
"shipping_fee": "1.30",
"area_id": "220,221,222,223,224,225,226,227,228,229,230,231,232,321,383,384,385,386,387,388,389,390,391,392,393",
"top_area_id": "16,25,31",
"sprice": "6.00",
}
}

异常示例

  • XML
  • JSON
<dsc>
<result>success</result>
<error>0</error>
<msg>成功获取数据</msg>
</dsc>
{
"result": "success",
"error": 0,
"msg": "成功获取数据",
}

错误码解释

错误码 错误描述 解决方案
error 返回值

0:成功获取数据

1:数据为空值

2:条件为空或参数不存在

返回
顶部