Get account information
getAccountInfo returns every attribute of an account: the fields that createAccount accepts, plus its ID, owner and current balance. The account must belong to the authenticated customer.
The method supports trusted mode. In trusted mode it finds an account of any customer, so i_customer is not needed.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
i_account |
int | one of | ID of the account |
username |
string | one of | Web login of the account, used when i_account is not given |
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK |
i_account |
int | ID of the account |
i_customer |
int | ID of the customer that owns the account |
balance |
double | Current balance, with the sign inverted (see below) |
credit_limit |
double | Credit limit |
| other members | The account’s attributes, named as the parameters of createAccount. privacy_schemas is an array of strings |
The attributes are members of the response itself, next to result. Passwords (web_password, voip_password, vm_password) are not returned.
Example
Section titled “Example”call("getAccountInfo", {"username": "1001"}){ "result": "OK", "i_account": 3092, "i_customer": 3, "username": "1001", "authname": "1001", "description": "Reception desk", "i_billing_plan": 42, "balance": -10.0, "credit_limit": 0.0, "max_sessions": 2, "blocked": 0, "email": "reception@example.com", # … the other createAccount fields}Errors
Section titled “Errors”| faultCode | Cause |
|---|---|
403, 404 |
No account with this ID or username belongs to the authenticated customer |
Related
Section titled “Related”- Accounts: the same fields in the panel
- Update an account
- List accounts
- Get customer information