DispatchOne Solution
Vehicle API
Vehicle Lifecycle
2min
the vehicle lifecycle defines the states that a vehicle can be in from when it is acquired to when it is retired a vehicle has the following five lifecycle states onboarding the vehicle data is being entered and/or verified active available the vehicle is operational and is available for use in use the vehicle is operational and is already being assigned a task unavailable the vehicle is operational but not available for use (to be used after repair, maintenance, etc downtime) inactive the vehicle is not operational to retrieve the current state of a vehicle, call the get vehicle state endpoint to change the state of a vehicle, call the transition vehicle state get the current state endpoint, and pass the following parameters in the request body member description tostate any state associated with respect to event transition reasoncode (optional) a valid reason code associated with the event eventcode (optional) event code of the transition event request bodies are specified in json format the following example request body shows how to change the state of the vehicle { "eventcode" "e 456", "reasoncode" "r 123", "tostate" "active\ available" }