---
# System prepended metadata

title: Driver API

---

# Driver API

[TOC]

---

### Driver List
- path: /web_api/driver/v1/list/0/0/:startTime,:endTime
- method: GET
- response:
```jsonld
{
  "status": 200,
  "errcode": "",
  "message": "API 執行成功",
  "data": [
    {
      "driver": {
        "driverId": "5a4f2eb357a2575690f5495b",
        "firstName": "Eric",
        "lastName": "Lin",
        "email": "eric.lin@greenpacket.com",
        "phone": {
          "countryCode": "+886",
          "number": "960529652"
        },
        "img": "",
        "attached": {
          "emergency": {
            "firstName": "GP",
            "lastName": "一、測試2",
            "countryCode": "+886",
            "email": "",
            "phoneNumber": "0909900000",
            "memo": "測試"
          },
          "insurance": {
            "lastName": "一、測試1",
            "firstName": "GP",
            "countryCode": "+886",
            "companyName": "公司",
            "memo": "測試",
            "phoneNumber": "0988888888",
            "email": "eric.lin@greenpacket.com"
          }
        }
      },
      "score": {
        "risk": 0,
        "eco": 0
      },
      "rawData": {
        "duration": 0,
        "tripCount": 0,
        "distance":0,
        "speed": 0
      }
    }
  ]
}
```
---

### Driver Daily Detail
- path: /web_api/driver/v1/daily_detail/all/:driverID/:driverInfoRequired/:startTime,:endTime
- method: GET
- response: 
```jsonld
{
  "status": 200,
  "errcode": "",
  "message": "API 執行成功",
  "data": [
    {
      "driver": {
        "driverId": "5a4f2eb357a2575690f5495b",
        "firstName": "Eric",
        "lastName": "Lin",
        "email": "eric.lin@greenpacket.com",
        "phone": {
          "countryCode": "+886",
          "number": "960529652"
        },
        "img": "",
        "attached": {
          "emergency": {
            "firstName": "GP",
            "lastName": "一、測試2",
            "countryCode": "+886",
            "email": "",
            "phoneNumber": "0909900000",
            "memo": "測試"
          },
          "insurance": {
            "lastName": "一、測試1",
            "firstName": "GP",
            "countryCode": "+886",
            "companyName": "公司",
            "memo": "測試",
            "phoneNumber": "0988888888",
            "email": "eric.lin@greenpacket.com"
          }
        }
      },
      "hod": {
        "maxDrivingHours": 4970,
        "hourOfDriving": 6367,
        "imeis": [
          "351918068643053",
          "351918068648151"
        ],
        "keys": [
          "15695768535708151",
          "15695025947763053",
          "15695815257238151",
          "15695792843118151"
        ],
        "query": [
          {
            "key": "15695792843118151",
            "speed": {
              "avgGpsSpeed": 2,
              "avgVssSpeed": 0
            },
            "overallTime": "2019-09-27 11:00:00"
          },
          {
            "key": "15695792843118151",
            "speed": {
              "avgGpsSpeed": 0,
              "avgVssSpeed": 0
            },
            "overallTime": "2019-09-27 11:30:00"
          },
          {
            "key": "15695815257238151",
            "speed": {
              "avgGpsSpeed": 0,
              "avgVssSpeed": 0
            },
            "overallTime": "2019-09-27 11:45:00"
          },
          {
            "key": "15695768535708151",
            "speed": {
              "avgGpsSpeed": 0,
              "avgVssSpeed": 23.05
            },
            "overallTime": "2019-09-27 10:30:00"
          },
          {
            "key": "15695025947763053",
            "speed": {
              "avgGpsSpeed": 0.09999999999999999,
              "avgVssSpeed": 0
            },
            "overallTime": "2019-09-26 14:00:00"
          },
          {
            "key": "15695025947763053",
            "speed": {
              "avgGpsSpeed": 0,
              "avgVssSpeed": 0
            },
            "overallTime": "2019-09-26 14:15:00"
          },
          {
            "key": "15695025947763053",
            "speed": {
              "avgGpsSpeed": 0,
              "avgVssSpeed": 0
            },
            "overallTime": "2019-09-26 14:30:00"
          },
          {
            "key": "15695025947763053",
            "speed": {
              "avgGpsSpeed": 0,
              "avgVssSpeed": 0
            },
            "overallTime": "2019-09-26 14:45:00"
          },
          {
            "key": "15695025947763053",
            "speed": {
              "avgGpsSpeed": 0,
              "avgVssSpeed": 0
            },
            "overallTime": "2019-09-26 15:00:00"
          },
          {
            "key": "15695025947763053",
            "speed": {
              "avgGpsSpeed": 0,
              "avgVssSpeed": 0
            },
            "overallTime": "2019-09-26 15:15:00"
          }
        ]
      },
      "score": {
        "risk": 0,
        "eco": 0,
        "harsh": 0,
        "careless": 0,
        "speeding": 0,
        "fatigue": 0,
        "overtime": 0,
        "ecoSpeed": 0,
        "accPedalControl": 0,
        "idling": 0,
        "coasting": 0,
        "ecoTirePressure": 0
      },
      "rawData": {
        "duration": 0,
        "tripCount": 0,
        "speedDistance": 0,
        "gpsDistance": 0,
        "avgVssSpeed": 0,
        "avgGpsSpeed": 0,
        "harshAccCounter": 0,
        "harshBrakeCounter": 0,
        "harshCorneringCounter": 0,
        "harshRpmCounter": 0,
        "accBrakeCounter": 0,
        "nonEcoStopCounter": 0,
        "speedingPeriod": 0,
        "fatiguePeriod": 0,
        "longHourPeriod": 0,
        "overHosPeriod": 0,
        "ecoSpeedPeriod": 0,
        "ecoSteadyPeriod": 0,
        "ecoRpmPeriod": 0,
        "nonEcoStartCounter": 0,
        "idlePeriod": 0,
        "coastingPeriod": 0,
        "nonEcoTirePressurePeriod": 0
      }
    }
  ]
}
```

