activity_settings

By default, the driver activity source isn’t selected (0). To set a source, use the unit/update_activity_settings method. For the description of the sources, see Driver activity by online data.

Copied!
svc=unit/update_activity_settings&params={"itemId":<long>,
					  "type":<uint>}

Parameters

Parameter Description
itemId Unit ID
type Source type. The following types can be used:
  • 0: none
  • 1: assignments and trips
  • 2: parameters from tachograph

Response

If the request is completed successfully, the response is empty.

Copied!
{ } 

Otherwise, an error code is returned.

Error codes

Code Description
4 Invalid input parameters.
6 Failed to set a new type.
7 The unit doesn’t exist, or the user doesn’t have the Edit trip, driving and health check settings access right to it.

Getting the selected source

To get the selected activity source, use the unit/get_activity_settings method.

Copied!
svc=unit/get_activity_settings&params={"itemId":<long>}

Response

If the request is completed successfully, the response contains the source type.

Copied!
{
"type": <int>		/* selected source */ 
} 

Otherwise, an error code is returned:

Code Description
4 Invalid input parameters.
7 The unit doesn’t exist, or the user doesn’t have the View detailed object properties access right to it.

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