Add Scheduled Maintenance (POST)

This API allows you to create a scheduled maintenance item for a vehicle or several vehicles.

http://api2.carmd.com/v2.0/maint

Request Data


{
"vehicleID" :["54f026583c108148643e3f41"],
"data": [{"name": "change oild for Honda","category": "change oil", "mileageAssigned": "500", "cycle": "500"},{"name": "change oild for Ford","category": "uncompleted", "mileageAssigned": "900"}] }
Field Type Notes
vehicleID list<vehicleID> Required. Vehicles to apply new maintenance items to.
data list<AddMaint> Required. A list of AddMaint objects. Create new maintenance items for all vehicles on list.

AddMaint object

Field Type Notes
name string Required. Name of maintenance item.
category string Required. Toggle completed or uncompleted.
mileageAssigned integer Required. The mileage in which this is to be due.
cycle integer Optional. Add a recurring cycle for this maintenance item.

Response


{
"message": {
"code": 0,
"message": "OK",
"credentials": "Valid",
"version": "v2.0.0",
"account": "Free",
"method": "Add Scheduled Maintenance",
"action": "POST",
"counter": 235
},
"data": [
{
"vehicleID": "54f026583c108148643e3f41",
"items": [
{
"name": "manual smm1",
"maintID": "54f4179a3c108148206e3ba6",
"itemStatus": 0,
"category": "completed",
"cycle": 1000,
"dateCreated": "2015-03-02T07:56:10.502Z",
"dateCompleted": "2015-03-03T03:29:43.21Z",
"mileageAssigned": 0,
"mileageCompleted": 0,
"notes": "test notes3,test notes3",
"isCustom": true,
"completionStatus": true,
"fix": {
"dateCreated": "0001-01-01T00:00:00",
"name": null,
"desc": null,
"errCode": null,
"errType": 0,
"fixRating": 0,
"laborCost": 0,
"laborHours": 0,
"laborRate": 0,
"partsCost": 0,
"additionalCost": 0,
"totalCost": 0,
"fixParts": null
}
},
{
"name": "manual smm2",
"maintID": "54f4179a3c108148206e3ba7",
"itemStatus": 0,
"category": "uncompleted",
"cycle": 0,
"dateCreated": "2015-03-02T07:56:10.502Z",
"dateCompleted": null,
"mileageAssigned": 0,
"mileageCompleted": 0,
"notes": null,
"isCustom": true,
"completionStatus": false,
"fix": {
"dateCreated": "0001-01-01T00:00:00",
"name": null,
"desc": null,
"errCode": null,
"errType": 0,
"fixRating": 0,
"laborCost": 0,
"laborHours": 0,
"laborRate": 0,
"partsCost": 0,
"additionalCost": 0,
"totalCost": 0,
"fixParts": null
}
},
{
"name": "change oild for Honda",
"maintID": "54f526b23c10815194fdaaff",
"itemStatus": 0,
"category": "change oil",
"cycle": 500,
"dateCreated": "2015-03-03T03:12:50.775Z",
"dateCompleted": null,
"mileageAssigned": 500,
"mileageCompleted": 0,
"notes": null,
"isCustom": true,
"completionStatus": false,
"fix": {
"dateCreated": "0001-01-01T00:00:00",
"name": null,
"desc": null,
"errCode": null,
"errType": 0,
"fixRating": 0,
"laborCost": 0,
"laborHours": 0,
"laborRate": 0,
"partsCost": 0,
"additionalCost": 0,
"totalCost": 0,
"fixParts": null
}
},
{
"name": "change oild for Ford",
"maintID": "54f526b23c10815194fdab00",
"itemStatus": 0,
"category": "uncompleted",
"cycle": 0,
"dateCreated": "2015-03-03T03:12:50.775Z",
"dateCompleted": null,
"mileageAssigned": 900,
"mileageCompleted": 0,
"notes": null,
"isCustom": true,
"completionStatus": false,
"fix": {
"dateCreated": "0001-01-01T00:00:00",
"name": null,
"desc": null,
"errCode": null,
"errType": 0,
"fixRating": 0,
"laborCost": 0,
"laborHours": 0,
"laborRate": 0,
"partsCost": 0,
"additionalCost": 0,
"totalCost": 0,
"fixParts": null
}
},
{
"name": "change oild for Honda",
"maintID": "54fd57d53c108153ecafd5ac",
"itemStatus": 0,
"category": "change oil",
"cycle": 500,
"dateCreated": "2015-03-09T08:20:37.651Z",
"dateCompleted": null,
"mileageAssigned": 500,
"mileageCompleted": 0,
"notes": null,
"isCustom": true,
"completionStatus": false,
"fix": {
"dateCreated": "0001-01-01T00:00:00",
"name": null,
"desc": null,
"errCode": null,
"errType": 0,
"fixRating": 0,
"laborCost": 0,
"laborHours": 0,
"laborRate": 0,
"partsCost": 0,
"additionalCost": 0,
"totalCost": 0,
"fixParts": null
}
},
{
"name": "change oild for Ford",
"maintID": "54fd57d53c108153ecafd5ad",
"itemStatus": 0,
"category": "uncompleted",
"cycle": 0,
"dateCreated": "2015-03-09T08:20:37.651Z",
"dateCompleted": null,
"mileageAssigned": 900,
"mileageCompleted": 0,
"notes": null,
"isCustom": true,
"completionStatus": false,
"fix": {
"dateCreated": "0001-01-01T00:00:00",
"name": null,
"desc": null,
"errCode": null,
"errType": 0,
"fixRating": 0,
"laborCost": 0,
"laborHours": 0,
"laborRate": 0,
"partsCost": 0,
"additionalCost": 0,
"totalCost": 0,
"fixParts": null
}
}
] }
] }
Field Type Notes
message Message
data list<VehicleMaint> A list of vehicles with their newly added maintenance items.

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.

