{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/maintenance/update.json","auth":"required","results":{"codes":[{"name":"","code":"{  \n   \"code\":200,\n   \"message\":\"Success\",\n   \"generatedAt\":\"Jul-24-2017, 06:01 AM UTC\"\n}","language":"json","status":200}]},"settings":"559288b86bf22f170075b794","params":[{"name":"alertName","type":"string","default":"","desc":"Name of the alert","required":true,"in":"body","ref":"","_id":"59895ca69332d300190f484c"},{"name":"alertNameUpdated","type":"string","default":"","desc":"Updated name of the alert. Pass this parameter only if you want to update the alert name","required":false,"in":"body","ref":"","_id":"59898b4e08523c0031ed6120"},{"name":"user","type":"array_string","default":"","desc":"Array of unique identifiers representing the users to which the alert is to be sent","required":true,"in":"body","ref":"","_id":"59895ca69332d300190f484b"},{"name":"notification","type":"boolean","default":"1","desc":"Boolean indicating if the alert notification is turned ON or OFF.","required":false,"in":"body","ref":"","_id":"59895ca69332d300190f484a"},{"name":"deletedServices","type":"array_int","default":"","desc":"Unique identifiers (id) of the service types to be deleted","required":false,"in":"body","ref":"","_id":"59898b4e08523c0031ed611f"},{"name":"serviceType","type":"array_object","default":"","desc":"Types of services","required":false,"in":"body","ref":"","_id":"59895db7a152dd001bc0bca3"},{"name":"id","type":"int","default":"","desc":"Unique identifier representing the service type. The following values are valid: 1 - Air Filter Replacement, 2 - Brake Inspection, 3 - Battery Inspection, 4 - Engine/Drive Belt Replacement, 5 - Engine Coolant Replacement, 6 - Engine Oil Replacement, 7 - Fuel Filter Replacement, 8 - General Service, 9 - Lubricate Chassis, 10 - Radiator Flush, 11 - Rear Axle Fluid Replacement, 12 - Spark Plug Replacement, 13 - Tire Rotation, 14 - Tire Replacement, 15 - Transmission Fluid Replacement, 16 - Wheel Alignment, 17 - Safety Inspection, 18 - DOT Inspection, 19 - Miscellaneous - Parts, 20 - Crane Inspection, 21 - Dielectric Testing Inspection, 22 - IFTA Updates, 23 - Public Service Commission inspection, 24 - External Annual Vehicle inspection","required":true,"in":"body","ref":"","_id":"59895db7a152dd001bc0bca2"},{"name":"mileage","type":"int","default":"","desc":"Alert threshold based on the miles driven by the vehicle. At least 1 of the following fields is mandatory: mileage, hours, months","required":false,"in":"body","ref":"","_id":"59895db7a152dd001bc0bca1"},{"name":"hours","type":"int","default":"","desc":"Alert threshold based on the vehicle’s engine run time (in Hours). At least 1 of the following fields is mandatory: mileage, hours, months","required":false,"in":"body","ref":"","_id":"59895db7a152dd001bc0bca0"},{"name":"months","type":"string","default":"","desc":"Alert threshold based on the time interval (in Months) of vehicle’s service. At least 1 of the following fields is mandatory: mileage, hours, months","required":false,"in":"body","ref":"","_id":"59895db7a152dd001bc0bc9f"},{"name":"lsd","type":"timestamp","default":"","desc":"Last service date in MM-DD-YYYY HH:MMAM/PM format","required":true,"in":"body","ref":"","_id":"59895db7a152dd001bc0bc9e"},{"name":"alertReminder","type":"object","default":"","desc":"Describes the frequency at which the reminder emails are to be sent","required":false,"in":"body","ref":"","_id":"59895db7a152dd001bc0bc9d"},{"name":"miles","type":"int","default":"","desc":"Number of miles before the actual threshold, the reminder email is to be sent","required":false,"in":"body","ref":"","_id":"59895db7a152dd001bc0bc9c"},{"name":"engineHours","type":"int","default":"","desc":"Number of engine hours before the actual threshold, the reminder email is to be sent","required":false,"in":"body","ref":"","_id":"59895db7a152dd001bc0bc9b"},{"name":"days","type":"int","default":"","desc":"Number of days before the actual threshold,  the reminder email is to be sent","required":false,"in":"body","ref":"","_id":"59895db7a152dd001bc0bc9a"}],"examples":{"codes":[]},"method":"post"},"next":{"description":"","pages":[]},"title":"Edit","type":"endpoint","slug":"edit-4","excerpt":"Use this API to edit an existing maintenance alert. Only one maintenance alert can be updated in a single API call.\n\nNote: You can not update the vehicle for which the alert is applied.","body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Sample Request\",\n  \"body\": \"https://api.azuga.com/azuga-ws/v1/maintenance/update.json\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{  \\n   \\\"alertName\\\":\\\"Maintenance Alert - W12\\\",\\n   \\\"user\\\":[  \\n      \\\"cad77fc0-2588-11e7-ac81-670c6342b1b5\\\"\\n   ],\\n   \\\"notification\\\":\\\"false\\\",\\n   \\\"deletedServices\\\":[  \\n      \\\"15\\\"\\n   ],\\n   \\\"serviceType\\\":[  \\n      {  \\n         \\\"id\\\":\\\"10\\\",\\n         \\\"Mileage\\\":\\\"20\\\", \\n         \\\"hours\\\":\\\"2\\\",\\n         \\\"months\\\":\\\"1\\\",\\n         \\\"lsd\\\":\\\"07-23-2017 12:00AM\\\"\\n      },\\n      {  \\n         \\\"id\\\":\\\"21\\\",\\n         \\\"mileage\\\":\\\"15\\\",\\n         \\\"hours\\\":\\\"\\\",\\n         \\\"months\\\":\\\"\\\",\\n         \\\"lsd\\\":\\\"07-24-2017 12:00AM\\\"\\n      },\\n      {  \\n         \\\"id\\\":\\\"23\\\",\\n         \\\"mileage\\\":\\\"15\\\",\\n         \\\"hours\\\":\\\"2\\\",\\n         \\\"months\\\":\\\"6\\\",\\n         \\\"lsd\\\":\\\"07-24-2017 12:00AM\\\"\\n      }\\n   ]\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Sample Payload\"\n    }\n  ]\n}\n[/block]\n##API Response Explanation\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"code\",\n    \"h-0\": \"Field\",\n    \"h-1\": \"Description\",\n    \"1-0\": \"message\",\n    \"2-0\": \"generatedAt\",\n    \"0-1\": \"API status code\",\n    \"1-1\": \"API Message (Success/Failure)\",\n    \"2-1\": \"API generation timestamp\"\n  },\n  \"cols\": 2,\n  \"rows\": 3\n}\n[/block]","updates":[],"order":999,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"59895b529ed6e8001bd6790c","project":"55926c913735880d005f7c65","version":{"version":"1","version_clean":"1.0.0","codename":"","is_stable":true,"is_beta":false,"is_hidden":false,"is_deprecated":false,"categories":["559286c7c39c4b2d00127a72","55928a98c39c4b2d00127a83","5592bd7b9a68220d00f1c3db","5593dcaf0e82e81700334e25","5594342f0c33bd0d000595a3","563081713998420d00a509e4","5630941c7581b80d00c51c86","56309f4ff1c0580d00fac666","567923b8239fac0d00c7df25","573306dea6a9c40e00e13875","577a288fd051530e00f65563","579af3982b865e17005a4357","57ee06aa1e42900e0014a374","5951f49a63f39000159e7ef1","5951f4c563f39000159e7ef2","598951542a9dfc000fcacd40","5b3375cc98cb500003e4b363","5bbcd4e29667280003084100"],"_id":"559286c6c39c4b2d00127a71","createdAt":"2015-06-30T12:08:38.768Z","project":"55926c913735880d005f7c65","releaseDate":"2015-06-30T12:08:38.768Z","__v":18,"forked_from":"559286b6c39c4b2d00127a6e"},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"MAINTENANCE","slug":"maintenance","order":9999,"from_sync":false,"reference":false,"_id":"598951542a9dfc000fcacd40","project":"55926c913735880d005f7c65","version":"559286c6c39c4b2d00127a71","createdAt":"2017-08-08T05:51:16.345Z","__v":0},"user":"5656a3dd5656350d001d83a0","createdAt":"2017-08-08T06:33:54.388Z","githubsync":"","__v":3}

