Table of Contents

Detailed information about account

To get detailed information about an account, use the command account/get_account_data:

svc=account/get_account_data&params={"itemId":<long>}

Parameters

Name Description
itemId resource (account) ID

Response

{
    "plan":<text>,		/* billing plan name */
    "enabled":<int>,		/* state: 0 - blocked, 1 - active */
    "flags":<uint>,		/* billing plan flags (see below) */
    "balance":<text>,		/* balance (with currency) */
    "daysCounter":<int>,	/* days counter */
    "settings": {
        "balance":<double>,		/* balance */
        "plan": {			/* billing plan settings */
            "flags":<uint>,		/* billing plan flags (see below) */
            "blockBalance":<int>,	/* block balance */
            "denyBalance":<int>,	/* deny balance */
            "minDaysCounter":<int>,	/* minimum days counter */
	    "services":{		/* services list */
			"type":<int>,		/* type: 1 - on demand; 2 - periodic */
			"usage":<uint>,		/* count of used items of a type */
			"maxUsage":<int>	/* maximum allowed items of a type */
			"cost":<text>,		/* cost table */
			"interval":<int>	/* reset interval: 0 - none, 1 - hourly, 2 - daily, 3 - weekly, 4 - monthly */
		},
		...
	     }
        },
	"personal":{			/* personal (account) settings */
		...			/* has the same format as billing plan settings */
	},
	"combined":{			/* combined settings (overlapping billing plan and account settings) */
		...			/* has the same format as billing plan settings */
	}
    },
    "dealerRights":<int>,	/* allow using dealer rights for current billing plan: 0 - no, 1 - yes */
    "subPlans":[<text>]		/* array of subplans */
}

Flags for billing plan, personal (account) and combined settings:

Flag Description
0x01 block users, if the balance is less than block balance
0x02 forbid to login to the system and stop account functioning if the balance is less than deny balance
0x08 limit device types by assigned
0x10 limit device types by any except assigned
0x20 every day decrease the days counter value, and block account when remained days value reaches the minimum value

Services list:

Service Type Description
alarms periodic Alarms counter.
avl_unit periodic Activate ability to create monitoring units.
avl_unit_group periodic Unit groups.
avl_resource periodic Accounts (minimum one account must be allowed to create)
avl_retranslator on demand Ability to activate/deactivate retranslator.
cms_manager on demand Access to CMS Manager site.
create_resources on demand For CMS Manager, to activate Create Accout button.
create_units on demand For monitoring site, to activate Create Unit button.
create_users on demand For monitoring site, to activate Create User button.
create_unit_groups on demand For monitoring site, to activate Create Group button.
custom_fields periodic Custom fields allowed for an object (unit, user, unit group).
custom_reports on demand Advanced reports on the monitoring site (used for units and users).
email_notification on demand Sending notifications by e-mail.
email_report on demand Sending a report by e-mail (job module).
drivers periodic Ability to create and manage drivers, use them in monitoring and reports.
jobs periodic Jobs counter.
messages on demand Messages mode.
net_access on demand Authorization through a service connector (Wialon Pro Client).
notifications periodic Notifications allowed to create.
periodic periodic The parameter to set a periodic charge for service as a whole, like monthly charge for the service.
pois periodic POI (places) counter.
reports on demand Access to the Reports mode.
reportsmngt on demand Access to GPRS traffic accounting (in unit properties, in jobs and notifications, in reports).
reporttemplates periodic Report mode, possibility to create report templates and generate reports by them.
This service is also responsible for trip detection and fuel consumption tabs in unit properties.
routes periodic Routes allowed for one unit
service_intervals periodic Possibility to set service intervals, control them, register services and generate reports on them.
sms on demand Sending SMS messages.
storage_user periodic Users to be created (minimum one user must be allowed to create).
unit_commands periodic Command aliases allowed for one unit.
unit_sensors periodic Sensors allowed for one unit.
wialon_mobile on demand Access to Wialon Mobile.
wialon_web on demand Access to the main interface of Wialon tracking system.
zones_library periodic Geofences count.

Errors

Code Value
1 invalid session
2 invalid service name
3 invalid result
4 invalid format or value of parameters
7 access denied