Command disabled: backlink

Current account details

To get information about billing plan settings of current user (billing plan name, balance, days left, available services), account and combined settings, use the command core/get_account_data:

svc=core/get_account_data&params={"type":<int>}

Parameters

Name Description
type type of result JSON

Types of response:

  • 1 – minimal information, usually required to estimate the state of logged user;
  • 2 – detailed information with combined, personal and billing plan settings.

Response

Minimal information:

{
	"plan":<text>,			/* billing plan name */
	"enabled":<int>,		/* state: 0 - blocked, 1 - active */
	"​created":<​uint>,/​* creation time (unix time) */
	"flags":<uint>,			/* billing plan flags */
	"balance":<text>,		/* balance (with currency) */
	"daysCounter":<int>,		/* days counter */
	"services":{			/* services list */
		<text>:{			/* name */
			"type":<int>,		/* type: 1 - on demand; 2 - periodic */
			"usage":<uint>,		/* quantity of active resources of current service */
			"maxUsage":<int>	/* maximal quantity of resources */
		},
		...
	},
	"dealerRights":<int>,		/* allow using dealer rights for current billing plan: 0 - no, 1 - yes */
	"subPlans":[<text>],		/* array of subplans */		
	"​switchTime":<uint>/​* time of switch "​enabled" param​ */ 
}

Detailed information:

{
	"plan":<text>,			/* billing plan name */
	"enabled":<int>,		/* state: 0 - blocked, 1 - active */
	"flags":<uint>,			/* flags - duplicates the same flags from billing plan settings (see the "plan" field below) */
	"balance":<text>,		/* balance (with currency) */
	"daysCounter":<int>,		/* days counter */
	"settings":{			
		"balance":<double>,		/* balance */
		"plan":{			/* billing plan settings */
			"flags":<uint>,		/* billing plan flags */
			"blockBalance":<int>,	/* block balance */
			"denyBalance":<int>,	/* deny balance */
			"minDaysCounter":<int>,	/* minimum days counter */
			"historyPeriod":<int>,	/* history period to store messages, in days (if 0 - unlimited) */
			"services":{		/* services list */
				<text>:{		/* name */
					"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 */
		}
	},
	"siteAccess":{
			"<service_name>":"<dns_name>",		/* where key is service name and value is dns-name */
			...
	},
	"dealerRights":<int>,	/* allow using dealer rights for current billing plan: 0 - no, 1 - yes */
	"subPlans":[<text>]	/* array of subplans */
}

You can find available values of billing plan and account flags, as well as list of services in the chapter Detailed information about account.

Follow us on Facebook Gurtam Wialon Twitter Gurtam Wialon info@gurtam.com   |   Copyright © 2002-2024 Gurtam