Apply Maintenance Status Policy (PUT)

Apply a maintenance status policy to organization, fleet, or vehicle. In cases of overlapping status policies, the newer policy is always accepted over the older one.

http://api2.carmd.com/v2.0/maintstatuspolicy/apply

Request Data


{
"policies": ["54d9982135201017dc2e9aad","54d9a47635201004f8e97320"],
"targets": [{"TargetID":"54dc6adf9fbcdf3c40e5a4b7","TargetType" : "3"}, {"TargetID":"54ee93923c10814b14e60447","TargetType" : "3"}] }
Field Type Notes
policies list<string> Required. A list of maintStatPolicyIDs to apply. Will apply all policies to target.
targets list<Target> Required. The targets of the organizations, fleets, or vehicles to apply policies to.

Target object

Field Type Notes
TargetId string The ID of the organizations, fleets, or vehicles to apply.
TargetType integer The type target: 1 -organizations, 2 -fleets, or 3 -vehicles

Response


{
"message": {
"code": 0,
"message": "OK",
"credentials": "Valid",
"version": "v2.0.0",
"account": "Free",
"method": "Apply Maintenance Status Policy ",
"action": "PUT",
"counter": 228
},
"data": true
}
Field Type Notes
message Message
data boolean True – If successful
False – If failure

Message object

Field Type Notes
code string Message code.
message string Ok or Failed.
credentials string Valid or Invalid.
version string v2.0.0
account string Free or Premium
method string Name of the API called
action string returns a GET, POST, PUT, DELETE
counter integer Counter for this request. Increments by one for every request made. This is only important for free users who have a limited number of API requests.

vinhnApply Maintenance Status Policy