MOR API autodialer change campaign status
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
Changes autodialer campaign status .
Usage
- From MOR X16: /api/autodialer_change_campaign_status
Parameters
Parameters which are included into hash:
- u - users' username.
- id - Campaign ID in MOR database.
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).
Request
If you want to change autodialer campaign status for username: some_user, for campaign ID 3 and your API Secret Key = 456789
You send:
HTML POST:http://<SERVER_IP>/billing/api/autodialer_change_campaign_status?u=some_user&id=3&hash=7f544a3f199563efce4dc5da5425cdd0d7a41999
Returns
Success: Everything is ok. You get the list of calls if there is any:
<?xml version="1.0" encoding="UTF-8"?> <page> <status> <success>Campaign started</success> </status> </page>
<?xml version="1.0" encoding="UTF-8"?> <page> <status> <success>Campaign stopped</success> </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.
Returns Messages:
- <message>No free numbers for Campaign: Campaign Nr 1</message>
- <message>No actions for Campaign: Campaign Nr 2</message>