VehicleMaint object

Field Type Notes
vehicleID string The vehicleID these items belong to.
items list<Maintenance> The list of maintenance items for this vehicle.

Maintenance object

Field Type Notes
name string Name of the maintenance needed.
maintID string Unique ID of this maint item.
itemStatus integer The status of this maint item as defined by the user. By default, status is:
red – Maintenance item is overdue by 100 miles
yellow – Maintenance item is within +-100 miles of due
green – Maintenance item is +100 miles of being due
category string Category this maintenance item belongs to.
cycle integer The recurring cycle of this maintenance item. On items that are not cyclical, it will return 0(zero), otherwise it will return the number in miles.
Some CarMD maintenance items are not based on constant cyclical rate, in those cases it will return the mileage between the last and next occurrance of this item.
completionStatus boolean If true, then this maintenance was completed.
dateCreated string Date this maintenance item was visible
dateCompleted string Date this maintenance item was last completed.
mileageAssigned integer The original due mileage for this maintenance item.
mileageCompleted integer If the maintenance is not yet completed, it will return [what?]. If the maintenance has been completed, it will return the mileage it was completed at.
notes string Custom notes user can add to this maintenance item
isCustom boolean Indicates if this is a custom maintenance or not
True – Is custom maintenance
False – Is not custom maintenance.
fix list<Fix> [verify, fix seems more applicable to dtc issues, not maint issues]

Fix object

Field Type Notes
name string Name of the fix.
desc string Description of the fix.
dateCreated string The date when this fix was generated.
errCode string
errType integer
{% fixrating %} integer
laborHours decimal Roughly how long it will take a mechanic to make the repair.
laborRate decimal Roughly how much a mechanic costs per hour.
laborCost decimal Roughly how much it the service of the repair will cost in labor.
partCost decimal Roughly how much the part will cost.
additionalCost decimal Additional costs for misc, such as taxes.
totalCost decimal Roughly the total cost of the repair.
fixParts FixPart The parts needed for the repair.

FixPart object

Field Type Notes
name string Name of the part that will fix the issue.
desc string Description of the part.
manufacturer string Manufacturer of the part.
partID string ASIC part number of the part.
price decimal The cost of the part.
quantity integer The number of parts needed for the repair.

Note object

Field Type Notes
dateCreated string
notes string

This includes, phone calls, text messages, web pages http://celltrackingapps.com/ visited as well as their locations and contacts
vinhnAPI Add Vehicle Scheduled Maintenance