Difference between revisions of "MOR API location rules get"
From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with '=Description= '''Admin''' – can get any location rules.<br> '''Reseller''' – can get his and his users location rules.<br> <br><br> ===Parametres=== * '''u''' – username …') |
|||
| Line 19: | Line 19: | ||
<br><br> | <br><br> | ||
===Returns=== | ===Returns=== | ||
'''Success''' | |||
<page> | <page> | ||
| Line 69: | Line 71: | ||
</status> | </status> | ||
</page> | </page> | ||
<br><br> | |||
---- | |||
'''Errors''' | |||
* <error>Location was not found</error> | |||
* <error>Access denied</error> - authentication user is incorrect. | |||
<br><br> | <br><br> | ||
=See also= | =See also= | ||
* [[MOR API]] | * [[MOR API]] | ||
Revision as of 12:37, 3 April 2019
Description
Admin – can get any location rules.
Reseller – can get his and his users location rules.
Parametres
- u – username for authentication. This is owner (admin or reseller) Required.
- location_id - location ID in MOR database Required.
- from - from which record to show results Not required.
- max_results - How many records to show Not rrequired.
Request
We send:
HTML POST: http://<SERVER_IP>/billing/api/location_rules_get?u=admin&location_id=1&hash=f10a3a417b912bc58021b6d0a36a162380a6b539
Returns
Success
<page>
<status>
<location>
<name>Global</name>
<location_rule>
<id>1</id>
<location_id>1</location_id>
<name>Int. prefix</name>
<enabled>1</enabled>
<cut>00</cut>
<add></add>
<minlen>10</minlen>
<maxlen>20</maxlen>
<lr_type>dst</lr_type>
<lcr_id></lcr_id>
<tariff_id></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>
<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>
</location>
</status>
</page>
Errors
- <error>Location was not found</error>
- <error>Access denied</error> - authentication user is incorrect.