Manipulate Resellers

Last updated by FlySIP Support on October 31, 2019 08:41

createCustomer()

This application is used to create new customer. Newly created customer belongs to customer that authenticated a request.

Implementation details

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

Mandatory parameters:

  • name - customer's name. String. Must be the unique one.
  • web_password - password to login to self-care interface. String.
  • i_tariff - Tariff. Integer. Null value should be used to assign own tariff, otherwise the ID of the existing tariff available for this customer should be used.

Optional parameters:

  • web_login - login to access self-care web-interface. String.
  • i_routing_group - i_routing_group. Integer.
  • balance - initial balance. Double.
  • credit_limit - Credit Limit. Double.
  • accounts_mgmt - accounts management rights. Integer. Value is a bitmask:
    • bit 0 - can add
    • bit 1 - can edit
    • bit 2 - can delete
  • customers_mgmt - customers management rights. Integer. Value is a bitmask:
    • bit 0 - can add
    • bit 1 - can edit
    • bit 2 - can delete
  • system_mgmt - system management rights. Integer.
  • accounts_matching_rule - accounts matching rule. String.
  • company_name - Company Name. String.
  • salutation - Mr./Ms... String.
  • first_name - First Name. String.
  • last_name - Last Name. String.
  • mid_init - M.I. String.
  • street_addr - Address. String.
  • state - Province/State. String.
  • postal_code - Postal Code. String.
  • city - City. String.
  • country - Country/Region. String.
  • contact - Contact. String.
  • phone - Phone. String.
  • fax - Fax. String.
  • alt_phone - Alternative Phone. String.
  • alt_contact - Alternative Contact. String.
  • email - E-Mail. String.
  • cc - CC. String.
  • bcc - BCC. String.
  • mail_from - mail's "From" header. String.
  • payment_currency - Payment Currency. String.
  • payment_method - Payments Preferred Method. Integer.
  • min_payment_amount - Payments Minimum Amount. Double.
  • api_access - if XMLAPI enabled. Integer.
  • api_password - password to access XMLAPI. String.
  • api_mgmt - if customer can manage own his sub-customer's XMLAPI access. Integer.
  • i_commission_agent - i_customer of commission agent. Integer.
  • commission_size - commission size in percents. Double.
  • tariffs_mgmt - tariffs management rights. Integer. Value is a bitmask:
    • bit 0 - can add
    • bit 1 - can edit
    • bit 2 - can delete
  • max_depth - max depth of subcustomers. Integer.
  • use_own_tariff - if customer can assign own tariff. Integer.
  • vouchers_mgmt - vouchers management rights. Integer. Value is a bitmask:
    • bit 0 - can add
    • bit 1 - can edit
    • bit 2 - can delete
  • description - Description. String.
  • i_password_policy' - Password Policy. Integer.
  • callshop_enabled - if callshop feature is enabled. Boolean.
  • overcommit_protection - if overcommit protection is enabled. Boolean.
  • overcommit_limit - overcommit limit in percents. Double.
  • did_pool_enabled - if DIDs pool feature is enabled. Boolean.
  • ivr_apps_enabled - if IVR application feature is enabled. Boolean.
  • asr_acd_enabled - if customer can view ASR/ACD reports. Boolean.
  • debit_credit_cards_enabled - if customer can save debit/credit cards info. Boolean.
  • conferencing_enabled - if conferencing feature is enabled. Boolean.
  • share_payment_processors - if customer can share his payment processors. Boolean.
  • dncl_enabled - if DNCL lookup is enabled. Boolean.
  • i_time_zone - Time Zone. Refer to Timezones List. Integer.
  • i_lang - Two character language code ('en' for English, 'ru' for Russian. Refer to Languages List). String.
  • i_export_type - Download Format. Refer to Download Formats List. Integer.
  • start_page - start page on log in. Integer.
  • css - CSS stylesheet body for CSS branding. String.
  • dns_alias - DNS alias for CSS branding. String.
  • max_sessions - limit concurrent calls for the customer. Integer. (nil field type with no data means Unlimited)
  • max_calls_per_second - limit call rate for the customer. Double. (nil field type with no data means Unlimited)

Returns:

  • result - OK means that customer has been created. String.
  • i_customer - i_customer of created customer. Integer.
  • XMLRPC fault in case of any error.

getCustomerInfo()

Allows to retrieve all attributes of a given customer. Customer should belong to the customer that authenticated the request.

Implementation details

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

Parameters:

  • i_customer (integer) or customer's name (string). Required

Returns:

  • result - OK means that query was successful. String.
  • customer - structure containing all attributes of the customer. The attributes are identical to input parameters of the createCustomer() function.

updateCustomer()

This application is used to update a customer. Only sub-customer that belongs to authenticated customer can be updated.

Implementation details:

  • Any parameter from createCustomer() function can be used. All parameters are optional, but at least one should be specified.
  • This function supports trusted mode in which case i_wholesaler (integer) parameter should be supplied.

Parameters:

  • i_customer - i_customer of updated customer. Integer. Required.

Returns:

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

deleteCustomer()

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

Implementation details

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

Parameters:

  • i_customer - i_customer of deleted customer. Integer. Required.

Returns:

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

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

Implementation details

This function supports trusted mode in which case i_wholesaler (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.
  • customers - an array containing structures:
    • i_customer - Integer.
    • name - String.
    • web_login - String.
    • description - String.
    • balance - Double.
    • credit_limit - Double.
    • base_currency - String.
  • XMLRPC fault in case of any error.

authCustomer()

This application is used to authenticate a customer.

Parameters:

  • username - username to login to selfcare interface. String. Required.
  • password - password to login to selfcare interface. String. Required.

Returns:

  • result - OK means that customer has been successfully authenticated. String.
  • i_customer - i_customer of authenticated customer. Integer.
  • i_web_user - i_web_user of authenticated customer. Integer.
  • i_access_level - i_access_level of authenticated customer. String.
  • XMLRPC fault in case of any error.
  • Error code 410 is returned when customer was successfully authenticated by One Time Password (see resetCustomerOneTimePassword()).

resetCustomerOneTimePassword()

This application is used to reset customer's one time password used to login into web interface. Authenticated customer can reset own password, password of its subcustomers or its users.

Parameters:

  • web_login - web login of customer or user. 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.