Difference between revisions of "MOR API Subscription Flat Rate Number Status Get"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with '<!---This functionality is available from MOR x16---> =Description= MOR API method for prefix covering flat-rate subscriptions. Can be used by: '''Admin''' '''…')
 
 
(17 intermediate revisions by 3 users not shown)
Line 2: Line 2:
=Description=
=Description=


[[MOR API]] method for prefix covering flat-rate subscriptions.
[[MOR API]] method for check prefix covering flat-rate subscriptions.<br>
API returns the result if that number (prefix covering this number) is included or excluded from the flat-rate subscriptions of that user.


Can be used by:
Can be used by:
'''Admin'''
'''Admin'''
'''Accountant''' with permissions Manage Services - write, Manage Subscriptions - read, Manage Users - read
'''Accountant''' with permissions Manage Services - write, Manage Subscriptions - read, Manage Users - read
'''Reseller'''
'''Reseller'''
'''Partner'''  
'''Partner'''  
<br><br>
<br><br>
=Usage=
=Usage=


* From '''MOR X16''' call: /api/user_subscriptions_check_number_status
* From '''MOR X16''' call: /api/subscription_flat_rate_number_status_get
* Methods: POST, GET(if allowed, not recomended)
* Methods: POST, GET(if allowed, not recomended)
<br><br>
<br><br>
Line 19: Line 25:
Parameters which are included into hash
Parameters which are included into hash


* u - username for authentication '''required'''
* user_id - '''required'''
* user_id - '''required'''
* number - '''required'''
* number - '''required'''
Line 32: Line 39:
You send:
You send:


  HTML POST: http://<SERVER_IP>/billing/api/user_subscriptions_check_number_status
  HTML POST: http://<SERVER_IP>/billing/api/subscription_flat_rate_number_status_get?u=admin&user_id=45&number=370666888666&hash=c420ef706a02e6449994b7575b25ef5f74cc722b
?user_id=45&number=370666888666&hash=c420ef706a02e6449994b7575b25ef5f74cc722b


<br><br>
<br><br>
Line 39: Line 45:
===Returns===
===Returns===


<page>
<page>
<status>
<status>
<number>37065</number>
<number>370666888666</number>
<status>included</status>
<status>included</status>
</status>
<prefix>3706</prefix>
</page>
</status>
</page>


<page>
<page>
<status>
<status>
<number>37065</number>
<number>370666888666</number>
<status>excluded</status>
<status>excluded</status>
</status>
</status>
</page>
</page>




Line 65: Line 72:
Example:
Example:


<page>
<page>
<status>
<status>
<error>User was not found</error>
<error>User was not found</error>
</status>
</status>
</page>
</page>


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

Latest revision as of 16:35, 4 March 2021

Description

MOR API method for check prefix covering flat-rate subscriptions.
API returns the result if that number (prefix covering this number) is included or excluded from the flat-rate subscriptions of that user.

Can be used by:

Admin

Accountant with permissions Manage Services - write, Manage Subscriptions - read, Manage Users - read

Reseller

Partner

Usage

  • From MOR X16 call: /api/subscription_flat_rate_number_status_get
  • Methods: POST, GET(if allowed, not recomended)



Parameters

Parameters which are included into hash

  • u - username for authentication required
  • user_id - required
  • number - required



Request

If API Secret Key = secret

You send:

HTML POST: http://<SERVER_IP>/billing/api/subscription_flat_rate_number_status_get?u=admin&user_id=45&number=370666888666&hash=c420ef706a02e6449994b7575b25ef5f74cc722b



Returns

<page>
<status>
<number>370666888666</number>
<status>included</status>
<prefix>3706</prefix>
</status>
</page>
<page>
<status>
<number>370666888666</number>
<status>excluded</status>
</status>
</page>


Errors:

  • <error>user_id must be non negative integer</error>
  • <error>user_id must be provided</error>
  • <error>Number must be provided</error>
  • <error>User was not found</error>
  • <error>User does not have any Flat-Rate subscriptions</error>


Example:

<page>
<status>
<error>User was not found</error>
</status>
</page>



See also