get_billing_plans
The request is available only for top accounts.
To get a list consisting of your own and your subordinate billing plans, use the account/get_billing_plans command:
svc=account/get_billing_plans¶ms={}
Response
If the request is completed successfully, a response of the following format is returned:
{
"plan": { /* Your billing plan. */
"parent": <text>, /* Parent plan name. */
"name": <text>, /* Billing plan name. */
"servicesModCounter": <uint>, /* Service modification counter. */
"historyPeriod": <int>, /* Period of time to store unit messages. */
"flags": <uint>, /* Flags. */
"denyBalance": <double>, /* Minimum balance required for paid features to function. */
"minDaysCounter": <int>, /* Minimum number of days before account is blocked. */
"blockBalance": <double>, /* Balance threshold for account to be blocked. */
"currencyFormat": <text>, /* Currency format. */
"descr": <text>, /* Billing plan description. */
"email": <text>, /* Email address. */
"enable_smtp": <text>, /* Email SMTP state. */
"smtp_host": <text>, /* SMTP host. */
"smtp_port": <text>, /* SMTP port. */
"smtp_login": <text>, /* SMTP login. */
"nfSmsSender": <text>, /* Notification sender phone. */
"cmdSmsSender": <text>, /* Command sender phone. */
"hwTypes": { /* Hardware object. */
"<hw_id>": {
"name": <text> /* Hardware name. */
},
...
},
"personal": {
"services": <object> /* Service object (see below). */
},
"combined": {
"services": <object> /* Service object (see below). */
}
},
"subPlans": [ /* List of subordinate billing plans. */
{
"parent": <text>, /* Parent plan name. */
"name": <text>, /* Billing plan name. */
"servicesModCounter": <uint>, /* Service modification counter. */
"historyPeriod": <int>, /* Message retention period. */
"flags": <uint>, /* Flags. */
"denyBalance": <double>, /* Minimum balance required for paid features. */
"minDaysCounter": <int>, /* Minimum number of days before account is blocked. */
"blockBalance": <double>, /* Block threshold. */
"currencyFormat": <text>, /* Currency format. */
"descr": <text>, /* Description. */
"email": <text>, /* Email address. */
"enable_smtp": <text>, /* SMTP enable flag. */
"smtp_host": <text>, /* SMTP host. */
"smtp_port": <text>, /* SMTP port. */
"smtp_login": <text>, /* SMTP login. */
"nfSmsSender": <text>, /* Notification sender phone. */
"cmdSmsSender": <text>, /* Command sender phone. */
"hwTypes": {
"<hw_id>": {
"name": <text> /* Hardware name. */
},
...
},
"personal": {
"services": <object> /* Service object. */
},
"combined": {
"services": <object> /* Combined service object. */
}
},
...
]
}
Services
"services":{ /* Service object where keys are correct service names. */
"<service_name>":{ /* Put correct service name instead of <service_name>. */
"type": <uint>,
"maxUsage": <int>,
"cost": <text>,
"interval": <uint>,
"descr": <text>,
"flags": <uint>,
"ct": <uint>,
"mt": <uint>
},
...
}
For a complete list of services, see account/get_account_data.