Difference between revisions of "MOR API phonebook record delete"

From Kolmisoft Wiki
Jump to navigationJump to search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
-
=Description=
=Description=
<!---This functionality is available in MOR X5 and MOR X6--->
<!---This functionality is available in MOR X5 and MOR X6--->
Line 11: Line 10:


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


<br><br>
<br><br>
Line 19: Line 19:
* [[MOR API hash construction | hash]] – SHA1 hash constructed using '''id''' and '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''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'''.


Returning XML is put in file. That file is gziped and returned as a response content.
<br><br>
<br><br>


Line 38: Line 36:


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



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