Difference between revisions of "MOR API phonebook record delete"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with '-')
 
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
-
=Description=
<!---This functionality is available in MOR X5 and MOR X6--->
[[MOR API]] Phonebook record delete
 
Please note that admin can delete his phonebooks and his users phonebooks.
Users can delete only the phonebooks they created themselves
 
<br><br>
=Usage=
 
* Call: /api/phonebook_record_delete
* Methods: POST, GET(if allowed, not recomended)
 
<br><br>
===Parametres===
 
* u – username to login. '''Required'''.
* id – this specifies id of phonebook record which will be deleted. '''Required'''.
* [[MOR API hash construction | hash]] – SHA1 hash constructed using '''id''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.
 
<br><br>
 
===Request===
 
We have API Secret Key = 456789, id = 1 <br />
We send:
 
HTML POST: http://<server_ip>/billing/api/phonebook_record_delete?u=admin&id=1&hash=bc2f114099d16656d37e45fd9e8744cb9386d462
 
'''* Note that username and password are not included in hash'''
<br><br>
 
===Returns===
 
'''Success'''
 
<page>
  <status>
    <success>Phonebook record successfully deleted</success>
  </status>
</page>
 
<br><br>
----
 
'''Errors'''
 
* <error>Phonebook record was not found</error> – Phonebook record was not found
* <error>Access Denied</error> – username (u) is not user or admin
* <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]]
* [[PhoneBook]] API: [[MOR_API_phonebooks_get|List]]

Latest revision as of 13:13, 4 March 2015

Description

MOR API Phonebook record delete

Please note that admin can delete his phonebooks and his users phonebooks. Users can delete only the phonebooks they created themselves



Usage

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



Parametres

  • u – username to login. Required.
  • id – this specifies id of phonebook record which will be deleted. Required.
  • hash – SHA1 hash constructed using id and API_Secret_Key ( More described in Constructing hash). Required.



Request

We have API Secret Key = 456789, id = 1
We send:

HTML POST: http://<server_ip>/billing/api/phonebook_record_delete?u=admin&id=1&hash=bc2f114099d16656d37e45fd9e8744cb9386d462

* Note that username and password are not included in hash

Returns

Success

<page>
 <status>
   <success>Phonebook record successfully deleted</success>
 </status>
</page>




Errors

  • <error>Phonebook record was not found</error> – Phonebook record was not found
  • <error>Access Denied</error> – username (u) is not user or admin
  • <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.



See also