diff --git a/agc_2-X/trunk/docs/NON-AGENT_API.txt b/agc_2-X/trunk/docs/NON-AGENT_API.txt
index 22e21b7c..b534b1e4 100644
--- a/agc_2-X/trunk/docs/NON-AGENT_API.txt
+++ b/agc_2-X/trunk/docs/NON-AGENT_API.txt
@@ -1,4 +1,4 @@
-NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2021-03-03
+NON-AGENT API DOCUMENT Started: 2008-07-24 Updated: 2021-03-16
This document describes the functions of an API(Application Programming
Interface) for all functions NOT directly relating to the VICIDIAL Agent screen.
@@ -41,6 +41,10 @@ in_group_status - real-time status of one or more in groups
agent_status - real-time status of one user
callid_info - information about a call based upon the caller_code or call ID
lead_field_info - pulls the value of one field of a lead
+lead_callback_info - outputs scheduled callback data for a specific lead
+lead_all_info - outputs all lead data for a lead(optionally including custom fields)
+lead_status_search - displays all field values of all leads that match the status and call date in request
+ccc_lead_info - outputs lead data for cross-cluster-communication call
server_refresh - forces a conf file refresh on all telco servers in the cluster
check_phone_number - allows you to check if a phone number is valid and dialable
logged_in_agents - list of agents that are logged in to the system
@@ -48,11 +52,8 @@ update_campaign - updates campaign settings in the system
add_did - adds new Inbound DID entries to the system
update_did - updates Inbound DID information in the system
phone_number_log - exports list of calls placed to one of more phone numbers
-ccc_lead_info - outputs lead data for cross-cluster-communication call
-lead_status_search - displays all field values of all leads that match the status and call date in request
call_status_stats - report on number of calls made by campaign and ingroup, with hourly and status breakdowns
call_dispo_report - call disposition breakdown report
-lead_callback_info - outputs scheduled callback data for a specific lead
agent_campaigns - looks up allowed campaigns/in-groups for a specific user
update_cid_group_entry - updates CID Group entries
add_dnc_phone - adds a phone number to one of the DNC lists
@@ -176,7 +177,7 @@ Changes:
210217-1454 - Added menu_id option for add_did and update_did functions
210227-1116 - Added xferconf number options to update_campaign, add_list & update_list functions
210303-1802 - Added list_exists_check option for update_lead function
-
+210316-2207 - Added lead_all_info function
API Functions use the 'function' variable
@@ -733,6 +734,41 @@ A SUCCESS response will not show "SUCCESS", but instead will just print the valu
+--------------------------------------------------------------------------------
+lead_all_info - outputs all lead data for a lead(optionally including custom fields)
+
+NOTE: api user for this function must have user_level set to 7 or higher and "view reports" enabled and modify_leads set to 1-4
+
+REQUIRED FIELDS-
+source - description of what originated the API call (maximum 20 characters)
+lead_id - 1-10 digits
+
+OPTIONAL FIELDS-
+custom_fields - Y or N, default is N. If the field you want to pull is a custom field or not
+force_entry_list_id - 3-12 digits, will override the lead's assigned entry_list_id to look for custom fields data for this lead from a different list
+
+SETTINGS FIELDS-
+stage - the format of the exported data: csv, tab, newline, pipe(default)
+header - include a header(YES) or not(NO). This is optional, default is not to include a header
+
+Example URL strings for API calls:
+http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=lead_all_info&lead_id=1079425
+http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=lead_all_info&lead_id=1079425&header=YES&custom_fields=Y
+http://server/vicidial/non_agent_api.php?source=test&user=6666&pass=1234&function=lead_all_info&lead_id=1079425&header=YES&custom_fields=Y&force_entry_list_id=999880
+
+Example responses:
+ERROR: lead_all_info USER DOES NOT HAVE PERMISSION TO GET LEAD INFO - 6666|0
+ERROR: lead_all_info LIST NOT FOUND - 6666||
+ERROR: lead_all_info LEAD NOT FOUND - 6666||
+
+A SUCCESS response will not show "SUCCESS", but instead will just print the results in the following format:
+status|user|vendor_lead_code|source_id|list_id|gmt_offset_now|phone_code|phone_number|title|first_name|middle_initial|last_name|address1|address2|address3|city|state|province|postal_code|country_code|gender|date_of_birth|alt_phone|email|security_phrase|comments|called_count|last_local_call_time|rank|owner|entry_list_id
+TD|6666|554443||501|-4.00|1|9998887112|Mr|Billy'Oj|U|O'Reillyo|ad1|ad2|ad3|city next|FL|U|33777||U|0000-00-00|bobo'brien|test@test.com||2017-06-01 18:38:41|79|2017-06-09 14:53:27|0|4646|0
+
+
+
+
+
--------------------------------------------------------------------------------
lead_status_search - displays all field values of all leads that match the status and call date in request
diff --git a/agc_2-X/trunk/www/vicidial/admin.php b/agc_2-X/trunk/www/vicidial/admin.php
index 0289c4eb..42686fb1 100644
--- a/agc_2-X/trunk/www/vicidial/admin.php
+++ b/agc_2-X/trunk/www/vicidial/admin.php
@@ -129,7 +129,7 @@ $UGreports = 'ALL REPORTS, NONE, Real-Time Main Report, Real-Time Campaign Summa
$Vtables = 'NONE,log_noanswer,did_agent_log,contact_information';
-$APIfunctions = 'ALL_FUNCTIONS add_group_alias add_lead add_list add_phone add_phone_alias add_user agent_ingroup_info agent_stats_export agent_status audio_playback blind_monitor call_agent callid_info change_ingroups check_phone_number copy_user did_log_export external_add_lead external_dial external_hangup external_pause external_status in_group_status logout moh_list park_call pause_code preview_dial_action ra_call_control recording recording_lookup send_dtmf server_refresh set_timer_action sounds_list st_get_agent_active_lead st_login_log transfer_conference update_fields update_lead update_list list_info list_custom_fields update_log_entry update_phone update_phone_alias update_user user_group_status vm_list webphone_url webserver logged_in_agents update_campaign add_did update_did lead_field_info phone_number_log switch_lead ccc_lead_info lead_status_search call_status_stats calls_in_queue_count force_fronter_leave_3way force_fronter_audio_stop update_cid_group_entry add_dnc_phone add_fpg_phone';
+$APIfunctions = 'ALL_FUNCTIONS add_group_alias add_lead add_list add_phone add_phone_alias add_user agent_ingroup_info agent_stats_export agent_status audio_playback blind_monitor call_agent callid_info change_ingroups check_phone_number copy_user did_log_export external_add_lead external_dial external_hangup external_pause external_status in_group_status logout moh_list park_call pause_code preview_dial_action ra_call_control recording recording_lookup send_dtmf server_refresh set_timer_action sounds_list st_get_agent_active_lead st_login_log transfer_conference update_fields update_lead update_list list_info list_custom_fields update_log_entry update_phone update_phone_alias update_user user_group_status vm_list webphone_url webserver logged_in_agents update_campaign add_did update_did lead_field_info lead_all_info phone_number_log switch_lead ccc_lead_info lead_status_search call_status_stats calls_in_queue_count force_fronter_leave_3way force_fronter_audio_stop update_cid_group_entry add_dnc_phone add_fpg_phone';
$browser_alert_sounds_list = 'bark_dog,beep_double,beep_five,beep_up,bell_double,bell_school,bird,blaster1,blaster2,buzz1,buzz2,cash_register,chat_alert,close_encounter,confirmation,ding,droplet,droplet_double,elephant,email_alert,hold_tone,horn_bike,horn_car,horn_car_triple,horn_clown,horn_double,horn_train,meow_cat,scream_wilhelm,silence_quick,siren,slide_down,slide_up,swish,teleport1,teleport2,whip,whoosh,xylophone1,xylophone2,xylophone3,xylophone4';
@@ -5536,12 +5536,13 @@ if ($SSscript_remove_js > 0)
# 210315-1730 - Added clear_form campaign option, Issue #1179
# 210315-2118 - Added new manual_dial_filter CALLBACK options, Issue #1139
# 210316-0923 - Small fix for 2FA consistency
+# 210317-0819 - Added lead_all_info Non-Agent API function, Changed lead-modify page links to javascript because of Chrome
#
# make sure you have added a user to the vicidial_users MySQL table with at least user_level 9 to access this page the first time
-$admin_version = '2.14-800a';
-$build = '210316-0923';
+$admin_version = '2.14-801a';
+$build = '210317-0819';
$STARTtime = date("U");
$SQLdate = date("Y-m-d H:i:s");
@@ -41646,7 +41647,7 @@ if ($ADD==82)
else
{$bgcolor='bgcolor="#'. $SSstd_row1_background .'"';}
echo "