Update an account
updateAccount changes an account of the authenticated customer. Send only the fields you want to change; fields you leave out keep their values.
The method supports trusted mode with i_customer, the customer that owns the account.
Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
i_account |
int | one of | ID of the account |
account_name |
string | one of | Name (username) of the account, used when i_account is not given |
| any account field | at least one | Any parameter of createAccount except balance, with the same type and values |
All account fields are optional here, but at least one must be given. To rename the account, send the new username. To change a password, send the new web_password, voip_password or vm_password; leave the field out to keep the current one.
Returns
Section titled “Returns”| Name | Type | Description |
|---|---|---|
result |
string | OK |
Example
Section titled “Example”Move an account to postpaid with a credit limit of 50 and allow it three simultaneous calls:
call("updateAccount", { "i_account": 3092, "credit_limit": 50.0, "max_sessions": 3,}){"result": "OK"}Errors
Section titled “Errors”| faultCode | Cause |
|---|---|
403, 404 |
No account with this ID belongs to the authenticated customer |
Related
Section titled “Related”- Accounts: the same fields in the account form
- Create an account: the list of account fields
- Get account information
- Delete an account
- Set the next billing date of an account: the Next Billing Date, which
updateAccountcannot change