Driver->ClockInOut
ClockInOut (Driver Function)
The ClockInOut method allows customers to clock a driver in or out in HOS via integration (for example, with an existing customer's time clock system.)
Note: The ClockInOut web service will not update a driver's duty status logs immediately. Clock ins/outs are created as pending edits against the driver's current duty status. The driver must approve the edits upon logging into a vehicle.
XML Request
The ClockInOut function takes the following input parameters:
| Parameter | Type | Optional | Description |
|---|---|---|---|
| DriverID | String | No | Driver ID |
| City | String | No | Location: City |
| State | String, length = 2 | No | Location: State |
| Action | Enumeration | No | One of: ClockIn; ClockOut |
| EffectiveTime | DateTime | No | Time to use for recording the action in HOS, GMT |
<soap:Body>
<ClockInOut xmlns="http://www.qualcomm.com">
<clockInOutRequest>
<DriverID>string</DriverID>
<State>string</State>
<City>string</City>
<Action>ClockIn or ClockOut</Action>
<EffectiveTime>dateTime</EffectiveTime>
</clockInOutRequest>
</ClockInOut>
</soap:Body>
XML Response
The ClockInOut function response includes the following parameters:
| Parameter | Type | Description |
|---|
| DriverID | String | No | Driver ID |
| City | String | No | Location: City |
| State | String, length = 2 | No | Location: State |
| ClockinAction | Enumeration | No | One of: ClockIn; ClockOut |
| EventTime | DateTime | No | Time of event in HOS (GMT) |
| ResponseCode | Enumeration | Yes | One of Success_ClockIn or Successive_ClockIn or Success_ClockOut or Successive_ClockOut or Success_ClockOut_No_Change_Previous_OffDuty or Success_ClockOut_W_Change_Previous_OffDuty |
| Value | String | Yes | Additional information related to ResponseCode |
Notes:
- Failures are reported via soap faults.
- Each response will have either one that exactly one ResponseCode (if success) or one fault (if failure).
Details about success/failure return codes and associated value returned
Success:
| ResponseCode | Description | Value |
|---|---|---|
| Success_ClockIn | Driver clocked in successfully. His current duty status is now ON duty | N/A |
| Successive_ClokIn | Driver clocked in successfully. Driver's last action was also clock in | Time of previous clock in |
| Success_ClockOut | Driver clocked out successfully. His current duty status is now OFF duty | N/A |
| Successive_ClockOut | Driver clocked out successfully. Driver's last action was also clock out | Time of previous clock out |
| Success_ClockOut_No_change_previous_offduty | Driver clocked out successfully (and is Off duty). The time since the last status (log out of mobile) is longer than the maximum allowed to change it to On duty | Time of logout |
| Success_ClockOut_W_Change_Previous_OffDuty | Driver clocked out successfully (and is Off duty). The time since the last status (log out of mobile) was change it to On duty | Time of logout |
- All times returned are GMT
Failure:
| FaultString | Description | Value |
|---|---|---|
| Failure_Driver_Does_not_exist | Driver ID does not exist | DriverID |
| Failure_State_Not_Two_Character_Long | 'State' is not 2 characters long | N/A |
| Failure_Future_EffectiveTime | EffectiveTime is too far into the future | N/A |
| Failure_EffectiveTime_PriorTo_CurrentStatue | Clock request is prior to current duty status | N/A |
| Failure_Driver_On_Mobile | Driver is currently logged into a mobile unit | Tractor ID |
<soap:Body>
<ClockInOutResponse xmlns="http://www.qualcomm.com">
<ClockInOutResult>
<DriverID>string</DriverID>
<City>string</City>
<State>string</State>
<ClockInAction>ClockIn or ClockOut</ClockInAction>
<EventTime>dateTime</EventTime>
<ResponseCode>Success_ClockIn or Successive_ClockIn or Success_ClockOut or Successive_ClockOut or Success_ClockOut_No_Change_Previous_OffDuty or Success_ClockOut_W_Change_Previous_OffDuty</ResponseCode>
<Value>string</Value>
</ClockInOutResult>
</ClockInOutResponse>
</soap:Body>