Job Activities

Update a Job Activity

Changed on

OAuth Scope

This endpoint requires the following OAuth scope manage_schedule.

post/jobactivity/{uuid}.json

Request

  • Base URL
    https://api.servicem8.com/api_1.0
  • URL
    https://api.servicem8.com/api_1.0/jobactivity/{uuid}.json
  • Auth
    • API key in header X-Api-Key
    • or OAuth 2
      Authorization code: https://api.servicem8.com/oauth/authorize
      Token URL: https://api.servicem8.com/oauth/access_token scopes: manage_schedule

Path parameters

uuidstring uuid required

UUID of the Job Activity

Request body

job_uuidstring uuid

The UUID of the job this activity belongs to

staff_uuidstring uuid

The UUID of the staff member assigned to this activity

start_datestring

The scheduled start date and time of the activity

end_datestring

The scheduled end date and time of the activity

activity_was_scheduledstring

Boolean flag indicating whether this activity was scheduled in advance. Cannot be true if activity_was_recorded is true.

activity_was_recordedstring

Boolean flag indicating whether this activity was recorded after completion rather than scheduled in advance. Cannot be true if activity_was_scheduled is true.

activity_was_automatedstring

Integer flag indicating if the activity was automated: 0

has_been_openedstring

Boolean flag indicating whether the assigned staff member has viewed this job activity. Resets to false if the staff member or start time is changed. Only relevant when activity_was_scheduled is true.

has_been_opened_timestampstring

The date and time when the assigned staff member first viewed this job activity. Format is YYYY-MM-DD HH:MM:SS. Resets when staff member or start time is changed. Only relevant when activity_was_scheduled is true.

travel_time_in_secondsinteger

The estimated travel time to reach this activity location in seconds

travel_distance_in_metersinteger

The estimated travel distance to reach this activity location in meters

allocated_by_staff_uuidunknown
allocated_timestampunknown
material_uuidstring uuid

The UUID of the material associated with this activity. Used to determine the cost of the activity.

uuidstring uuid

Unique identifier for this record

edit_by_staff_uuidstring uuid

UUID of Staff Member who last modified record

Example request

{
  "job_uuid": "123e4567-4574-4f07-8a7e-23f94f76144b",
  "staff_uuid": "123e4567-d648-48f1-9223-23f94b0c350b",
  "start_date": "2026-03-01 12:00:00",
  "end_date": "2026-03-01 12:00:00",
  "has_been_opened_timestamp": "2026-03-01 12:00:00",
  "material_uuid": "123e4567-24bc-41d2-91d5-23f9493d724b",
  "uuid": "123e4567-1330-427d-a253-23f94562fb8b",
  "edit_by_staff_uuid": "123e4567-e22b-4b03-952b-23f943c0658b"
}

Response

Success - The record was updated successfully

errorCodenumber
messagestring

Example response

{
  "message": "OK"
}

Changes

    • breaking

      the request property type changed from string to no type, and format from uuid to no format

    • breaking

      the request property type changed from string to no type

    • warning

      removed the request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status