WorkActivities

Create a work activity for the specified work order

Creates a new work activity for the specified work order. The work activity type can be either Travel or Repair. Note that custom types may be configured for a subscriber. <br />Before creating a work activity, please consider the following:  • You can create work activities only for work orders in the In Progress primary status.  • The check-in date and time cannot be greater than the check-out date and time.  • The check-in date and time cannot be earlier than the scheduled date and time of the work order.  • The time range of the work activity you are creating cannot overlap the time ranges of existing work activities of the work order.  • The name will be set to the API caller name if the name value is not provided. <br />Note: Both subscribers and providers can use this method. <br />Note: Only users with extended permissions can specify the technician's name while creating a work activity. The users with extended permissions are:  • Subscribers that have the Admin role.  • Providers that have the Admin role (with the EditLaborItemsOnWoDetailsProvider feature flag turned on).  • Providers that have the Business Owner / Management role (with the EditLaborItemsOnWoDetailsProvider feature flag turned on). <br />Learn more about creating a work activity in ServiceChannel University. <br />Example Request

            POST /workorders/{workorderId}/workactivities
            {
               "WorkTypeId": "1",       
               "CheckInDate": "2020-11-19T11:10:36.868Z",
               "CheckOutDate": "2020-11-19T12:15:36.868Z",
               "Name": "John Doe"
            }
post/workorders/{workorderId}/workactivities

Request

Path parameters

workorderIdinteger required

The unique numeric identifier of the work order for which you want to create a work activity.

Request body

WorkTypeIdinteger

The type of activity performed: 1 — Repair, 2 — Travel. You can pass other values if custom types are set up for the subscriber.

CheckInDatestring date-time

The date and time when a technician started work on the service request. The format is YYYY-MM-DDThh:mm:ss.sssZ. The default is the current date and time.

CheckOutDatestring date-time

The date and time when a technician finished work on the service request. The format is YYYY-MM-DDThh:mm:ss.sssZ. The default is the current date and time.

Namestring

(Optional) The name of technician who worked on the service request.

Response

A work activity is created for the specified work order, and a unique work activity ID is returned in the response.

Changes

No recorded changes to this operation across all 1 revision of this API.