中文版
产品文档1688 APITaobao / Tmall API增值API
产品文档1688 APITaobao / Tmall API增值API
English
  1. 1688 商品搜索
  • 1688 开发人员参考
  • 1688 商品搜索
    • 上传图片获取imageId
      POST
    • 图片搜索
      GET
    • 关键词搜索
      GET
    • 商品详情搜索
      GET
    • 店铺搜索
      GET
    • 商品运费查询
      POST
  • 1688 订单管理
    • 预览订单
      POST
    • 创建订单
      POST
    • 取消订单
      POST
    • 查询订单
      POST
    • 确认收货
      POST
  • 1688 订单支付
    • 批量获取订单的支付链接
      GET
    • 发起免密支付
      POST
  • 1688 其他接口
    • 类目查询
      GET
    • 多语言搜索导航
      GET
  • 1688 消息说明
    • 1688 交易消息
    • 1688消息-签名验证
  1. 1688 商品搜索

商品运费查询

POST
/alibaba/product/freightEstimate
请提交商品ID、中国国内收货地址的省市区编码,获取商品中国段的运费。

请求参数

Body 参数application/json
appKey
string 
必需
大吉平台appKey
appSecret
string 
必需
秘钥,仅调试使用,正式用sign签名
offerId
integer 
商品id
必需
toProvinceCode
string 
中国省份编码
必需
toCityCode
string 
中国城市编码
必需
toCountryCode
string 
中国地区编码
必需
totalNum
integer 
购买件数
必需
logisticsSkuNumModels
array [object {2}] 
sku件数
必需
skuId
string 
skuId
可选
number
integer 
数量
可选
示例
{
  "appKey": "",
  "appSecret": "",
  "offerId": 670291644950,
  "toProvinceCode": "330000",
  "toCityCode": "330100",
  "toCountryCode": "330108",
  "totalNum": 5,
  "logisticsSkuNumModels": [
    {
      "skuId": "4829152353068",
      "number": 5
    }
  ]
}

示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://openapi.dajisaas.com/alibaba/product/freightEstimate' \
--header 'Content-Type: application/json' \
--data-raw '{
    "appKey":"",
	"appSecret":"",
    "offerId": 670291644950,
    "toProvinceCode":"330000",
    "toCityCode":"330100",
    "toCountryCode":"330108",
    "totalNum": 5,
    "logisticsSkuNumModels":
    [
        {
            "skuId": "4829152353068",
            "number": 5
        }
    ]
}'

返回响应

🟢200成功
application/json
Body
code
integer 
返回码
必需
message
string 
消息
必需
data
object 
业务信息
必需
offerId
integer 
商品ID
必需
freight
string 
预估总运费
必需
templateId
integer 
商家运费模板ID
必需
singleProductWeight
number 
必需
单商品重量,单位千克
singleProductWidth
integer 
必需
单商品宽度,单位厘米
singleProductHeight
integer 
必需
单商品高度,单位厘米
singleProductLength
integer 
必需
单商品长度,单位厘米
templateType
integer 
必需
商家运费模板类型,1卖家承担运费,2用户自定义模板,3用户自定义官方模版
templateName
string 
商家运费模板名称
必需
subTemplateType
integer 
必需
商家运费子模板类型,0快递,1货运,2货到付款,3官方
subTemplateName
string 
商家运费子模板名称
必需
firstFee
string 
必需
首重/件费用,单位元
firstUnit
string 
首重/件单位,
必需
nextFee
string 
必需
续重/件费用,单位元
nextUnit
string 
续重/件单位
必需
discount
string 
运费折扣
必需
chargeType
string 
必需
计费类型,0重量,1件数,2体积
freePostage
boolean 
必需
是否包邮,true-包邮 false-不包邮,不包邮freight读取
productFreightSkuInfoModels
array [object {5}] 
sku包装信息
必需
sizeValueType
integer 
必需
件重尺取值类型,1-为外层取值,2-为从productFreightSkuInfoModels中取值
timestamp
integer 
时间戳
必需
traceId
string 
traceId
必需
示例
{
  "code": 200,
  "message": "操作成功",
  "data": {
    "offerId": 670291644950,
    "freight": "3.50",
    "templateId": 15441652,
    "singleProductWeight": 0.2,
    "singleProductWidth": 22,
    "singleProductHeight": 1,
    "singleProductLength": 33,
    "templateType": 2,
    "templateName": "中通",
    "subTemplateType": 0,
    "subTemplateName": "快递",
    "firstFee": "3.5",
    "firstUnit": "1",
    "nextFee": "2.5",
    "nextUnit": "1",
    "discount": "1",
    "chargeType": "0",
    "freePostage": false,
    "productFreightSkuInfoModels": [
      {
        "skuId": "4829152353068",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "4829152353069",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "4829152353070",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "4829152353071",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "4829152353072",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "4829152353073",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "4834487028612",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "4834487028613",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "4834487028614",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "4834487028615",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "4834487028616",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "4834487028617",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "5016469159118",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "5016469159119",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "5016469159120",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "5016469159121",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "5016469159122",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      },
      {
        "skuId": "5016469159123",
        "singleSkuWeight": 0.2,
        "singleSkuWidth": 22,
        "singleSkuHeight": 1,
        "singleSkuLength": 33
      }
    ],
    "sizeValueType": 2
  },
  "timestamp": 1727230405350,
  "traceId": "02395b10f36b"
}
上一页
店铺搜索
下一页
预览订单
Built with