MOR API did rates details update
From Kolmisoft Wiki
Revision as of 07:46, 28 March 2023 by Edvardas (talk | contribs) (Created page with "=Description= <!---This functionality is available from MOR X17--> MOR API Update DID rates details <br><br> =Usage= * From '''MOR X17''' call: '''/api/did_rates_details_update''' * Methods: POST, GET(if allowed, not recommended) <br><br> ===Parameters=== Parameters which are '''included''' into hash: * did_id - DID number '''Required'''. Parameters which are '''not included''' into hash: * u - username for authentication. '''Required'''. * provider_tariff_id -...")
Description
MOR API Update DID rates details
Usage
- From MOR X17 call: /api/did_rates_details_update
- Methods: POST, GET(if allowed, not recommended)
Parameters
Parameters which are included into hash:
- did_id - DID number Required.
Parameters which are not included into hash:
- u - username for authentication. Required.
- provider_tariff_id - provider tariff id number.
- allow_call_reject_provider - 1 (yes), 0 (no).
- owner_tariff_id - owner tariff id number.
- allow_call_reject - 1 (yes), 0 (no).
- hash - SHA1 hash constructed using params and API_Secret_Key ( More described in Constructing hash). Required.
Request
We have DID id 3, API Secret Key = secret
We send
HTML POST: http://<SERVER_IP>/billing/api/did_rates_details_update?did_id=3&u=admin&provider_tariff_id=3&allow_call_reject_provider=1&hash=a2ceb0323d6a76a9fc9b66a21d321ae618c40296
Returns
Information will be available soon
Errors
<?xml version="1.0" encoding="UTF-8"?> <page> <status> <error>Error message</error> </status> </page>
Error messages:
- Incorrect hash – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
- Access Denied – Only Admin, Accountant or Reseller may use API.
- DID was not found – DID number does not exist or incorrect.
- Rates were not found - rates were not found using one of search parameters: s_id, s_rate_type, s_start_time, s_end_time, s_daytype.