update_service_interval
To create, edit or delete sensors, use the unit/update_sensor method:
svc=unit/update_service_interval¶ms={
"itemId":<long>,
"id":<long>,
"callMode":<text>,
"n":<text>,
"t":<text>,
"im":<uint>,
"it":<uint>,
"ie":<uint>,
"pm":<uint>,
"pt":<uint>,
"pe":<uint>,
"c":<uint>
}
Parameters
The request must contain the following parameters:
Parameter | Description |
---|---|
itemId | Unit ID. |
id | Service interval ID. |
callMode | Action: create, update, delete. |
To create or update a service interval, the followig parameters are also required:
Parameter | Description |
---|---|
n | Interval name. |
t | Description. |
im | Mileage interval. |
it | Day interval. |
ie | Engine hours interval. |
pm | Last service for a mileage interval, km. |
pt | Last service for a day interval, s (UTC). |
pe | Last service for an engine hours interval, h. |
c | Number of times the service was carried out. |
Response
If the request to create or edit a service interval is completed successfully, a response in the following format is returned:
[
<long>, // Service interval ID.
{
"id": <long>, // Service interval ID.
"n": "<text>", // Name.
"t": "<text>", // Description.
"im": <uint>, // Mileage interval.
"it": <uint>, // Day interval.
"ie": <uint>, // Engine hours interval.
"pm": <uint>, // Last service for a mileage interval, km.
"pt": <uint>, // Last service for a day interval, s (UTC).
"pe": <uint>, // Last service for an engine hours interval, h.
"c": <uint> // Number of times the service was carried out.
}
]
If the request to delete a service interval is completed successfully, a response in the following format is returned:
[
<long>, /* Service interval ID. */
null
]
Error codes
Error code | Description |
---|---|
4 | Wrong input parameters or failed to update the service interval. |
6 | Failed to delete the service interval. |
7 | No ADF_ACL_AVL_UNIT_EDIT_SENSORS access right to the unit. |