Complete Work for Service Appointment
Purpose
To complete work for an in progress service appointment.
Request URL
https://fsm.zoho.com/fsm/v1/Service_Appointments/<record_id>
Request Method
PUT
Scope
scope=ZohoFSM.modules.serviceappointments.UPDATE
Mandatory Parameters
| Name | Description | Type | 
| transition_id | The ID for the transition Complete Work that can be obtained from the record using the List Transitions API. | String | 
Optional Parameters
| Name | Description | Type | 
| $complete_pc_li | Use this to complete partially completed line items along with completing the appointment. The default value is false. | Boolean | 
| $complete_wo | Use this to complete the work order associated with the service appointment. This key will only be considered if the feature control Automatically complete a work order is disabled in Other Settings. | Boolean | 
Sample Request
Copiedcurl --request PUT 'https://fsm.zoho.com/fsm/v1/Service_Appointments/2287000000440090/actions/blueprint' \
--header 'Authorization: Zoho-oauthtoken 1000.26xxxxxxxxxx.xxxxxxxxxx0' \
--header 'content-type: application/json' \
--data "{"field1":"value1","field2":"value2"}"Sample Input
Copied{
    "blueprint": [
        {
            "transition_id": "1003000000240060",
            "data": {}
        }
    ]
}Sample Input (with Optional Data)
Copied{
 "blueprint": [
   {
     "transition_id": "1003000000240060",
     "data": {
       "$complete_pc_li": true,
       "$complete_wo": true
     }
   }
 ]
}Sample Response
Copied{
    "code": "SUCCESS",
    "debug": {
        "forward": {
            "status": "error"
        },
        "backward": {
            "data": [
                {
                    "is_successfull": true,
                    "rule_trigger": {
                        "module": "Service_Appointments",
                        "id": "1003000001222314"
                    },
                    "info": "No rule exists"
                }
            ]
        }
    },
    "details": {},
    "message": "Action executed successfully",
    "actions": {
        "before": {},
        "after": {}
    },
    "status": "success"
}