Difference between revisions of "MOR API subscription delete"
From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with '=Deescription= <!---This functionality is available from MOR 12---> MOR API Delete subscription <br><br> =Usage= * Call: /api/subscription_delete * Methods: POST, GET(if all…') |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
=Deescription= | =Deescription= | ||
<!---This functionality is available from MOR | <!---This functionality is available from MOR x5---> | ||
[[MOR API]] Delete subscription | [[MOR API]] Delete subscription | ||
<br><br> | <br><br> | ||
Line 70: | Line 70: | ||
* [[MOR API]] | * [[MOR API]] | ||
* [[MOR API Subscriptions get]] | |||
* [[MOR API subscription create]] | |||
* [[MOR API subscription update]] |
Latest revision as of 13:19, 29 October 2014
Deescription
MOR API Delete subscription
Usage
- Call: /api/subscription_delete
- Methods: POST, GET(if allowed, not recomended)
Parametres
Parameters which are included into hash:
- subscription_id - ID of Subscription you want to delete. Required.
- subscription_delete_action - number of action that you wish to choose. Numbers meaning: 1 - Delete without money return, 2 - Disable Subscriptions, 3 - Delete with whole money return. Required.
Parameters which are not included into hash:
- hash - SHA1 hash constructed using API_Secret_Key ( More described in Constructing hash). Required.
- u - username for authentication. Required.
Request
We have subscription_id = 123, API Secret Key = 456789 and we want to Subscription to be deleted with whole money return.
We send:
HTML POST: http://<SERVER_IP>/billing/api/subscription_delete?u=username&subscription_id=123&subscription_delete_action=3&hash=e0f93111f867ca5d424c0f0ebb6b678159086d00
* Note that username are not included in hash
Returns
Success
<?xml version="1.0" encoding="UTF-8"?> <page> <status> <success>Subscription deleted and money returned</success> </status> </page>
<?xml version="1.0" encoding="UTF-8"?> <page> <status> <success>Subscription disabled</success> </status> </page>
<?xml version="1.0" encoding="UTF-8"?> <page> <status> <success>Subscription deleted</success> </status> </page>
Errors
- <error>Access Denied</error> - Person trying to delete Subscription does not exist or his user type is User.
- <error>You are not authorised to use this functionality</error> - Person trying to delete subscription does not have Manage Subscription permission.
- <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
- <error>Subscription disabled</error> - Subscription was successfully disabled.
- <error>Subscription was not found</error> - Subscription with specified subscription_id was not found.
- <error>Subscription delete action was not found</error> - Specified subscription_delete_action was not found should be in (1,2,3).