MOR API autodialer get campaign ivr poll results
From Kolmisoft Wiki
Jump to navigationJump to search
Description
Retrieves autodialer campaign ivr poll results.
Usage
- From MOR X16: /api/autodialer_get_campaign_ivr_poll_results
Parameters
Parameters which are included into hash:
- u - username for authentication. Required.
- id - Campaign ID in MOR database. Required. Included into hash.
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 above and API_Secret_Key ( More described in Constructing hash). Required (if setting Disable hash checking is not checked).
- u - username for authentication. Required.
- order_by - Possible values [time, src, dst, prefix, nice_billsec, hgc, server, p_name, p_rate, p_price, reseller, r_rate, r_price, user, u_rate, u_price, number, d_provider, d_inc, d_owner]. (Default: time).
- s_reseller - Reseller type User ID in MOR database. (Default: all).
Request
If you want to get campaign ivr poll results for username: some_user, for campaign ID 2 and your API Secret Key = 456789
You send:
HTML POST: http://<SERVER_IP>/billing/api/autodialer_get_campaign_ivr_poll_results?u=some_user&id=2&hash=38282ca5e65e63746498ef5b39a2fe71c6448999
Returns
Success: Everything is ok. You get the list of calls if there is any:
<?xml version="1.0" encoding="UTF-8"?> <page> <status> <ivr_poll_results_string>1111 2222,2020-01-01 01:01:01,2090-12-31 23:59:59</ivr_poll_results_string> </status> </page>
Errors:
- <error>You are not authorized to use this functionality</error>* - You are not authorized to use this functionality
- <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.