MOR API user details raw get

From Kolmisoft Wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

Description

MOR API user details raw

Admin – can get any user details
Reseller – can get only his users details.
Partner – can get only his users details.
Accountant (with "Manage Users" Read/Write permission) – can get any user details except Admin's details.


Usage

  • From MOR X16 call: /api/user_details_raw_get
  • Methods: POST, GET(if allowed, not recomended)



Parametres

Parameters which are included into hash:

  • u - username for authentication. Required.
  • user_id - Users ID in MOR database. Required if username is not used. Type: INTEGER
  • username - Users Username in MOR database. Required if user_id is not used.


You are able to use these parameter one by one or both at a time. If you use them both at a time note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key

Parameters which are not included into hash:

  • hash - SHA1 hash constructed using parameters which are listed above. You are able to use these parameter one by one or both at a time. If you use them both at a time note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key ( More described in Constructing hash). Required.


Request

We have user_id = 123, username = admin, API Secret Key = 456789

We send:

HTML POST: http://<server_ip>/billing/api/user_details_raw_get?u=admin&user_id=123&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441

* Note that username and password are not included in hash

Returns

Success

<?xml version="1.0" encoding="UTF-8"?>
<page>
 <id>2</id>
 <username>user_admin</username>
 <password>8213544f82d739dbc044b7e3f6ed343b3bc7e543</password>
 <usertype>user</usertype>
 <logged>0</logged>
 <first_name>Test User</first_name>
 <last_name>#1</last_name>
 <calltime_normative>3.0</calltime_normative>
 <show_in_realtime_stats>1</show_in_realtime_stats>
 <balance>0.0</balance>
 <frozen_balance>0.0</frozen_balance>
 <lcr_id>1</lcr_id>
 <postpaid>1</postpaid>
 <blocked>0</blocked>
 <tariff_id>2</tariff_id>
 <month_plan_perc>0.0</month_plan_perc>
 <month_plan_updated>2000-01-01 00:00:00 +0200</month_plan_updated>
 <sales_this_month>0</sales_this_month>
 <sales_this_month_planned>0</sales_this_month_planned>
 <show_billing_info>1</show_billing_info>
 <primary_device_id>0</primary_device_id>
 <credit>-1.0</credit>
 <clientid></clientid>
 <agreement_number></agreement_number>
 <agreement_date></agreement_date>
 <language></language>
 <taxation_country></taxation_country>
 <vat_number></vat_number>
 <vat_percent>18.0</vat_percent>
 <address_id></address_id>
 <accounting_number></accounting_number>
 <owner_id>0</owner_id>
 <hidden>0</hidden>
 <allow_loss_calls>0</allow_loss_calls>
 <vouchers_disabled_till>2000-01-01 00:00:00 +0200</vouchers_disabled_till>
 <uniquehash></uniquehash>
 <temporary_id></temporary_id>
 <send_invoice_types>1</send_invoice_types>
 <call_limit>0</call_limit>
 <sms_tariff_id></sms_tariff_id>
 <sms_lcr_id></sms_lcr_id>
 <sms_service_active>0</sms_service_active>
 <cyberplat_active>0</cyberplat_active>
 <call_center_agent>0</call_center_agent>
 <generate_invoice>1</generate_invoice>
 <tax_1>0.0</tax_1>
 <tax_2>0.0</tax_2>
 <tax_3>0.0</tax_3>
 <tax_4>0.0</tax_4>
 <block_at>2008-01-01</block_at>
 <block_at_conditional>15</block_at_conditional>
 <block_conditional_use>0</block_conditional_use>
 <recording_enabled>0</recording_enabled>
 <recording_forced_enabled>0</recording_forced_enabled>
 <recordings_email></recordings_email>
 <recording_hdd_quota>100</recording_hdd_quota>
 <warning_email_active>0</warning_email_active>
 <warning_email_balance>0.0</warning_email_balance>
 <warning_email_sent>0</warning_email_sent>
 <tax_id>0</tax_id>
 <invoice_zero_calls>1</invoice_zero_calls>
 <acc_group_id>0</acc_group_id>
 <hide_destination_end>-1</hide_destination_end>
 <warning_email_hour>-1</warning_email_hour>
 <warning_balance_call>0</warning_balance_call>
 <warning_balance_sound_file_id>0</warning_balance_sound_file_id>
 <own_providers>0</own_providers>
 <ignore_global_monitorings>0</ignore_global_monitorings>
 <currency_id>1</currency_id>
 <quickforwards_rule_id>0</quickforwards_rule_id>
 <spy_device_id>0</spy_device_id>
 <time_zone>Vilnius</time_zone>
 <minimal_charge>0</minimal_charge>
 <minimal_charge_start_at></minimal_charge_start_at>
 <webphone_allow_use>0</webphone_allow_use>
 <webphone_device_id>0</webphone_device_id>
 <responsible_accountant_id>-1</responsible_accountant_id>
 <blacklist_enabled>global</blacklist_enabled>
 <blacklist_lcr>-1</blacklist_lcr>
 <routing_threshold>-1</routing_threshold>
 <pbx_pool_id>0</pbx_pool_id>
 <hide_non_answered_calls>0</hide_non_answered_calls>
 <balance_min>0.0</balance_min>
 <balance_max>0.0</balance_max>
 <main_email></main_email>
 <noc_email></noc_email>
 <billing_email></billing_email>
 <rates_email></rates_email>
 <warning_email_balance_admin>0.0</warning_email_balance_admin>
 <warning_email_balance_manager>0.0</warning_email_balance_manager>
 <billing_period>monthly</billing_period>
 <invoice_grace_period>15</invoice_grace_period>
 <warning_email_sent_admin>0</warning_email_sent_admin>
 <warning_email_sent_manager>0</warning_email_sent_manager>
 <comment></comment>
 <routing_threshold_2>-1</routing_threshold_2>
 <blacklist_lcr_2>-1</blacklist_lcr_2>
 <routing_threshold_3>-1</routing_threshold_3>
 <blacklist_lcr_3>-1</blacklist_lcr_3>
 <ignore_global_alerts>0</ignore_global_alerts>
 <enable_static_list>no</enable_static_list>
 <static_list_id></static_list_id>
 <partner_group_id>0</partner_group_id>
 <simple_user_group_id>0</simple_user_group_id>
 <show_only_assigned_users>0</show_only_assigned_users>
 <enable_static_source_list>no</enable_static_source_list>
 <static_source_list_id></static_source_list_id>
 <daily_credit_limit>0.0</daily_credit_limit>
 <daily_credit_limit_used>0.0</daily_credit_limit_used>
 <daily_credit_limit_datetime></daily_credit_limit_datetime>
 <stats_from_user_perspective>1</stats_from_user_perspective>
 <warning_balance_email></warning_balance_email>
 <allow_change_callerid>0</allow_change_callerid>
 <allow_login_receive_email>0</allow_login_receive_email>
 <hide_callerid>0</hide_callerid>
 <max_call_rate>0.0</max_call_rate>
 <generate_empty_invoices>0</generate_empty_invoices>
 <password_changed_at></password_changed_at>
 <res_own_traffic>0</res_own_traffic>
 <show_tariff_name>0</show_tariff_name>
 <server_id>-1</server_id>
 <warning_email_daily_credit_value>0.0</warning_email_daily_credit_value>
 <warning_email_daily_credit_active>0</warning_email_daily_credit_active>
 <warning_email_daily_credit_time></warning_email_daily_credit_time>
 <show_only_assigned_providers>0</show_only_assigned_providers>
 <disable_subscription>0</disable_subscription>
 <soa_custom_opening_balance_active>0</soa_custom_opening_balance_active>
 <soa_custom_opening_balance_start_period></soa_custom_opening_balance_start_period>
 <soa_custom_opening_balance>0.0</soa_custom_opening_balance>
 <pbx_server_id>0</pbx_server_id>
 <realm></realm>
 <random_realm>0</random_realm>
 <user_is_pbx>0</user_is_pbx>
 <pbx_acc_id></pbx_acc_id>
 <is_pbx_enabled>0</is_pbx_enabled>
 <show_price_in_last_calls>1</show_price_in_last_calls>
 <recordings_expire_days>0</recordings_expire_days>
 <pbx_user_id></pbx_user_id>
 <recordings_delete_older_than>-1</recordings_delete_older_than>
 <warning_balance_call_specific_value_active>0</warning_balance_call_specific_value_active>
 <warning_balance_call_specific_value>0.0</warning_balance_call_specific_value>
 <send_warning_balance_sms>0</send_warning_balance_sms>
</page>




Errors

When user is not found.

<?xml version="1.0" encoding="UTF-8"?>
<error>User was not found</error>

When user id is not present.

<?xml version="1.0" encoding="UTF-8"?>
<error>User id must be present</error>

When user id is negative.

<?xml version="1.0" encoding="UTF-8"?>
<error>User id must be non negative integer</error>

See also