Provider Check-In/Out
Report the time spent on work without providing the GPS coordinates of the technician’s position. You should receive the same MechanicId
for both API requests.
Important: The XML check-in/out permission is required.
Report Provider Check-In
To start recording the work activity, send this API request:
POST /workorders/{workorderId}/universalCheckIn
Header | Value |
---|---|
Content-Type | application/json |
Parameter | Parameter type | Example value |
---|---|---|
workorderId | Path | 107002896 |
Check-in request | Body | See below |
Check-in request fields description
Attribute | Description | Required | Default |
---|---|---|---|
WorkTypeId | The unique ID of the check-in/out type. | Optional | 1 |
UserId | The user ID of the technician that is checking in. Use the same UserId for one pair of check-in and check-out records. |
Optional | The current user’s ID |
TechsCount | The number of technicians that are checking in. | Optional | 1 |
CheckInTime | The date and time of the check-in. Either indicate the time in UTC or pass the current time and add the UTC offset, for example, 2018-10-30T11:00:00-04:00 . |
Optional | The current date and time |
POST https://sb2api.servicechannel.com/v3/workorders/107002896/universalCheckIn HTTP/1.1
Authorization: Bearer {access_token}
Content-Type: application/json
{
"WorkTypeId": 1,
"UserId": 1544987,
"TechsCount": 2,
"CheckInTime": "2018-10-23T07:00:00Z"
}
Example response:
{
"MechanicId": 148797639
}
Response code: HTTP/1.1 200 OK
Note: When you check in, the WO status is automatically changed to IN PROGRESS / ON SITE.
Report Provider Check-Out
To stop the work activity, issue this API call:
POST /workorders/{workorderId}/universalCheckOut
Header | Value |
---|---|
Content-Type | application/json |
Parameter | Parameter type | Example value |
---|---|---|
workorderId | Path | 107002896 |
Check-out request | Body | See below |
Check-out request fields description
Attribute | Description | Required | Default |
---|---|---|---|
WorkTypeId | The unique ID of the work type. | Optional | 1 |
PrimaryStatus | The status that you set for the WO when checking out. Possible values: NoStatusChange , InProgress , WaitingForQuote , PartsOnOrder , Incomplete , and Completed . |
Required. Not required when ActionStatus = Cancel . |
NoStatusChange |
ExtendedStatus | The extended status that you set for the WO when checking out. | Optional. Not required when ActionStatus = Cancel . |
|
ActionStatus | The status of the action. Possible values: Complete , Cancel . Both values result in recording a check-out.Complete means that the technician has finished their job and can stop the time reported as “repair”.Cancel means the technician needs to pause the time reported as “repair”, for example, to have a break outside of the location. |
Optional | Complete |
Resolution | The comment entered when checking out. Usually describes what was done during the recorded time. | Optional | |
UserId | The user ID of the technician that is checking out. Use the same UserId for one pair of check-in and check-out records. |
Optional | The current user’s ID |
CheckOutTime | The date and time of the check-out. Either indicate the time in UTC or pass the current time and add the UTC offset, for example, 2018-10-30T11:00:00-04:00 . |
Optional | The current date and time |
POST https://sb2api.servicechannel.com/v3/workorders/107002896/universalCheckOut HTTP/1.1
Authorization: Bearer {access_token}
Content-Type: application/json
{
"WorkTypeId": 1,
"PrimaryStatus": "PartsOnOrder",
"ActionStatus": "Complete",
"Resolution": "We need more screws",
"UserId": 1544987,
"CheckOutTime": "2018-10-23T08:00:00Z"
}
Example response:
{
"MechanicId": 148797639
}
Response code: HTTP/1.1 200 OK