下单与查单

一、下单 POST /api/lipin/buy

主参数

参数必填说明
username / sid / sign是见「身份认证」
kuaidi_id是视频号官方快递 ID(is_wxspinhao=1)
cang_id是仓库 ID
goods_id是礼品 ID
platform是视频号固定传 6
send_name是发件人姓名
send_mobile是发件人手机(11 位)
rec_list是收件列表(数组;部分站兼容 base64 JSON)
notify_url否出号/物流回调 URL
notify_secret否回调签名密钥(与 notify_url 同传)

rec_list 每一单

字段必填说明
order_sn是贵站业务单号(查单/对账用)
shop_order是微信小店订单号
rec_name是收件人
rec_mobile是收件手机
rec_province是省
rec_city是市
rec_district是区/县
rec_address是详细地址
shop_appid建议商家小店 AppID,多店时强烈建议

请求示例

# JSON 方式
curl -X POST 'https://api.fahuomao.com/api/lipin/buy' \
  -H 'Content-Type: application/json' \
  -d '{
  "username": "demo",
  "sid": "1730000000",
  "sign": "你的md5签名",
  "kuaidi_id": 12,
  "cang_id": 1,
  "goods_id": 100,
  "platform": 6,
  "send_name": "发件人",
  "send_mobile": "13800138000",
  "notify_url": "https://合作方域名/your/notify",
  "notify_secret": "your_notify_secret",
  "rec_list": [
    {
      "order_sn": "PARTNER001",
      "shop_order": "372xxxxxxxxxxxx",
      "shop_appid": "wx商家小店AppID",
      "rec_name": "张三",
      "rec_mobile": "13900139000",
      "rec_province": "广东省",
      "rec_city": "深圳市",
      "rec_district": "南山区",
      "rec_address": "科技园某某路1号"
    }
  ]
}'

成功时一般返回下单受理结果(具体字段以实际为准);出号需再查单或等回调。

二、查单 POST /api/lipin/status

可用以下数组参数之一查询:

参数说明
order_sn贵站业务单号数组
shop_order微信小店订单号数组
kuaidi_sn已出快递单号数组
# 按贵站业务单号查询(表单数组写法因语言而异,以下为 JSON 示意)
curl -X POST 'https://api.fahuomao.com/api/lipin/status' \
  -H 'Content-Type: application/json' \
  -d '{
  "username": "demo",
  "sid": "1730000000",
  "sign": "你的md5签名",
  "order_sn": ["PARTNER001"]
}'

# 或按微信订单号
# "shop_order": ["372xxxxxxxxxxxx"]

# 成功示意(有单号后)
{
  "code": 0,
  "msg": "ok",
  "data": [
    {
      "order_sn": "PARTNER001",
      "shop_order": "372xxxxxxxxxxxx",
      "kuaidi_sn": "SF1234567890",
      "status": "已出单"
    }
  ]
}
发货猫 · 视频号官方对接文档 · https://fahuomao.com/open/ · 云 API https://api.fahuomao.com