Service History

API

Understand a vehicle’s service history

Our Service History endpoint allows developers to access data about a vehicle's past service appointments, including cost and service notes.

How businesses use service history

Independent repair shops

Understand prior maintenance for better future service scheduling to see when a vehicle was last serviced and for what.

Auto insurance

Set accurate rates based on a vehicle’s service history and how well the vehicle has been maintained.

Car dealerships

Access detailed service reports, to see a vehicle's previous upkeep or issues. Improved valuation, accurate history data enable data-driven pricing and competitive lending rates.

An illustration of a connected vehicle on a winding road.

Service History

Retrieve service records tracked by the vehicle’s dealer or manually added by the vehicle owner.

const smartcar = require('smartcar');

// Get all vehicles associated with this access token
const {vehicles} = await smartcar.getVehicles("<access-token>");

// Construct a new vehicle instance using the first vehicle's id
const vehicle = new smartcar.Vehicle(vehicles[0], "<access-token>");

// Get the vehicle's service history
await vehicle.request(
      "GET", 
      "service/history"
);

/

// Example http response from Smartcar (service history)
[{
      "serviceId": null,
      "odometerDistance": 46047.22,
      "serviceDate": "2023-06-28T22:21:41.583Z",
      "serviceTasks": [
            {
            "taskId": "3262",
            "taskDescription": "Service Task 0"
            },
            {
            "taskId": "3041",
            "taskDescription": null
            },
            {
            "taskId": null,
            "taskDescription": null
            }
      ],
      "serviceDetails": [
            {
            "type": "Service Details Type 0",
            "value": "Service Details Value 0"
            },
            {
            "type": "Service Details Type 1",
            "value": null
            }
      ],
      "serviceCost": {
            "totalCost": null,
            "currency": null
      }
}]


import smartcar

# Get all vehicles associated with this access token
response = smartcar.get_vehicles("<access-token>")

# Construct a new vehicle instance using the first vehicle's id
vehicle = smartcar.Vehicle(response.vehicles[0], "<access-token>")

# Get the vehicle's service history
service = vehicle.request(
      "GET", 
      "service/history"
)
/

// Example http response from Smartcar (service history)
[{
      "serviceId": null,
      "odometerDistance": 46047.22,
      "serviceDate": "2023-06-28T22:21:41.583Z",
      "serviceTasks": [
            {
            "taskId": "3262",
            "taskDescription": "Service Task 0"
            },
            {
            "taskId": "3041",
            "taskDescription": null
            },
            {
            "taskId": null,
            "taskDescription": null
            }
      ],
      "serviceDetails": [
            {
            "type": "Service Details Type 0",
            "value": "Service Details Value 0"
            },
            {
            "type": "Service Details Type 1",
            "value": null
            }
      ],
      "serviceCost": {
            "totalCost": null,
            "currency": null
      }
}]


import com.smartcar.sdk.*;

// Get all vehicles associated with this access token
VehicleIds response = Smartcar.getVehicles("<access-token>");
String[] vehicleIds = response.getVehicleIds();

// Construct a new vehicle instance using the first vehicle's id
Vehicle vehicle = new Vehicle(vehicleIds[0], "<access-token>");

// Get the vehicle's service history
SmartcarVehicleRequest request = new SmartcarVehicleRequest.Builder()
      .method("GET")
      .path("service/history")
      .build();
VehicleResponse service =vehicle.request(request);

/

// Example http response from Smartcar (service history)
[{
      "serviceId": null,
      "odometerDistance": 46047.22,
      "serviceDate": "2023-06-28T22:21:41.583Z",
      "serviceTasks": [
            {
            "taskId": "3262",
            "taskDescription": "Service Task 0"
            },
            {
            "taskId": "3041",
            "taskDescription": null
            },
            {
            "taskId": null,
            "taskDescription": null
            }
      ],
      "serviceDetails": [
            {
            "type": "Service Details Type 0",
            "value": "Service Details Value 0"
            },
            {
            "type": "Service Details Type 1",
            "value": null
            }
      ],
      "serviceCost": {
            "totalCost": null,
            "currency": null
      }
}]


/

// Example http response from Smartcar (service history)
[{
      "serviceId": null,
      "odometerDistance": 46047.22,
      "serviceDate": "2023-06-28T22:21:41.583Z",
      "serviceTasks": [
            {
            "taskId": "3262",
            "taskDescription": "Service Task 0"
            },
            {
            "taskId": "3041",
            "taskDescription": null
            },
            {
            "taskId": null,
            "taskDescription": null
            }
      ],
      "serviceDetails": [
            {
            "type": "Service Details Type 0",
            "value": "Service Details Value 0"
            },
            {
            "type": "Service Details Type 1",
            "value": null
            }
      ],
      "serviceCost": {
            "totalCost": null,
            "currency": null
      }
}]


require 'smartcar'

# Get all vehicles associated with this access token
all_vehicles =  Smartcar.get_vehicles(token: token)

# Construct a new vehicle instance using the first vehicle's id
vehicle = Smartcar::Vehicle.new(
  token: "<access-token>",
  id: all_vehicles.vehicles.first
)

# Get the vehicle's service history
Service = vehicle.request(
      "GET", 
      "service/history"
)
/

// Example http response from Smartcar (service history)
[{
      "serviceId": null,
      "odometerDistance": 46047.22,
      "serviceDate": "2023-06-28T22:21:41.583Z",
      "serviceTasks": [
            {
            "taskId": "3262",
            "taskDescription": "Service Task 0"
            },
            {
            "taskId": "3041",
            "taskDescription": null
            },
            {
            "taskId": null,
            "taskDescription": null
            }
      ],
      "serviceDetails": [
            {
            "type": "Service Details Type 0",
            "value": "Service Details Value 0"
            },
            {
            "type": "Service Details Type 1",
            "value": null
            }
      ],
      "serviceCost": {
            "totalCost": null,
            "currency": null
      }
}]


See the API docs

Product features

  • Compatible with 36 car brands

    Compatible with 39 car brands

  • Friendly user consent flow

    Friendly user consent flow

  • Works on 2015 and newer vehicles

    Works on 2015 and newer vehicles

  • Trusted & secure

    Trusted & secure

  • Retrieve live data and trigger actions

    Access to live car data

  • SDKs for Go, Java, Node.js, Python, and Ruby

    SDKs for Go, Java, Node.js, Python, and Ruby

Learn more about Smartcar's APIs

Related industries

Fleet management

Offer automatic engine oil life checks as part of your fleet management software and predictive maintenance products.

On-demand services

Invite customers to schedule a maintenance visit when their vehicle’s engine oil reaches the end of its recommended life span.

What we’re building

Latency and frequency of data availability may vary between makes and models.