MOR API location rule get

From Kolmisoft Wiki
Jump to navigationJump to search

Description

Admin – can get any location rules.
Reseller – can get his and his users location rules.


Usage

  • From MOR X14 call: /api/location_rule_delete
  • Methods: POST, GET(if allowed, not recomended)



Parametres

  • u – username for authentication. This is owner (admin or reseller) Required.
  • location_rule_id - location rule ID in MOR database Required.
  • hash - SHA1 hash constructed using params and API_Secret_Key ( More described in Constructing hash). Required (if setting Disable hash checking is not checked).



Request

We send:

HTML POST: http://<SERVER_IP>/billing/api/location_rule_get?u=admin&location_rule_id=2&hash=4c7a876a669431a4716ba37499ce49dd9e3df1ab 



Returns

Success

<page>
 <status>
   <location_rule>
     <id>2</id>
     <location_id>1</location_id>
     <name>STANDARD prefix</name>
     <enabled>1</enabled>
     <cut>10#</cut>
     <add></add>
     <minlen>10</minlen>
     <maxlen>20</maxlen>
     <lr_type>dst</lr_type>
     <lcr_id>2</lcr_id>
     <tariff_id>4</tariff_id>
     <did_id></did_id>
     <device_id></device_id>
     <change_callerid_name>0</change_callerid_name>
     <src_cut></src_cut>
     <src_add></src_add>
     <src_minlen>1</src_minlen>
     <src_maxlen>100</src_maxlen>
     <locationgroup_id>0</locationgroup_id>
   </location_rule>
 </status>
</page>




Errors

  • <error>Location rule was not found</error>
  • <error>Access denied</error> - authentication user is incorrect.



See also