Skip to main content
Omnitracs Knowledge Base

Driver->CanadaDriverLogReport2

CanadaDriverLogReport2 (Driver Function) 

This method returns all the required information for a driver's duty logs in the Canadian format. The information mirrors the driver log report on the Hours of Service web site. This web service populates the following fields in the output XML with a -1 if there is an invalid value instead of throwing an exception like CanadaDriverLogReport method:

  • <DistanceDriven>int</DistanceDriven>
  • <OffDuty>int</OffDuty>
  • <SleeperBerth>int</SleeperBerth>
  • <Driving>int</Driving>
  • <OnDutyNotDriving>int</OnDutyNotDriving>
  • <OnDutyToday>int</OnDutyToday>
  • <OnDutyThisWeek>int</OnDutyThisWeek>

Except the above mentioned difference both the web services are identical.

Request Parameters

The web service method takes the following input parameters:

Parameter Type Description
DriverID string The driver's unique identifier, as used on the mobile unit and the Hours of Service web site
StartDate dateTime Starting date (inclusive), in the driver's local time zone (Make sure the hours, minutes, and seconds value is 00:00:00, if not you will get inconsistent results)
EndDate dateTime Ending date (inclusive), in the driver's local time zone
CustomerName string Name of customer making web service call
DriverRegion CanadaRegions rule set to apply: CANMain or CANNorth
TimeResolutionInSeconds boolean * *This parameter specifies whether certain values in the response are returned in seconds or minutes. If true, values are returned in seconds; otherwise in minutes. The ELD duty status values Personal Conveyance and Yard Move are also returned if this parameter is true; otherwise, they are returned as Off Duty and On Duty, respectively. This parameter is optional. If the parameter is omitted, then values in the response are returned in minutes. See the response description for the affected fields.

 

XML Structure

  
<soap:Body>  
  <CanadaDriverLogReport>  
    <CanadaDriverLogReportRequest>  
      <DriverID>string</DriverID>  
      <StartDate>dateTime</StartDate>  
      <EndDate>dateTime</EndDate>  
      <CustomerName>string</CustomerName>  
      <DriverRegion>CANMain or CANNorth</DriverRegion>  
      <TimeResolutionInSeconds>boolean</TimeResolutionInSeconds>  
    </CanadaDriverLogReportRequest>  
  </CanadaDriverLogReport>  
</soap:Body>  

Response

The web service method provides the following information in the response document. All dates and times in the response document are in the driver's current depot time zone, unless noted otherwise below.

Parameters

CanadaDriverLogReportResult

Parameter Type Description
RequestRangeStart dateTime The "StartDate" set in the request document
RequestRangeEnd dateTime The "EndDate" set in the request document
RequestTime dateTime The time of the web service request, in UTC
DriverName string The driver's first + last name
CompanyName string Company name
CompanyAddress string Company's current address
DistanceUnit DistanceUnit KiloMeters for Canada region (Miles for US region)
NumberOfDays int Number of days in this set of duty logs
DriverRegion CanadaRegions enum The "DriverRegion" set in the request document
DriverCycle CANDefaultDutyCycleEnum None, SevenDay or FourteenDay
CanadaDailyDataList ArrayOfCanadaDailyData Array of CanadaDailyData structures

CanadaDailyData
This complex type represents a day in the driver's duty logs.

Parameter Type Description
DayDate dateTime The day's date, in the driver's local time zone
Documents string List of shipping documents (bills of lading)
Trailers string List of trailers hauled
Tractors string List of tractor driven
CoDrivers string Names of team drivers, if any
Company SiteAffiliation Company name and address active this day
Depot DepotAffiliation Driver's terminal or depot active this day
Carriers ArrayOfSiteAffiliation List of driver's affiliated carriers for the day
RuleSets ArrayOfRuleSetChange List of rule sets for the day
EditCount int Number of duty log edits
SensorFailureCount int Number of sensor failures
OffDuty int Total off-duty time (if TimeResolutionInSeconds is true in the request, then returned in seconds; otherwise minutes) , -1 if not available (includes Personal Conveyance durations)
SleeperBerth int Total sleeper berth time (if TimeResolutionInSeconds is true in the request, then returned in seconds; otherwise minutes), -1 if not available
Driving int Total on-duty time (if TimeResolutionInSeconds is true in the request, then returned in seconds; otherwise minutes), -1 if not available
OnDutyNotDriving int Total on-duty, but not driving, time (if TimeResolutionInSeconds is true in the request, then returned in seconds; otherwise minutes), -1 if not available (includes Yard Move durations)
OnDutyToday int Driving and on-duty (not driving) time (if TimeResolutionInSeconds is true in the request, then returned in seconds; otherwise minutes), -1 if not available
OnDutyThisWeek int Driving and on-duty (not driving) time for the driver's cycle (7/8 days) (if TimeResolutionInSeconds is true in the request, then returned in seconds; otherwise minutes), -1 if not available
DistanceDriven int Number of miles or kilometers driven, -1 if not available
StartOfDay string Driver's start of day (hours and minutes) and time zone, e.g., Midnight Pacific, 01:00 Central, 12:00 Eastern
DutyStatusInfoCount int Number of duty records in the DutyStatusInfoList
DutyStatusInfoList ArrayOfDutyStatusInfo List of duty records in the day
OffDutyDeferral ODD Off-duty deferral: None, Day1 or Day2
TractorCount int Number of elements in the TractorList
TractorList ArrayOfTractor Tractors driven and their odometer readings
DepotLocation DepotLocation Driver's affiliated home depot or terminal

