{"metadata":{"image":[],"title":"","description":""},"api":{"url":"/maintenance/add.json","auth":"required","method":"post","examples":{"codes":[]},"results":{"codes":[{"name":"","code":"{  \n   \"code\":200,\n   \"message\":\"Success\",\n   \"generatedAt\":\"Jul-24-2017, 05:21 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":"598955e59ed6e8001bd678e4"},{"name":"vehicleName","type":"string","default":"","desc":"Name of the vehicle","required":true,"in":"body","ref":"","_id":"598955e59ed6e8001bd678e3"},{"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":"598955e59ed6e8001bd678e2"},{"name":"notification","type":"boolean","default":"1","desc":"Boolean indicating if the alert notification is turned ON or OFF.","required":false,"in":"body","ref":"","_id":"598955e59ed6e8001bd678e1"},{"name":"serviceType","type":"array_object","default":"","desc":"Types of services","required":false,"in":"body","ref":"","_id":"598955e59ed6e8001bd678e0"},{"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":"598955e59ed6e8001bd678df"},{"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":"598955e59ed6e8001bd678de"},{"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":"598955e59ed6e8001bd678dd"},{"name":"months","type":"int","default":"","desc":"Alert threshold based on the time interval (in Months) of vehicle service. At least 1 of the following fields is mandatory: mileage, hours, months","required":false,"in":"body","ref":"","_id":"598955e59ed6e8001bd678dc"},{"name":"lsd","type":"timestamp","default":"","desc":"Last service date in MM-DD-YYYY HH:MMAM/PM format","required":true,"in":"body","ref":"","_id":"598955e59ed6e8001bd678db"},{"name":"alertReminder","type":"object","default":"","desc":"Describes the frequency at which the reminder emails are to be sent","required":false,"in":"body","ref":"","_id":"598955e59ed6e8001bd678da"},{"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":"598955e59ed6e8001bd678d9"},{"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":"598955e59ed6e8001bd678d8"},{"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":"598955e59ed6e8001bd678d7"}]},"next":{"description":"","pages":[]},"title":"Create","type":"endpoint","slug":"create-4","excerpt":"Use this API to create a maintenance alert that will notify you when your next vehicle service is due. While creating the API, you can set the conditions for triggering the alert.","body":"[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Sample Request\",\n  \"body\": \"https://api.azuga.com/azuga-ws/v1/maintenance/add.json\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{  \\n   \\\"alertName\\\":\\\"Maintenance Alert - W12\\\",\\n   \\\"vehicleName\\\":\\\"1674617864\\\",\\n   \\\"user\\\":[  \\n      \\\"cad77fc0-2588-11e7-ac81-670c6342b1b5\\\"\\n   ],\\n   \\\"notification\\\":\\\"false\\\",\\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\\\":\\\"15\\\",\\n         \\\"mileage\\\":\\\"\\\",\\n         \\\"hours\\\":\\\"3\\\",\\n         \\\"months\\\":\\\"\\\",\\n         \\\"lsd\\\":\\\"07-24-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   \\\"alertReminder\\\":{  \\n      \\\"miles\\\":\\\"10\\\",\\n      \\\"engineHours\\\":\\\"1\\\",\\n      \\\"days\\\":\\\"7\\\"\\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    \"h-0\": \"Field\",\n    \"h-1\": \"Description\",\n    \"0-0\": \"code\",\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 in UTC\"\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":"598951f12d0be8000f9af474","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-08T05:53:53.597Z","githubsync":"","__v":1}

postCreate

Use this API to create a maintenance alert that will notify you when your next vehicle service is due. While creating the API, you can set the conditions for triggering the alert.

Definition

{{ api_url }}{{ page_api_url }}

Parameters

Body Params

alertName:
required
string
Name of the alert
vehicleName:
required
string
Name of the vehicle
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.
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:
integer
Alert threshold based on the time interval (in Months) of vehicle 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/add.json" } [/block] [block:code] { "codes": [ { "code": "{ \n \"alertName\":\"Maintenance Alert - W12\",\n \"vehicleName\":\"1674617864\",\n \"user\":[ \n \"cad77fc0-2588-11e7-ac81-670c6342b1b5\"\n ],\n \"notification\":\"false\",\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\":\"15\",\n \"mileage\":\"\",\n \"hours\":\"3\",\n \"months\":\"\",\n \"lsd\":\"07-24-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 \"alertReminder\":{ \n \"miles\":\"10\",\n \"engineHours\":\"1\",\n \"days\":\"7\"\n }\n}", "language": "json", "name": "Sample Payload" } ] } [/block] ##API Response Explanation [block:parameters] { "data": { "h-0": "Field", "h-1": "Description", "0-0": "code", "1-0": "message", "2-0": "generatedAt", "0-1": "API status code", "1-1": "API Message (Success/Failure)", "2-1": "API generation timestamp in UTC" }, "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 }}