1. Types of API requests

There are two ways in which requests to the Smartcar API can be triggered:

  1. User-triggered: Your application makes a request to Smartcar based on a user-initiated action (e.g. pressing a button in a mobile application).

    a. We recommend having a loading state for user-triggered requests in order to give users a visual cue that their request is being sent.

    b. Your application should expect a maximum response latency of 300 seconds. On average, requests should take between three and 45 seconds.

latencyOfResponse

  1. Application-triggered: Your application sends requests on a scheduled basis to retrieve vehicle data (e.g. retrieving an odometer reading at the end of every month).

    a. We recommend that you spread out the request load over time. As a rule of thumb, you should make less than 10 requests per minute to Smartcar. In addition, you should make less than 20 requests per vehicle per hour.

    b. To learn more about your application’s rate limits, please contact our support team.

2. Batch requests

If your application needs to make requests to multiple endpoints at the same time (e.g. retrieve a vehicle’s odometer and fuel tank level), we recommend using the /batch endpoint. This endpoint allows you to retrieve multiple pieces of information from one vehicle with a single API request.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
vehicle.batch(["/odometer", "/location"]).then(function(response) {
  console.log(response["/odometer"]);
  console.log(response["/location"]);
})