Difference between revisions of "MOR API Service delete"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with '= NOTE: Available from MOR X5 = =Description= MOR API Delete Service <br><br> =Usage= * From '''MOR X5''' Call: '''/api/service_delete''' * Methods: POST, GET(if allowed, n…')
 
 
Line 18: Line 18:


We have Service ID = 10, API Secret Key = 123456
We have Service ID = 10, API Secret Key = 123456
We send:
We send:
  HTML POST: http://<SERVER_IP>/billing/api/service_delete?u=admin&service_id=10&hash=47e5699c634fee224337b08f292b7301ef3894c6
  HTML POST: http://<SERVER_IP>/billing/api/service_delete?u=admin&service_id=10&hash=47e5699c634fee224337b08f292b7301ef3894c6
Line 25: Line 26:
'''Success'''
'''Success'''


<page>
<page>
   <status>
   <status>
     <success>Service was successfully deleted</success>
     <success>Service was successfully deleted</success>
   </status>
   </status>
</page>
</page>


<br><br>
<br><br>

Latest revision as of 14:16, 30 September 2014

NOTE: Available from MOR X5

Description

MOR API Delete Service

Usage

  • From MOR X5 Call: /api/service_delete
  • Methods: POST, GET(if allowed, not recomended)



Parametres

  • service_id - Service ID, which we want to delete. Required.
  • u - username for authentication. Required.
  • hash - SHA1 hash constructed using params and API_Secret_Key ( More described in Constructing hash). Required.



Request

We have Service ID = 10, API Secret Key = 123456

We send:

HTML POST: http://<SERVER_IP>/billing/api/service_delete?u=admin&service_id=10&hash=47e5699c634fee224337b08f292b7301ef3894c6

NOTE that username is not included in hash

Success

<page>
 <status>
   <success>Service was successfully deleted</success>
 </status>
</page>




Errors

  • <error>User was not found</error> - User was not found using specified username. Use correct username.
  • <error>Service was not found</error> - Service was not found using specified ID. Use correct ID.
  • <error>You are not authorized to manage Services</error> - Such username does not exist in the database or User does not have rights to manage Services.
  • <error>Cannot delete - some subscriptions to this service exist</error> - Service can not be deleted because it has some Subscriptions.
  • <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.



See also