Skip to content

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.

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
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.

request
call("getAccountInfo", {"username": "1001"})
response
{
"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
}
faultCode Cause
403, 404 No account with this ID or username belongs to the authenticated customer