Service intervals

To create, edit or delete service intervals, use the command unit/update_service_interval:

svc=unit/update_service_interval&params={"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

Name Description
itemId unit ID
id service interval ID
callMode action: create, update, delete
Parameters required only to create and update:
n name of interval
t description
im mileage interval
it days interval
ie engine hours interval
pm last service for mileage interval, km
pt last service for days interval, sec (UTC)
pe last service for engine hours interval, h
c done times

Response

On create and edit:

[
	<long>,		/* service interval ID */
	{
		"id":<long>,	/* service interval ID */
		"n":<text>,	/* name */
		"t":<text>,	/* description */
		"im":<uint>,	/* mileage interval */
		"it":<uint>,	/* days interval */
		"ie":<uint>,	/* engine hours interval */
		"pm":<uint>,	/* last service for mileage interval, km */
		"pt":<uint>,	/* last service for days interval, sec (UTC) */
		"pe":<uint>,	/* last service for engine hours interval, h */
		"c":<uint>	/* done times */
	}
]

On delete:

[
	<long>,		/* service interval ID */
	null
]