MOR API tariff rates get

From Kolmisoft Wiki
Revision as of 13:56, 14 December 2011 by Admin (talk | contribs) (Created page with '''This functionality is available from MOR_11'' MOR API Tariff rates <br><br> ---- <br><br> * Call: /api/get_tariff * Params: ** u - username t…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

This functionality is available from MOR_11


MOR API Tariff rates






  • Call: /api/get_tariff
  • Params:
    • u - username to login. Required.
    • p - password to login. Required.
    • hash - SHA1 hash constructed using params and API_Secret_Key ( More described in Constructing hash). Required.
    • tariff_id - user tariff id (option for admin or reseller). If not sent, user gets his tariff rates.
  • Errors:
    • <error>No tariff found</error> - Tariff was not found.
    • <error>Bad login</error> - User was not found by username and password. Use correct username and password. Make sure that username (u) and password (p) are specified.
    • <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
  • Returns:
    • Retail:
<page>
 <pagename> Tariff </pagename>
 <tariff_name> tariff name </tariff_name>
 <currency> currency </currency>
 <rates>
  <rate>
   <name> name </name>
   <destination_type> destination type </destination_type>
   <duration> duration </duration>
   <type> type </type>
   <round_by> round by </round_by>
   <tariff_rate> rate </tariff_rate>
   <start_time> start time </start_time>
   <end_time> end time </end_time>
   <daytype> daytype </daytype>
  </rate>
 </rates>
</page>
    • Wholesale:
<page>
 <pagename> Tariff </pagename>
 <tariff_name> tariff name </tariff_name>
 <currency> currency </currency>
 <rates>
  <rate>
   <direction> direction </direction>
   <destination> destination </destination>
   <prefix> prefix </prefix>
   <subcode> subcode </subcode>
   < code> code 
   <tariff_rate> rate </tariff_rate>
   <con_fee> connection fee </con_fee>
   <increment> increment </increment>
   <min_time> minimal time </min_time>
   <start_time> start time </start_time>
   <end_time> end time </end_time>
   <daytype> daytype </daytype>
  </rate>
 </rates>
</page>