Difference between revisions of "MOR API phonebook record delete"
From Kolmisoft Wiki
Jump to navigationJump to search
Line 18: | Line 18: | ||
* id – this specifies id of phonebook record which will be deleted. '''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'''. | * [[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> | <br><br> |
Revision as of 12:11, 4 March 2015
Dscription
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.