Manipulating Accounts

Last updated by FlySIP SoftSwitch on November 17, 2017 08:58

listAccounts()

This application is used to get list of accounts belonged to customer.

This function supports trusted mode in which case i_customer (integer) parameter should be supplied.

Parameters:

  • offset - skip fist offset records. Integer. Optional.
  • limit - return only limit records. Integer. Optional.

Returns:

  • result - OK means that query was successful. String.
  • accounts - an array containing structures:
    • i_account - Integer.
    • username - String.
    • description - String.
    • blocked - Boolean.
    • expired - Boolean.
    • balance - Double.
    • credit_limit - Double.
    • base_currency - String.
    • registration_status - Structure as returns getRegistrationStatus() or Null if account is not registered.
  • XMLRPC fault in case of any error.

Notes

Unlike createAccount()and getAccountInfo() functions, this function does not invert the balance, it returns positive number for the positive balance and negative number for positive balance.

deleteAccount()

This application is used to delete an account. Only account that belongs to authenticated customer can be delete.

Any active calls of the deleted accounts will be disconnected. (since 5.0)

The application support trusted mode and i_customer parameter should be supplied in this case.

Parameters:

  • i_account - i_account of deleted account. Integer. Required.

Returns:

  • result - OK means that account has been deleted successfully. String.
  • XMLRPC fault in case of any error. 

resetAccountOneTimePassword()

This application is used to reset account's one time password used to login into web interface. Only accounts of authenticated customer can be reset.

Parameters:

  • username - web login of account. String. Required.

Returns:

  • result - OK means that the password was successfully reset. String.
  • password - value the password was reset to. String.
  • XMLRPC fault in case of any error.