---

### Driver Weekly Detail
- path: /web_api/driver/v1/weekly_detail/all/:driverID/:driverInfoRequired/:startTime,:endTime
- method: GET
- response: 
```jsonld
{
  "status": 200,
  "errcode": "",
  "message": "API 執行成功",
  "data": [
    {
      "queryDate": [
        {
          "duration": 0,
          "riskScore": 0,
          "ecoScore": 0,
          "ecoSteadyCounter": 0,
          "ecoSteadyRatio": 0,
          "speedVariation": 0,
          "harshAccCounter": 0,
          "harshBrakeCounter": 0,
          "harshCorneringCounter": 0,
          "date": "2019-10-22",
          "dayOfWeek": 2
        }
      ],
      "driver": {
        "driverId": "5a4f2eb357a2575690f5495b",
        "firstName": "Eric",
        "lastName": "Lin",
        "email": "eric.lin@greenpacket.com",
        "phone": {
          "countryCode": "+886",
          "number": "960529652"
        },
        "img": "",
        "attached": {
          "emergency": {
            "firstName": "GP",
            "lastName": "一、測試2",
            "countryCode": "+886",
            "email": "",
            "phoneNumber": "0909900000",
            "memo": "測試"
          },
          "insurance": {
            "lastName": "一、測試1",
            "firstName": "GP",
            "countryCode": "+886",
            "companyName": "公司",
            "memo": "測試",
            "phoneNumber": "0988888888",
            "email": "eric.lin@greenpacket.com"
          }
        }
      },
      "pedalPattern": {
        "idlePeriod": 0,
        "coastingPeriod": 0,
        "acceleratingPeriod": 0,
        "brakePeriod": 0
      },
      "score": {
        "risk": 0,
        "eco": 0,
        "harsh": 0,
        "careless": 0,
        "speeding": 0,
        "fatigue": 0,
        "overtime": 0,
        "ecoSpeed": 0,
        "accPedalControl": 0,
        "idling": 0,
        "coasting": 0,
        "ecoTirePressure": 0
      },
      "rawData": {
        "duration": 0,
        "tripCount": 0,
        "speedDistance": 0,
        "gpsDistance": 0,
        "avgVssSpeed": 0,
        "avgGpsSpeed": 0,
        "harshAccCounter": 0,
        "harshBrakeCounter": 0,
        "harshCorneringCounter": 0,
        "harshRpmCounter": 0,
        "accBrakeCounter": 0,
        "nonEcoStopCounter": 0,
        "speedingPeriod": 0,
        "fatiguePeriod": 0,
        "longHourPeriod": 0,
        "overHosPeriod": 0,
        "ecoSpeedPeriod": 0,
        "ecoSteadyPeriod": 0,
        "ecoRpmPeriod": 0,
        "nonEcoStartCounter": 0,
        "idlePeriod": 0,
        "coastingPeriod": 0,
        "nonEcoTirePressurePeriod": 0
      }
    }
  ]
}
```

