Difference between revisions of "MOR API did rates details update"
From Kolmisoft Wiki
Jump to navigationJump to search
(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 -...") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 19: | Line 19: | ||
* u - username for authentication. '''Required'''. | * u - username for authentication. '''Required'''. | ||
* provider_tariff_id - provider tariff id number. | * provider_tariff_id - provider tariff id number. | ||
* allow_call_reject_provider - 1 ( | * allow_call_reject_provider - 1 (Reject), 0 (Apply). | ||
* owner_tariff_id - owner tariff id number. | * owner_tariff_id - owner tariff id number. Use id 0 for the "None" tariff. | ||
* allow_call_reject - 1 ( | * allow_call_reject - 1 (Reject), 0 (Apply). | ||
* [[MOR API hash construction | hash]] - SHA1 hash constructed using '''params''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''. | * [[MOR API hash construction | hash]] - SHA1 hash constructed using '''params''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''. | ||
<br><br> | <br><br> | ||
Line 37: | Line 37: | ||
===Returns=== | ===Returns=== | ||
<page> | |||
<status> | |||
<success>DID details successfully updated</success> | |||
</status> | |||
</page> | |||
---- | ---- | ||
Line 53: | Line 57: | ||
* Incorrect hash – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string. | * Incorrect hash – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string. | ||
* Access Denied – Only Admin | * Access Denied – Only Admin or Accountant may use API. | ||
* DID was not found – DID number does not exist or incorrect. | * 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. | * 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. |
Latest revision as of 06:18, 11 April 2023
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 (Reject), 0 (Apply).
- owner_tariff_id - owner tariff id number. Use id 0 for the "None" tariff.
- allow_call_reject - 1 (Reject), 0 (Apply).
- 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
<page> <status> <success>DID details successfully updated</success> </status> </page>
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 or Accountant 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.