postEdit

Use this API to edit an existing maintenance alert. Only one maintenance alert can be updated in a single API call. Note: You can not update the vehicle for which the alert is applied.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

alertName:
required
string
Name of the alert
alertNameUpdated:
string
Updated name of the alert. Pass this parameter only if you want to update the alert name
user:
required
array of strings
Array of unique identifiers representing the users to which the alert is to be sent
notification:
boolean1
Boolean indicating if the alert notification is turned ON or OFF.
deletedServices:
array of integers
Unique identifiers (id) of the service types to be deleted
serviceType:
array of objects
Types of services
id:
required
integer
Unique identifier representing the service type. The following values are valid: 1 - Air Filter Replacement, 2 - Brake Inspection, 3 - Battery Inspection, 4 - Engine/Drive Belt Replacement, 5 - Engine Coolant Replacement, 6 - Engine Oil Replacement, 7 - Fuel Filter Replacement, 8 - General Service, 9 - Lubricate Chassis, 10 - Radiator Flush, 11 - Rear Axle Fluid Replacement, 12 - Spark Plug Replacement, 13 - Tire Rotation, 14 - Tire Replacement, 15 - Transmission Fluid Replacement, 16 - Wheel Alignment, 17 - Safety Inspection, 18 - DOT Inspection, 19 - Miscellaneous - Parts, 20 - Crane Inspection, 21 - Dielectric Testing Inspection, 22 - IFTA Updates, 23 - Public Service Commission inspection, 24 - External Annual Vehicle inspection
mileage:
integer
Alert threshold based on the miles driven by the vehicle. At least 1 of the following fields is mandatory: mileage, hours, months
hours:
integer
Alert threshold based on the vehicle’s engine run time (in Hours). At least 1 of the following fields is mandatory: mileage, hours, months
months:
string
Alert threshold based on the time interval (in Months) of vehicle’s service. At least 1 of the following fields is mandatory: mileage, hours, months
lsd:
required
timestamp
Last service date in MM-DD-YYYY HH:MMAM/PM format
alertReminder:
object
Describes the frequency at which the reminder emails are to be sent
miles:
integer
Number of miles before the actual threshold, the reminder email is to be sent
engineHours:
integer
Number of engine hours before the actual threshold, the reminder email is to be sent
days:
integer
Number of days before the actual threshold, the reminder email is to be sent

