---
title: "Retrieve remaining driving time for a driver."
url: "https://developers.vzconnect.com/apis/logbook-api-v1/versions/ea989433-4e89-4d02-91b7-d8d691be26a1/operations/getDriverRemainingTime"
---

> Full API specification: https://developers.vzconnect.com/apis/logbook-api-v1/versions/ea989433-4e89-4d02-91b7-d8d691be26a1.md

# Retrieve remaining driving time for a driver.

`GET` `/logbook/v1/driver/{drivernumber}/remainingtime`

Operation ID: `getDriverRemainingTime`

Returns Hours of Service (HOS) for a driver against the ruleset or cycle. The integrated user must provide a valid Driver Number. The response includes the driver's last status date and time along with the number of driving hours left for today and the on-duty hours left in the rule cycle. The values are based on the driver's most recent status and are refreshed every time a driver's status is changed. If the driver has no status within the last 6 months, the response is still 200 but contains only the _links object.

## Path parameters

- `drivernumber` (string, required) - Driver Number is the unique identifier for Drivers created within REVEAL. If the provided Driver Number does not exist within the REVEAL account, a 404 error is returned.

## Responses

- `200` - Successfully retrieved remaining time data for the driver. When the driver has no status within the last 6 months, only the _links object is returned (with just the remainingtime link).
- `400` - Bad request. The information being queried is outside of the Reveal account's data plan.
- `401` - Unauthorized. Authentication credentials are missing or invalid. No response body is returned.
- `404` - Driver not found with the specified driver number.
- `500` - Internal server error. No response body is returned.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Logbook API
  version: "1.0"
servers:
  - url: https://api.us.vzconnect.com
paths:
  /logbook/v1/driver/{drivernumber}/remainingtime:
    get:
      summary: Retrieve remaining driving time for a driver.
      description: Returns Hours of Service (HOS) for a driver against the ruleset or
        cycle. The integrated user must provide a valid Driver Number. The
        response includes the driver's last status date and time along with the
        number of driving hours left for today and the on-duty hours left in the
        rule cycle. The values are based on the driver's most recent status and
        are refreshed every time a driver's status is changed. If the driver has
        no status within the last 6 months, the response is still 200 but
        contains only the _links object.
      operationId: getDriverRemainingTime
      tags:
        - Logbook API
      x-kong-route-defaults:
        strip_path: false
        paths:
          - ~/logbook/v1/driver/[^/]+/remainingtime/?$
      parameters:
        - name: drivernumber
          in: path
          required: true
          description: Driver Number is the unique identifier for Drivers created within
            REVEAL. If the provided Driver Number does not exist within the
            REVEAL account, a 404 error is returned.
          schema:
            type: string
          example: c_3379569
      responses:
        "200":
          description: Successfully retrieved remaining time data for the driver. When the
            driver has no status within the last 6 months, only the _links
            object is returned (with just the remainingtime link).
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/RemainingTime"
              examples:
                withStatus:
                  summary: Driver with a status in the last 6 months
                  value:
                    DriverNumber: c_3379569
                    FirstName: Driver First Name
                    LastName: Driver Last Name
                    VehicleNumber: "34343423"
                    VehicleName: Vehicle85
                    RuleCycle: 8
                    HoursAgainstRuleSet:
                      DrivingLeftForToday: 11.666667
                      CycleTimeLeft: 59.9833336
                    LastStatus: OnDutyNotDriving
                    LastStatusDateTimeUTC: 2019-08-07T06:48:02.88
                    HoursRemainingSinceLastStatus:
                      DailyDrivingMinutes: 700
                      DailyOnDutyMinutes: 900
                    _links:
                      remainingtime:
                        href: https://api.dev.eu.vzconnect.net/logbook/v1/driver/c_3379569/remainingtime
                      driver:
                        href: https://api.dev.eu.vzconnect.net/cmd/v1/drivers/c_3379569
                      vehicle:
                        href: https://api.dev.eu.vzconnect.net/cmd/v1/vehicles/34343423
                      logbooksettings:
                        href: https://api.dev.eu.vzconnect.net/cmd/v1/driversettings/logbooksettings/c_3379569
                noRecentStatus:
                  summary: Driver with no status in the last 6 months
                  value:
                    _links:
                      remainingtime:
                        href: https://api.dev.eu.vzconnect.net/logbook/v1/driver/c_3379569/remainingtime
        "400":
          description: Bad request. The information being queried is outside of the Reveal
            account's data plan.
          content:
            application/json: {}
        "401":
          description: Unauthorized. Authentication credentials are missing or invalid. No
            response body is returned.
          content:
            application/json: {}
        "404":
          description: Driver not found with the specified driver number.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ApiError"
        "500":
          description: Internal server error. No response body is returned.
          content:
            application/json: {}
