Difference between revisions of "MOR API did details update"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with '-')
 
Line 1: Line 1:
-
=Description=
<!---This functionality is available in MOR X5 and MOR X6--->
[[MOR API]] DID details update
 
Please note that only admin, accountant(with device management) with permission and reseller can use this API.
 
<br><br>
=Usage=
 
* Call: /api/did_details_update
* Methods: POST, GET(if allowed, not recomended)
 
<br><br>
===Parametres===
 
* u – username to login. '''Required'''.
* did_id – this is number of voucher which will be used. '''Required'''.
* call_limit - this will be updated. '''Optional'''
* [[MOR API hash construction | hash]] – SHA1 hash constructed using '''did_id''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.
 
<br><br>
 
===Request===
 
We have API Secret Key = secret, did_id = 10007 <br />
We send:
 
HTML POST: http://<server_ip>/billing//api/did_details_update?u=admin&did_id=6511&call_limit=999&hash=f7de355c9b4421ce6c705b4b32c89dbcaca51e46
 
'''* Note that username and password are not included in hash'''
<br><br>
 
===Returns===
 
'''Success'''
 
<page>
  <status>
    <success>DID details successfully updated</success>
  </status>
</page>
 
<br><br>
After successfully updating DID action log record is added.
<br><br>
----
 
'''Errors'''
 
* <error>Call limit is incorrect format</error> – Specified call limit is 0 or positive number.
* <error>DID was not found</error> – Specified did does not exist or it belongs to different username(u).
* <error>Access Denied</error> – Specified username (u) does not exist or u is not admin, reseller or accountant with permission.
* <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
<br><br>
 
=See also=
 
* [[MOR API]]

Revision as of 14:57, 17 March 2015

Description

MOR API DID details update

Please note that only admin, accountant(with device management) with permission and reseller can use this API.



Usage

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



Parametres

  • u – username to login. Required.
  • did_id – this is number of voucher which will be used. Required.
  • call_limit - this will be updated. Optional
  • hash – SHA1 hash constructed using did_id and API_Secret_Key ( More described in Constructing hash). Required.



Request

We have API Secret Key = secret, did_id = 10007
We send:

HTML POST: http://<server_ip>/billing//api/did_details_update?u=admin&did_id=6511&call_limit=999&hash=f7de355c9b4421ce6c705b4b32c89dbcaca51e46

* Note that username and password are not included in hash

Returns

Success

<page>

 <status>
   <success>DID details successfully updated</success>
 </status>

</page>



After successfully updating DID action log record is added.




Errors

  • <error>Call limit is incorrect format</error> – Specified call limit is 0 or positive number.
  • <error>DID was not found</error> – Specified did does not exist or it belongs to different username(u).
  • <error>Access Denied</error> – Specified username (u) does not exist or u is not admin, reseller or accountant with permission.
  • <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.



See also