MOR API device update

From Kolmisoft Wiki

(Difference between revisions)
Jump to: navigation, search
(Request)
Line 37: Line 37:
===Request===
===Request===
-
  HTML POST: http://<SERVER_IP>/billing/api/device_update?u=admin&device=2&location_id=7&hash=297dab8c386794b2e947d52affb8f576c643569e
+
  HTML POST: http://<SERVER_IP>/billing/api/device_update?u=admin&device=2&new_location_id=7&hash=297dab8c386794b2e947d52affb8f576c643569e
<br><br>
<br><br>

Revision as of 08:53, 13 April 2016

Contents

Description

MOR API update existing Device from params.

Usage

  • Call: /api/device_update
  • Methods: POST, GET(if allowed, not recomended)



Parameters

Parameters which are included into hash:

  • device - device_id. Required.

Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key

Parameters which are not included into hash:

  • hash - SHA1 hash constructed using parameters which are listed above. Note that parameters are shown in the same order as they have to be when generating the hash. Last parameter in a row is API_Secret_Key ( More described in Constructing hash). Required.
  • u - username for authentication. Required.
  • new_location_id - location_id.
  • callerid_number - number.
  • callerid_name - name.
  • trunk - 0 stand for "No", 1 stand for "Yes", 2 stands for "Yes with ANI".
  • fax_email_add - email address to add.
  • fax_email_delete - email address to delete.
  • call_limit - call limit. Set 0 if you want unlimited sim. calls.


Additional feature

If API setting Allow Resellers to use Admin Localization Rules is enabled:
Reseller is able to set location inherited from Admin. new_location_id should be used as a parameter for location.

Request

HTML POST: http://<SERVER_IP>/billing/api/device_update?u=admin&device=2&new_location_id=7&hash=297dab8c386794b2e947d52affb8f576c643569e



Returns

Success

<page>
  <status>
    <success>Device successfully updated</success>
  </status>
</page>




Errors

  • <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
  • <error>Access Denied</error> - access not allowed
  • <error>Device was not found</error> - Device id incorrect or does not exist
  • <error>Location was not found</error> - Location id incorrect or does not exist



See also

Personal tools

Try MOR

Try M2