components:
  schemas:
    RemainingTime:
      type: object
      description: Hours of Service (HOS) for a driver against the ruleset or cycle.
        When the driver has no status within the last 6 months, only
        _links.remainingtime is returned and all other properties are absent.
      properties:
        DriverNumber:
          type: string
          description: Driver Number is the unique identifier for Drivers created within
            REVEAL. If the provided Driver Number does not exist within the
            REVEAL account, a 404 error is returned.
          example: c_3379569
        FirstName:
          type: string
          description: The first name of the driver as recorded within the REVEAL vehicle
            profile.
          example: Driver First Name
        LastName:
          type: string
          description: The last name of the driver as recorded within the REVEAL vehicle
            profile.
          example: Driver Last Name
        VehicleNumber:
          type: string
          nullable: true
          description: Vehicle Number is the unique identifier for Vehicles created within
            REVEAL. Null when no vehicle is associated with the last status.
          example: "34343423"
        VehicleName:
          type: string
          nullable: true
          description: The Vehicle Name as recorded within the REVEAL vehicle profile.
            Null when no vehicle is associated with the last status.
          example: Vehicle85
        RuleCycle:
          type: integer
          description: Shows the last Rule Cycle for the Driver (number of days).
          example: 8
        HoursAgainstRuleSet:
          $ref: "#/components/schemas/HoursAgainstRuleSet"
        LastStatus:
          type: string
          description: "The driver's last status received from the app, either entered by
            the driver through the LogBook App or proposed by an admin within
            the REVEAL account. Returned as the status name: OffDuty, Driving
            (on duty and driving, set automatically when the vehicle is driven),
            OnDutyNotDriving (logging Hours of Service but not driving),
            SleeperBerth (in the sleeper cabin, not driving) and, in rare cases,
            NoStatus or Diagnostic."
          example: OnDutyNotDriving
        LastStatusDateTimeUTC:
          type: string
          format: date-time
          description: The timestamp of the status change. Taken from the device time and
            sent to REVEAL as a UTC time. The remaining time can be calculated
            considering the last status time and date.
          example: 2019-08-07T06:48:02.88
        HoursRemainingSinceLastStatus:
          type: object
          description: "Time remaining since the last status, expressed in minutes (not
            hours). Daily Driving Minutes: the time this driver has left to
            drive today, at the point the status change was struck. Daily On
            Duty Minutes: the time this driver has left on duty today, at the
            point the status change was struck. Values default to 0 when the
            information is not available."
          properties:
            DailyDrivingMinutes:
              type: integer
              description: Daily driving time remaining, in minutes.
              example: 700
            DailyOnDutyMinutes:
              type: integer
              description: Daily on duty time remaining, in minutes.
              example: 900
        _links:
          $ref: "#/components/schemas/RemainingTimeLinks"
    ApiError:
      type: object
      description: Error returned when the driver number cannot be found or a request
        parameter is invalid.
      properties:
        Message:
          type: string
          description: A description of the error.
          example: "Driver Information not found for DriverNumber: 99"
    HoursAgainstRuleSet:
      type: object
      description: Driving time left for today and on-duty time left in the rule
        cycle, in hours. Values default to 0 when the information is not
        available.
      properties:
        DrivingLeftForToday:
          type: number
          format: double
          description: Driving time in hours left for today.
          example: 11.666667
        CycleTimeLeft:
          type: number
          format: double
          description: On-duty time in hours left in the current rule cycle.
          example: 59.9833336
    RemainingTimeLinks:
      type: object
      description: Supplemental API links available for additional reference. The
        remainingtime link is always returned; driver, vehicle and
        logbooksettings are returned only when the driver has a status in the
        last 6 months.
      nullable: true
      properties:
        remainingtime:
          $ref: "#/components/schemas/HyperlinkRef"
        driver:
          $ref: "#/components/schemas/HyperlinkRef"
        vehicle:
          $ref: "#/components/schemas/HyperlinkRef"
        logbooksettings:
          $ref: "#/components/schemas/HyperlinkRef"
    HyperlinkRef:
      type: object
      properties:
        href:
          type: string
          description: The hyperlink reference URL.
```
