MOR API autodialer get campaign statistics

From Kolmisoft Wiki

Jump to: navigation, search


[edit] Description

Retrieves autodialer campaingn statistics for selected time period.

[edit] Usage

  • From MOR X16: /api/autodialer_get_campaign_statistics

[edit] Parameters

Parameters which are included into hash:

  • u - User ID or Username in database
  • id - Caimpaign ID in database
  • period_start - Unix timestamp of stats period starting date. (Default: Today at 00:00).
  • period_end - Unix timestamp of stats period end date. (Default: Today at 23:59).

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:

[edit] Request

If you want to get campaign statistics for admin, for campaign ID 2 from 06/01/2020 to 06/30/2020 and your API Secret Key = 456789

You send:

HTML POST:  http://<SERVER_IP>/billing/api/autodialer_get_campaign_statistics?u=admin&id=2&period_start=1590969600&period_end=1593475200&hash=7f544a3f199563efce4dc5da5425cdd0d7a41999

[edit] Returns

Success: Everything is ok. You get the list of calls if there is any:

<?xml version="1.0" encoding="UTF-8"?>
   <campaign_name>Campaign Nr 2</campaign_name>
       <period_start>2020-06-01 03:00:00</period_start>
       <period_end>2020-06-30 03:00:00</period_end>


  • <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
  • <error>Access Denied</error> - Such username does not exist in the database or it was not specified.
  • <error>Campaign was not found</error> - Such Campaign ID does not exist in the database.
  • <error>Campaign does not have any Numbers</error> - Selected Campaign does not have any Numbers.
  • <error>Campaign does not have any Calls in selected time period</error> - Selected Campaign does not have any calls in selected period.
  • <error>Date from is greater than date till</error> - Date from is greater than date till

[edit] See also

Personal tools


Try M2