» Workflow PATCH API Documentation

Update Milestone (Resource / Job Specific): /workflow/component/{component_uuid}/{component_record_id}/milestone

PATCH
https://dev-api.exsited.com/api/v3/workflow/component/{component_uuid}/{component_record_id}/milestone
Try It Out
Purpose

This API is used to update an existing milestone associated with a specific workflow state for a resource or job record. It allows modification of milestone metadata such as display name and description, reassignment of assignees, and updates to milestone alerts including alert timing, notification content, and recipients.

Use Case
  • Modify milestone details after initial creation.
  • Add or remove assignees (labours, employees, operators, or account contacts).
  • Update alert configurations such as trigger timing and notification content.
  • Maintain milestone accuracy when workflow responsibilities or schedules change.
Path Parameters
AttributeTypeDescription
component_uuidUUIDUnique identifier of the custom component associated with the workflow
component_record_idStringRecord ID of the resource or job within the component
Query Parameters

This endpoint does not support query parameters

Request Body
{
  "workflow_data": [
    {
      "data": [
        {
          "state_name": "WORKFLOW_STATE_NAME",
          "milestones": [
            {
              "uuid": "MILESTONE_UUID",
              "display_name": "MILESTONE_DISPLAY_NAME",
              "description": "MILESTONE_DESCRIPTION",
              "assignees": [
                {
                  "type": "ASSIGNEE_TYPE",
                  "employee_code": "EMPLOYEE_CODE"
                },
                {
                  "uuid": "EXISTING_ASSIGNEE_UUID"
                }
              ],
              "alerts": [
                {
                  "uuid": "ALERT_UUID",
                  "name": "ALERT_NAME",
                  "description": "ALERT_DESCRIPTION",
                  "time_interval": {
                    "trigger": "TRIGGER_TYPE",
                    "trigger_value": "TRIGGER_VALUE",
                    "trigger_unit": "TRIGGER_UNIT"
                  },
                  "notification_option": "NOTIFICATION_OPTION",
                  "email_html": "EMAIL_HTML_CONTENT",
                  "selected_labours": [
                    {
                      "uuid": "EXISTING_LABOUR_RECIPIENT_UUID"
                    }
                  ],
                  "selected_employees": [
                    {
                      "uuid": "EXISTING_EMPLOYEE_RECIPIENT_UUID"
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ]
}
AttributeTypeDescription
workflow_dataArrayContainer for workflow state and milestone update information
workflow_data.dataArrayList of workflow states being updated
state_nameStringName of the workflow state containing the milestone
milestonesArrayList of milestones to update within the workflow state
milestones.uuidUUIDUnique identifier of the milestone being updated
milestones.display_nameStringUpdated display name of the milestone
milestones.descriptionStringUpdated description of the milestone
milestones.assigneesArrayList of assignees to retain or add for the milestone
assignees.typeStringType of assignee (LABOUR, EMPLOYEE, OPERATOR, ACCOUNT)
assignees.employee_codeStringEmployee code used when adding a new employee assignee
assignees.labour_codeStringLabour code used when adding a new labour assignee
assignees.uuidUUIDUUID of an existing assignee to retain
milestones.alertsArrayList of alerts associated with the milestone
alerts.uuidUUIDUUID of an existing alert to update
alerts.nameStringName of the alert
alerts.descriptionStringDescription of the alert
alerts.time_intervalObjectConfiguration defining when the alert is triggered
time_interval.triggerStringTrigger timing relative to the milestone (before or after)
time_interval.trigger_valueIntegerNumeric value for alert timing
time_interval.trigger_unitStringUnit of time for the trigger (minute, hour, day)
alerts.notification_optionStringNotification delivery method
alerts.email_htmlStringHTML content for email notifications
alerts.selected_laboursArrayLabour recipients for the alert
alerts.selected_employeesArrayEmployee recipients for the alert
Response

Upon successful execution, the API returns the updated milestone details grouped by workflow, including updated milestone metadata, assignee mappings, and alert configurations. The response reflects the final persisted state after applying additions, removals, and updates to assignees and alert recipients.

Response Body
{
  "all_milestones": [
    {
      "workflow_uuid": "WORKFLOW_UUID",
      "milestones": [
        {
          "uuid": "MILESTONE_UUID",
          "name": "MILESTONE_NAME",
          "display_name": "MILESTONE_DISPLAY_NAME",
          "description": "MILESTONE_DESCRIPTION",
          "status": "MILESTONE_STATUS",
          "start_date": "START_DATE",
          "end_date": "END_DATE",
          "state_name": "WORKFLOW_STATE_NAME",
          "assignees": {
            "selected_labours": [
              {
                "uuid": "LABOUR_ASSIGNEE_UUID",
                "labour_code": "LABOUR_CODE"
              }
            ],
            "selected_employees": [
              {
                "uuid": "EMPLOYEE_ASSIGNEE_UUID",
                "employee_code": "EMPLOYEE_CODE"
              }
            ]
          },
          "alerts": [
            {
              "uuid": "ALERT_UUID",
              "name": "ALERT_NAME",
              "trigger": "TRIGGER_TYPE",
              "trigger_value": "TRIGGER_VALUE",
              "trigger_unit": "TRIGGER_UNIT",
              "alert_content": "EMAIL_HTML_CONTENT",
              "status": "ALERT_STATUS"
            }
          ]
        }
      ]
    }
  ]
}
AttributeTypeDescription
all_milestonesArrayList of workflows containing updated milestones
workflow_uuidUUIDUnique identifier of the workflow
milestonesArrayList of milestones updated under the workflow
milestones.uuidUUIDUnique identifier of the milestone
milestones.nameStringSystem-generated name of the milestone
milestones.display_nameStringUpdated display name of the milestone
milestones.descriptionStringUpdated description of the milestone
milestones.statusStringCurrent status of the milestone
milestones.start_dateDateTimeStart date of the milestone
milestones.end_dateDateTimeEnd date of the milestone
milestones.state_nameStringWorkflow state associated with the milestone
assigneesObjectGrouped assignee details for the milestone
alertsArrayList of updated alerts linked to the milestone
alerts.uuidUUIDUnique identifier of the alert
alerts.triggerStringTrigger timing configuration
alerts.trigger_valueIntegerTime value for alert triggering
alerts.trigger_unitStringUnit of time used for alert triggering
alerts.alert_contentStringNotification or email content
alerts.statusStringCurrent status of the alert

Looking to build next big project?

With our robust set of tools and resources, you can create custom solutions that integrate seamlessly with our system and take your business to the next level.

Join Our Partner Program