Note: When times are reported in minute resolution, the daily totals will likely not add up to 24 hours (OffDuty, SleeperBerth, Driving & OnDutyNotDriving).

DutyStatusInfo
This complex type represents a single duty period in the driver's duty logs.

Parameter

Type

Description

StartTime

dateTime

Starting time of duty record, in driver's local time zone (if TimeResolutionInSeconds is false or omitted in the request, then StartTime will be truncated to the minute)

Duration

int

Amount of time this duty lasted (if TimeResolutionInSeconds is true in the request, then returned in seconds; otherwise minutes)

CurrentActivity

Activity

Activity type: Unknown, OffDuty, Sleeper, Driving, OnDuty, OffDutyDriving, PersonalConveyance, YardMove

Location

string

The location where the activity started

Flags

Flags

Complex type of flags for this activity

Comment1

string

Driver remark 1 for the activity

Comment2

string

Driver remark 2 for the activity

UsCycleResetTime

dateTime

34 Hour reset time

EditReason

string

Reason given when the activity was edited

Flags
A set of flags or markers for each duty period or activity.

Parameter

Type

Description

EditFlag

EditType enum

'None' means original activity with no correction; 'Original' means this activity has been corrected or edited; 'Correction' means this is the edit or corrected activity.

Confirmed

boolean

True if the driver has confirmed this activity.

SensorFailure

boolean

True if a sensor failure occurred during this activity.

DistanceEdit

boolean

True if the distance driven has been edited.

WaitingInOilWell

boolean

True if driver was waiting in oil well during this activity.

HazmatOnDutyRest

boolean

True if driver was taking rest while carrying hazardous load during this activity.

SiteAffiliation
The name, address and effective date for a driver's company or carrier.

Parameter

Type

Description

EffectiveTime

dateTime

Date and time site became effective for driver, in driver's local time zone

Name

string

Name of site or facility

FullName

string

Full name of site or facility, especially for company

Street1

string

Street address

Street2

string

Second line for street address

City

string

City or town

StateProvince

string

US state or Canadian province abbreviation

Postal

string

US zip code or Canadian postal code

Misc

string

Miscellaneous site or facility information, like a telephone number

DepotAffiliation

The name, address and effective date for a driver's depot. This type extends the SiteAffiliation type and adds the following parameters.

Parameter

Type

Description

TimeZoneOffset

int

Number of minutes offset from GMT/UTC (UTC time + offset = local time)

TimeZoneName

string

Name of time zone, adjusted for daylight savings if needed (e.g., Pacific Standard Time, Pacific Daylight Time)

TimeZoneAbbrev

string

Abbreviation for time zone, adjusted for daylight savings if needed (e.g., PST, PDT)

StartOfDay

int

Number of minutes past midnight, in the depot's local time, that the DOT day begins (e.g., 0 for midnight, 60 for 1 AM)

RuleSetChange

The rule set and its effective time for a driver.

Parameter

Type

Description

RuleSet

RuleSetEnum

Rule set active: USA, CANMain, CANNorth, USACalifornia, USAFlorida, USATexas, USAAlaska

EffectiveTime

dateTime

Date and time rule set began, in driver's local time zone

Tractor

Information about a tractor vehicle, its license plate number and odometer readings.

Parameter

Type

Description

TractorID

string

Tractor's unique identifier

LicensePlate

string

License plate number for tractor

OdometerStart

int

Odometer reading at start of day, in tenths of miles

OdometerEnd

int

Odometer reading at end of day, in tenths of miles

DepotLocation

Information about a driver's home terminal or depot.

Parameter

Type

Description

Street

string

Street address

City

string

City or town

Region

string

Province name

Postal

string

Postal code

