update_report_settings

To update parameters used in reports, use the unit/update_report_settings method:

Copied!
svc=unit/update_report_settings&params={
  "itemId": <long>,
  "params": {
    "speedLimit": <uint>,
    "maxMessagesInterval": <uint>,
    "dailyEngineHoursRate": <uint>,
    "urbanMaxSpeed": <uint>,
    "mileageCoefficient": <double>,
    "fuelRateCoefficient": <double>,
    "maxDistanceBetweenCoordinates": <uint>,
    "maxMessagesSpeed": <uint>,
    "speedingTolerance": <uint>,
    "speedingMinDuration": <uint>,
    "speedingMode": <uint>
  }
}

Parameters

The request must contain the following parameters:

Parameter Description
itemId Unit ID.
params Object with report settings. See Report settings.

Report settings

The params object can contain the following keys. Each key is optional. If you omit a key, the current value of this setting doesn’t change. A key with a value of the wrong type is ignored.

Key Description
speedLimit Speed limit, km/h.
maxMessagesInterval Maximum interval between messages, s.
dailyEngineHoursRate Daily rate of engine hours, s.
urbanMaxSpeed Urban speed limit, km/h.
mileageCoefficient Mileage coefficient.
fuelRateCoefficient Fuel rate.
maxDistanceBetweenCoordinates Maximum distance between coordinates.
maxMessagesSpeed Maximum speed.
speedingTolerance Allowed speeding, km/h (used if speedingMode = 1).
speedingMinDuration Minimum speeding time, s.
speedingMode Speeding detection mode:
0: use speedLimit
1: use map data

If speedingMode = 0 and speedLimit = 0, then no speeding table is generated.

Response

If the request is completed successfully, an empty object is returned:

Copied!
{}

Otherwise, an error code is returned.

Error codes

Error code Description
4 Wrong input parameters.
6 Failed to update a parameter from the params object.
7 The unit doesn’t exist, or the user doesn’t have the Edit trip, driving and health check settings access right to it.

If you find a mistake in the text, please select it and press Ctrl+Enter.