Order Service
Work Order State Transition
Transition the current state of a work-order using client-details
1min
code examples curl location globoff request put 'https //{base url}/core/api/v1/orders/state machine/config/clients/{clientid}/orders/{clientorderid}/work order/{workorderid}/state/event' \\ \ header 'accept application/json' \\ \ header 'content type application/json' \\ \ data '{ "eventcode" "" }'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var raw = json stringify({ "eventcode" "" }); var requestoptions = { method 'put', headers myheaders, body raw, redirect 'follow' }; fetch("https //{base url}/core/api/v1/orders/state machine/config/clients/{clientid}/orders/{clientorderid}/work order/{workorderid}/state/event", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //{base url}/core/api/v1/orders/state machine/config/clients/{clientid}/orders/{clientorderid}/work order/{workorderid}/state/event") https = net http new(url host, url port) https use ssl = true request = net http put new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" request body = json dump({ "eventcode" "" }) response = https request(request) puts response read body import requests import json url = "https //{base url}/core/api/v1/orders/state machine/config/clients/{clientid}/orders/{clientorderid}/work order/{workorderid}/state/event" payload = json dumps({ "eventcode" "" }) headers = { 'accept' 'application/json', 'content type' 'application/json' } response = requests request("put", url, headers=headers, data=payload) print(response text) responses // ok { "error" { "code" "", "description" "", "additionalinfo" {} }, "request" { "uri" "", "method" "", "querystring" "", "body" {} }, "data" { "id" "" } }// error occurred { "error" { "code" "", "description" "", "additionalinfo" {} }, "request" { "uri" "", "method" "", "querystring" "", "body" {} } }// error occurred { "error" { "code" "", "description" "", "additionalinfo" {} }, "request" { "uri" "", "method" "", "querystring" "", "body" {} } }// error occurred { "error" { "code" "", "description" "", "additionalinfo" {} }, "request" { "uri" "", "method" "", "querystring" "", "body" {} }, "data" { "id" "" } }