---

### Driver Monthly Detail
- path: /web_api/driver/v1/monthly_detail/all/:driverID/:driverInfoRequired/:startTime,:endTime 
- method: GET
- response: 
```jsonld
{
  "status": 200,
  "errcode": "",
  "message": "API 執行成功",
  "data": [
    {
      "queryDate": [
        {
          "duration": 0,
          "riskScore": 0,
          "ecoScore": 0,
          "ecoSteadyCounter": 0,
          "ecoSteadyRatio": 0,
          "speedVariation": 0,
          "harshAccCounter": 0,
          "harshBrakeCounter": 0,
          "harshCorneringCounter": 0,
          "date": "2020-02-02",
          "dayOfMonth": 2
        }
      ],
      "driver": {
        "driverId": "5a4f2eb357a2575690f5495b",
        "firstName": "Eric",
        "lastName": "Lin",
        "email": "eric.lin@greenpacket.com",
        "phone": {
          "countryCode": "+886",
          "number": "960529652"
        },
        "img": "",
        "attached": {
          "emergency": {
            "firstName": "GP",
            "lastName": "一、測試2",
            "countryCode": "+886",
            "email": "",
            "phoneNumber": "0909900000",
            "memo": "測試"
          },
          "insurance": {
            "lastName": "一、測試1",
            "firstName": "GP",
            "countryCode": "+886",
            "companyName": "公司",
            "memo": "測試",
            "phoneNumber": "0988888888",
            "email": "eric.lin@greenpacket.com"
          }
        }
      },
      "pedalPattern": {
        "idlePeriod": 0,
        "coastingPeriod": 0,
        "acceleratingPeriod": 0,
        "brakePeriod": 0
      },
      "score": {
        "risk": 0,
        "eco": 0,
        "harsh": 0,
        "careless": 0,
        "speeding": 0,
        "fatigue": 0,
        "overtime": 0,
        "ecoSpeed": 0,
        "accPedalControl": 0,
        "idling": 0,
        "coasting": 0,
        "ecoTirePressure": 0
      },
      "rawData": {
        "duration": 0,
        "tripCount": 0,
        "speedDistance": 0,
        "gpsDistance": 0,
        "avgVssSpeed": 0,
        "avgGpsSpeed": 0,
        "harshAccCounter": 0,
        "harshBrakeCounter": 0,
        "harshCorneringCounter": 0,
        "harshRpmCounter": 0,
        "accBrakeCounter": 0,
        "nonEcoStopCounter": 0,
        "speedingPeriod": 0,
        "fatiguePeriod": 0,
        "longHourPeriod": 0,
        "overHosPeriod": 0,
        "ecoSpeedPeriod": 0,
        "ecoSteadyPeriod": 0,
        "ecoRpmPeriod": 0,
        "nonEcoStartCounter": 0,
        "idlePeriod": 0,
        "coastingPeriod": 0,
        "nonEcoTirePressurePeriod": 0
      }
    }
  ]
}
```