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 -...")
 
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 (yes), 0 (no).
* allow_call_reject_provider - 1 (Reject), 0 (Apply).
* owner_tariff_id - owner tariff id number.
* owner_tariff_id - owner tariff id number.
* allow_call_reject - 1 (yes), 0 (no).
* 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>

Revision as of 08:29, 28 March 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.
  • 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

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.



See also