driverStatus Endpoint

Use the driverStatus endpoint to get basic user information from the selected start date to the present date. The start date has to be within 180 days from the present date.

Design Recommendation

  • This endpoint will provide user information for the period from the selected start date till the present date.

  • This endpoint should be called from the publisher's backend and not from the application itself. Exposing this endpoint through the application will result in API-key related security concerns.

Fetch Driver Info

GET https://iql.zendrive.com/iql/v1/driver/{driver_id}/status -H ‘Authorization: APIKEY <api_key>'

This endpoint returns basic details about the user from the start date provided until today’s date.

Path Parameters

Name
Type
Description

driver_id*

String

Unique identifier of the driver.

Query Parameters

Name
Type
Description

start_date

string

Start date from which the data is needed. Format: %Y-%m-%d. Default: 180 days ago from present date. Constraint: Cannot be older than 180 days from present date.

Headers

Name
Type
Description

Authorization*

String

APIKEY <api_key>

{
  "driver_id": <user_id>,
  "start_date": <start_date>,
  "end_date": <end_date>,
  "metrics": {
    "date_first_drive": <Date of first drive>,
    "trips_count": <# Trips>,
    "distance_miles": <Distance in miles>,
    "zendrive_score": <Zendrive Score of the user>,
    "event_rating": {
      "rapid_acceleration": <Rapid acceleration event rating>,
      "phone_use": <Phone use event rating>,
      "hard_brake": <Hard Brakes event rating>,
      "hard_turn": <Hard turn event rating>,
      "overspeeding": <Over speeding event rating>
    },
    "unique_driving_days": <Number of unique driving days>
  }
}

Sample Request URL

https://iql.zendrive.com/iql/v1/driver/user_123/status?start_date=2020-12-07

Response Fields

Response Fields

Description

Type

driver_id

The unique identifier for every driver.

String

start_date

Start date from which the data is being returned in the format %Y-%m-%d.

String

end_date

End date until which data is being returned in the format %Y-%m-%d.

String

metrics.date_first_drive

The date of first drive in the given period.

String

metrics.trips_count

The number of trips in a given period.

Integer

metrics.distance_miles

The total distance traveled within the given period (in miles).

Integer

metrics.offer_available

Clarifies whether the qualification webhook has been sent for the driver or not.

Boolean

metrics.offer_clicked

Clarifies whether offer has been clicked by the driver or not.

Boolean

metrics.progress_percentage

The percentage of the driver's completion of the IQL program.

Float

metrics.zendrive_score

The Zendrive score for the driver in the given period.

Integer

metrics.distance_kms

The total distance traveled within the given period (in kms).

Integer

metrics.event_rating

The ratings scored against events within the given period.

Integer

metrics.event_rating.

rapid_acceleration

The aggregate rapid acceleration rating for the driver in the given time period.

Integer

metrics.event_rating.

phone_use

The aggregate phone use rating for the driver in the given time period.

Integer

metrics.event_rating.

hard_brake

The aggregate hard brake rating for the driver in the given time period.

Integer

metrics.event_rating.

hard_turn

The aggregate hard turn rating for the driver in the given time period.

Integer

metrics.event_rating.

overspeeding

The aggregate over-speeding rating for the driver in the given time period.

Integer

metrics.unique_driving_days

The number of unique driving days in the given period.

Integer

metrics.sdk_activation_date

The SDK activation date.

String

metrics.opt_in_days

The number of days since user opted into the program (metrics.sdk_activation_date).

Integer

Example Response

{
    "driver_id": "0-b",
    "start_date": "2021-05-01",
    "end_date": "2021-06-15",
    "metrics": {
        "date_first_drive": "2020-03-21",
        "unique_driving_days": 44,
        "event_rating": {
            "rapid_acceleration": 5,
            "phone_use": 3,
            "hard_brake": 4,
            "hard_turn": 4,
            "overspeeding": 3
        },
        "trips_count": 3352,
        "distance_miles": 33018.821,
        "distance_kms": 53138.641,
        "zendrive_score": 77,
        "progress_percentage": 90.52,
        "offer_available": true,
        "offer_clicked": false,
        "is_qualified": false,
        "sdk_activation_date": "2021-03-20",
        "opt_in_days": 60
    }
}

'Qualified' indicates that an eligible driver has been approved for a discount, after meeting all the test drive criteria. A disqualified status represents the opposite, when a user is not approved for an offer, even after meeting all the test drive criteria, and the trip data is scored by the insurer or Zendrive in the future.

If a user falls out of the funnel before becoming eligible for an offer, they would not be disqualified. They can be re-engaged after some time, when they accumulate enough data to become eligible for an offer.