Result Format


Documentation

[block:callout] { "type": "info", "title": "Sample Request", "body": "https://api.azuga.com/azuga-ws/v1/maintenance/update.json" } [/block] [block:code] { "codes": [ { "code": "{ \n \"alertName\":\"Maintenance Alert - W12\",\n \"user\":[ \n \"cad77fc0-2588-11e7-ac81-670c6342b1b5\"\n ],\n \"notification\":\"false\",\n \"deletedServices\":[ \n \"15\"\n ],\n \"serviceType\":[ \n { \n \"id\":\"10\",\n \"Mileage\":\"20\", \n \"hours\":\"2\",\n \"months\":\"1\",\n \"lsd\":\"07-23-2017 12:00AM\"\n },\n { \n \"id\":\"21\",\n \"mileage\":\"15\",\n \"hours\":\"\",\n \"months\":\"\",\n \"lsd\":\"07-24-2017 12:00AM\"\n },\n { \n \"id\":\"23\",\n \"mileage\":\"15\",\n \"hours\":\"2\",\n \"months\":\"6\",\n \"lsd\":\"07-24-2017 12:00AM\"\n }\n ]\n}", "language": "json", "name": "Sample Payload" } ] } [/block] ##API Response Explanation [block:parameters] { "data": { "0-0": "code", "h-0": "Field", "h-1": "Description", "1-0": "message", "2-0": "generatedAt", "0-1": "API status code", "1-1": "API Message (Success/Failure)", "2-1": "API generation timestamp" }, "cols": 2, "rows": 3 } [/block]

User Information

Try It Out

post
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}