模拟快递信息
其他 官方文档
随机模拟各种快递信息,数据只是模拟数据,并非真实数据
基本说明:
接口地址:http://www.kuaidi.com/index-ajaxselectcourierinfo--.html
返回格式:json
请求方式:get/post
请求示例:http://www.kuaidi.com/index-ajaxselectcourierinfo--.html
请求参数说明:
名称 类型 必填 说明
- - - -
返回参数说明:
名称 类型 说明
- - -
JSON返回示例:
{
	"success": true,
	"reason": "",
	"data": [{
			"time": "2021-06-11 16:07:09",
			"context": "【东莞市】包裹已签收!签收人是【售后组】,如有疑问请联系:,如有异常问题或需投诉请拨打网点电话:"
		},
		{
			"time": "2021-06-11 15:45:58",
			"context": "【东莞市】【东莞石碣同辉网点】的小哥李中波正在派件(可放心接听专属热线),如有异常问题或需投诉请拨打网点电话:"
		},
		{
			"time": "2021-06-11 15:44:58",
			"context": "【东莞市】快件到达【东莞石碣同辉网点】"
		},
		{
			"time": "2021-06-11 15:38:58",
			"context": "【东莞市】快件离开【东莞同辉集散点】已发往【东莞石碣同辉网点】"
		},
		{
			"time": "2021-06-11 11:21:38",
			"context": "【东莞市】快件离开【东莞虎门转运中心】已发往【东莞同辉集散点】"
		},
		{
			"time": "2021-06-11 10:31:29",
			"context": "【东莞市】快件到达【东莞虎门转运中心】"
		},
		{
			"time": "2021-06-09 05:33:30",
			"context": "【北京市】快件离开【北京通州转运中心】已发往【东莞虎门转运中心】"
		},
		{
			"time": "2021-06-09 04:46:58",
			"context": "【北京市】快件到达【北京通州转运中心】"
		},
		{
			"time": "2021-06-09 01:06:23",
			"context": "【北京市】快件离开【北京转运中心】已发往【北京通州转运中心】"
		},
		{
			"time": "2021-06-08 23:52:30",
			"context": "【北京市】快件到达【北京转运中心】"
		},
		{
			"time": "2021-06-08 20:07:12",
			"context": "【北京市】快件离开【北京房山石楼集散点】已发往【北京转运中心】"
		},
		{
			"time": "2021-06-08 19:02:35",
			"context": "【北京市】快件离开【北京房山星城网点】已发往【北京房山石楼集散点】"
		},
		{
			"time": "2021-06-08 17:38:08",
			"context": "【北京市】【北京房山星城网点】您的小哥成龙祥已取件。如有异常问题或需投诉请拨打网点电话:|进港"
		}
	],
	"status": 1,
	"exname": "",
	"ico": "",
	"phone": "",
	"url": "",
	"nu": "",
	"company": "",
	"ischeck": 0,
	"city": "",
	"cityfrom": ""
}
服务级错误码参照
错误码 说明
- -
完整教学代码示例
<?php
/**
 * Created by PhpStorm.
 * User: FZS
 * Time: 2021/07/03 19:26
 */
class freeApi
{
    private $apiUrl;

    public function __construct()
    {
        $this->apiUrl = 'http://www.kuaidi.com/index-ajaxselectcourierinfo--.html';
    }

    /**
     * 获取结果
     * @return array
     */
    public function getResult()
    {
        return file_get_contents($this->apiUrl);
    }
}
package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
)

const (
	APIURL   = "http://www.kuaidi.com/index-ajaxselectcourierinfo--.html"
)

func main() {
	queryUrl := fmt.Sprintf("%s",APIURL)
	resp, err := http.Get(queryUrl)
	if err != nil {
		log.Println(err)
		return
	}

	defer resp.Body.Close()

	body, err := ioutil.ReadAll(resp.Body)

	if err != nil {
		fmt.Println(err)
		return
	}

	fmt.Println(string(body))
}