简要描述:

  • 订单数据分析

请求域名:

  • http://xx.com

请求URL:

POST/route=survey.survey.order-analysis

参数:

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

返回示例:

正确时返回:

{
    "result": 1,
    "msg": "ok",
    "data": {
        "total": 1178,
        "wait_pay_total": 0,
        "wait_send_total": 103,
        "send_total": 662,
        "complete_total": 659,
        "order_people": 495,
        "chart_data": {
            "order_count": {
                "name": "订单件数",
                "x_axis": [
                    "2020/04",
                    "2020/05",
                    "2020/06",
                    "2020/07",
                    "2020/08",
                    "2020/09",
                    "2020/10"
                ],
                "series": [
                    32,
                    34,
                    20,
                    78,
                    51,
                    156,
                    807
                ]
            },
            "order_people": {
                "name": "下单人数",
                "x_axis": [
                    "2020/04",
                    "2020/05",
                    "2020/06",
                    "2020/07",
                    "2020/08",
                    "2020/09",
                    "2020/10"
                ],
                "series": [
                    4,
                    4,
                    3,
                    7,
                    11,
                    16,
                    495
                ]
            },
            "order_wait_pay": {
                "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
                ]
            },
            "order_wait_send": {
                "name": "待发货",
                "x_axis": [
                    "2020/04",
                    "2020/05",
                    "2020/06",
                    "2020/07",
                    "2020/08",
                    "2020/09",
                    "2020/10"
                ],
                "series": [
                    3,
                    2,
                    0,
                    10,
                    8,
                    79,
                    103
                ]
            },
            "order_send": {
                "name": "已发货",
                "x_axis": [
                    "2020/04",
                    "2020/05",
                    "2020/06",
                    "2020/07",
                    "2020/08",
                    "2020/09",
                    "2020/10"
                ],
                "series": [
                    23,
                    25,
                    19,
                    56,
                    33,
                    22,
                    662
                ]
            },
            "order_complete": {
                "name": "已完成",
                "x_axis": [
                    "2020/04",
                    "2020/05",
                    "2020/06",
                    "2020/07",
                    "2020/08",
                    "2020/09",
                    "2020/10"
                ],
                "series": [
                    23,
                    25,
                    19,
                    56,
                    33,
                    22,
                    659
                ]
            }
        }
    }
}

错误时返回:

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

返回参数说明:

参数名 类型 说明
total int 订单总数
wait_pay_total int 待付款订单数
wait_send_total int 待发货订单数
send_total int 已发货订单数
complete_total int 已完成订单数
order_people int 下单人数
chart_data obj 统计图数据

chart_data返回参数说明:

参数名 类型 说明
name string 对应统计图数据名称
x_axis array X轴数据
series array Y轴数据

备注:

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