XML Structure

  
<CanadaDriverLogReportResponse>  
  <CanadaDriverLogReportResult>  
    <RequestRangeStart>dateTime</RequestRangeStart>  
    <RequestRangeEnd>dateTime</RequestRangeEnd>  
    <RequestTime>dateTime</RequestTime>  
    <DriverName>string</DriverName>  
    <CompanyName>string</CompanyName>  
    <CompanyAddress>string</CompanyAddress>  
    <DistanceUnit>KiloMeters or Miles</DistanceUnit>  
    <NumberOfDays>int</NumberOfDays>  
    <DriverRegion>CANMain or CANNorth</DriverRegion>  
    <DriverCycle>None or SevenDay or FourteenDay</DriverCycle>  
    <CanadaDailyDataList>  
      <CanadaDailyData>  
        <DayDate>dateTime</DayDate>  
        <Documents>string</Documents>  
        <Trailers>string</Trailers>  
        <Tractors>string</Tractors>  
        <CoDrivers>string</CoDrivers>  
        <Company>  
          <EffectiveTime>dateTime</EffectiveTime>  
          <Name>string</Name>  
          <FullName>string</FullName>  
          <Street1>string</Street1>  
          <City>string</City>  
          <StateProvince>string</StateProvince>  
          <Postal>string</Postal>  
          <Misc>string</Misc>  
        </Company>  
        <Depot>  
          <EffectiveTime>dateTime</EffectiveTime>  
          <Name>string</Name>  
          <FullName>string</FullName>  
          <Street1>string</Street1>  
          <City>string</City>  
          <StateProvince>string</StateProvince>  
          <Postal>string</Postal>  
          <Misc>string</Misc>  
          <StartOfDay>int</StartOfDay>  
          <TimeZoneOffset>int</TimeZoneOffset>  
          <TimeZoneName>string</TimeZoneName>  
          <TimeZoneAbbrev>string</TimeZoneAbbrev>  
        </Depot>  
        <Carriers>  
          <Carrier>  
            <EffectiveTime>dateTime</EffectiveTime>  
            <Name>string</Name>  
            <FullName>string</FullName>  
            <Street1>string</Street1>  
            <City>string</City>  
            <StateProvince>string</StateProvince>  
            <Postal>string</Postal>  
            <Misc>string</Misc>  
          </Carrier>  
        </Carriers>  
        <RuleSets>  
          <RuleSetChange>  
            <RuleSet>USA, CANMain, CANNorth, USACalifornia, USAFlorida, USATexas, USAAlaska</RuleSet>  
            <EffectiveTime>dateTime</EffectiveTime>  
          </RuleSetChange>  
        </RuleSets>  
        <EditCount>int</EditCount>  
        <SensorFailureCount>int</SensorFailureCount>  
        <OffDuty>int</OffDuty>  
        <SleeperBerth>int</SleeperBerth>  
        <Driving>int</Driving>  
        <OnDutyNotDriving>int</OnDutyNotDriving>  
        <OnDutyToday>int</OnDutyToday>  
        <OnDutyThisWeek>int</OnDutyThisWeek>  
        <DistanceDriven>int</DistanceDriven>  
        <StartOfDay>string</StartOfDay>  
        <DutyStatusInfoCount>int</DutyStatusInfoCount>  
        <DutyStatusInfoList>  
          <DutyStatusInfo>  
            <StartTime>dateTime</StartTime>  
            <Duration>int</Duration>  
            <Activity>UnKnown or OffDuty or Sleeper or Driving or OnDuty or OffDutyDriving</Activity>  
            <DepotLocation>string</DepotLocation>  
            <Flags>  
              <EditFlag>None or Original or Correction</EditFlag>  
              <Confirmed>bool</Confirmed>  
              <SensorFailure>bool</SensorFailure>  
              <DistanceEdit>bool</DistanceEdit>  
              <WaitingInOilWell>bool</WaitingInOilWell>  
              <HazmatOnDutyRest>bool</HazmatOnDutyRest>  
            </Flags>  
            <Comment1>string</Comment1>  
            <Comment2>string</Comment2>  
            <UsCycleResetTime>dateTime</UsCycleResetTime>  
            <EditReason>string</EditReason>  
          </DutyStatusInfo>  
        </DutyStatusInfoList>  
        <OffDutyDeferral>None, Day1 or Day2</OffDutyDeferral>  
        <TractorCount>int</TractorCount>  
        <TractorList>  
          <Tractor>  
            <TractorID>string</TractorID>  
            <LicensePlate>string</LicensePlate>  
            <OdometerStart>int</OdometerStart>  
            <OdometerStart>int</OdometerEnd>  
          </Tractor>  
        </TractorList>  
        <DepotLocation>  
          <Street>string</Street>  
          <City>string</City>  
          <Region>string</Region>  
          <Postal>string</Postal>  
        </DepotLocation>  
      </CanadaDailyData>  
    </CanadaDailyDataList>  
  </CanadaDriverLogReportResult>  
</CanadaDriverLogReportResponse>  
  • Was this article helpful?