MOR API user delete
From Kolmisoft Wiki
Revision as of 09:37, 11 January 2023 by Dmitrij (talk | contribs) (Created page with "=Description= MOR API User delete <br><br> =Usage= * Call: /api/user_delete * Methods: POST, GET(if allowed, not recommended) <br><br> ===Parametres=== * user_id - User ID in MOR database, whose data we want to delete. '''Required'''. * u - username for authentication. '''Required'''. * hash - SHA1 hash constructed using '''user_id''' and '''API_Secret_Key''' ( More described in Constructing hash). '''R...")
Description
MOR API User delete
Usage
- Call: /api/user_delete
- Methods: POST, GET(if allowed, not recommended)
Parametres
- user_id - User ID in MOR database, whose data we want to delete. Required.
- u - username for authentication. Required.
- hash - SHA1 hash constructed using user_id and API_Secret_Key ( More described in Constructing hash). Required.
Request
We send:
HTML POST: http://<SERVER_IP>/billing/api/user_delete?u=admin&user_id=12&&hash=f7c3bc1d808e04732adf679965ccc34ca7ae3441
NOTE that username and password are not included in hash
Returns
Success
<?xml version="1.0" encoding="UTF-8"?> <page> <status>User deleted</status> </page>
Errors
- <error>User was not found</error> - User was not found. Use correct user id.</error>
- <error>Cannot delete user - it has DIDs</error>
- <error>Cannot delete user - he has some calls</error>
- <error>Cannot delete User - he has Invoicess</error>