简要描述:

  • 配送方式数据

请求域名:

  • http://xx.com

请求URL:

POST/route=survey.survey.delivery-method

参数:

参数名 类型 是否必须 说明
time_type string 日期类型:day日,week周,month月,不传默认day
start_time int 搜索开始时间戳,不传默认当天开始,根据日期类型不同,传递时间也不同,参考【统计2.0】插件
end_time int 搜索结束时间戳,不传默认当天结束

返回示例:

正确时返回:

{
    "result": 1,
    "msg": "ok",
    "data": {
        "total": [
            {
                "name": "快递",
                "order_count": 395
            },
            {
                "name": "自提点",
                "order_count": 227
            },
            {
                "name": "同城配送",
                "order_count": 0
            },
            {
                "name": "pos收银",
                "order_count": 0
            },
            {
                "name": "商城自提",
                "order_count": 0
            }
        ],
        "chart": [
            {
                "name": "快递",
                "x_axis": [
                    "2020/04",
                    "2020/05",
                    "2020/06",
                    "2020/07",
                    "2020/08",
                    "2020/09",
                    "2020/10"
                ],
                "series": [
                    16,
                    13,
                    6,
                    46,
                    34,
                    151,
                    395
                ]
            },
            {
                "name": "自提点",
                "x_axis": [
                    "2020/04",
                    "2020/05",
                    "2020/06",
                    "2020/07",
                    "2020/08",
                    "2020/09",
                    "2020/10"
                ],
                "series": [
                    1,
                    0,
                    0,
                    0,
                    0,
                    0,
                    227
                ]
            },
            {
                "name": "同城配送",
                "x_axis": [
                    "2020/04",
                    "2020/05",
                    "2020/06",
                    "2020/07",
                    "2020/08",
                    "2020/09",
                    "2020/10"
                ],
                "series": [
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0
                ]
            },
            {
                "name": "pos收银",
                "x_axis": [
                    "2020/04",
                    "2020/05",
                    "2020/06",
                    "2020/07",
                    "2020/08",
                    "2020/09",
                    "2020/10"
                ],
                "series": [
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0
                ]
            },
            {
                "name": "商城自提",
                "x_axis": [
                    "2020/04",
                    "2020/05",
                    "2020/06",
                    "2020/07",
                    "2020/08",
                    "2020/09",
                    "2020/10"
                ],
                "series": [
                    0,
                    0,
                    0,
                    0,
                    0,
                    0,
                    0
                ]
            }
        ]
    }
}

错误时返回:

  {
    "result": 0,
    "msg": "获取失败"
  }

返回参数说明:

参数名 类型 说明
total array 搜索时间内的各配送方式统计数据
chart array 统计图数据

total返回参数说明:

参数名 类型 说明
name string 配送方式名称
order_count int 订单数量

chart返回参数说明:

参数名 类型 说明
name string 配送方式名称
x_axis array X轴数据
series array Y轴数据

备注:

可以按日期搜索的数据都用单独接口获取