Perform a Work Order Transition
Purpose
To perform a transition on a work order. The transitions that are supported for a work order are:
Complete, Cancel, Terminate
Request URL
https://fsm.zoho.com/fsm/v1/Work_Orders/<record_id>
record_id - The unique ID of the record.
Request Method
PUT
Scope
scope=ZohoFSM.modules.WorkOrders.UPDATE
Input JSON Keys
| Name | Description | Type | Mandatory | 
| transition_id | The ID of the transition you want to perform on the work order. It can be obtained from the record using the List Work Order Transitions API. | String | Yes | 
| data | Use this to add notes while canceling or terminating a work order. N.B. Error will be thrown if the user does not have the Notes -> Create permission.  | Map | Mandatory when canceling or terminating a work order. | 
Optional Parameters
| Name | Description | Type | 
| $force_complete | Complete partially completed line items (if any) and complete the work order. An error will be thrown in the following cases: 
  | Boolean | 
Sample Request
Copiedcurl --request PUT 'https://fsm.zoho.com/fsm/v1/Work_Orders/4776000000265036/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": "4776000000169090",
            "data": {
                "Notes": "Customer has cancelled the request"
            }
        }
    ]
}Sample Input (with Optional Data)
Copied{
 "blueprint": [
   {
     "transition_id": "1003000000240084",
     "data": {
    "$force_complete": true
    }
   }
 ]
}Sample Response
Copied{
    "code": "SUCCESS",
    "details": {},
    "message": "Action executed successfully",
    "actions": {
        "before": {},
        "after": {}
    },
    "status": "success"
}Sample Error Response
Copied{
    "code": "INVALID_DATA",
    "details": {},
    "message": "Complete all associated Line Items to complete work order",
    "status": "error"
}