Difference between revisions of "MOR API Quickforwards get"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with '=Description= Retrieves owner's list of Quickforward DIDs.<br><br> '''User''' - can get his list of Quickforward DIDs which he is able to use. <br> =Usage= * From '''MOR X4''' …')
 
 
(5 intermediate revisions by one other user not shown)
Line 1: Line 1:
=Description=
=Description=
Retrieves owner's list of Quickforward DIDs.<br><br>
Retrieves owner's list of Quickforward DIDs.<br><br>


'''User''' - can get his list of Quickforward DIDs which he is able to use.
'''Simple User''' - can get his list of Quickforward DIDs which he is able to use.
<br>
<br>
=Usage=
=Usage=
Line 16: Line 17:
===Request===
===Request===


If you want find s_call_type=all calls for s_user = 5, through s_device=7 in period from 2011-11-01 23:59:59 till 2011-11-30 23:59:59, and your API Secret Key = 456789
HTML POST: http://<SERVER_IP>/billing/api/quickforwards_dids_get?u=USERNAME&hash=HASH
 
Example:
 
If you want find Quickforward DIDs list of ''username = test_user''


You send:
You send:


  HTML POST: http://<SERVER_IP>/billing/api/user_calls_get?u=username&s_user=5&period_start=1320191999&period_end=1322697599&s_device=7&s_call_type=all&hash=df2983700ffecb52e6649f0cb3981b66537083a4
  http://127.0.0.1/billing/api/quickforwards_dids_get?u=test_user&hash=47fc73b6d374bd0a85e3984c1e1623451681569c
<br><br>


'''* Note that username is not included in hash'''
<br><br>
===Returns===
===Returns===


'''Success:''' Everything is ok. You get the list of calls if there is any:
'''Success:''' Everything is ok. You get the list of Quickforward DIDs if there is any:
 
''(for example)''


  <?xml version="1.0" encoding="UTF-8"?>
  <?xml version="1.0" encoding="UTF-8"?>
  <page>
  <page>
   <pagename>Calls</pagename>
   <quick_forward_did>
  <language>en</language>
    <did>37161112345</did>
  <error_msg></error_msg>
    <forward_to></forward_to>
  <userid>0</userid>
    <description></description>
   <username>admin</username>
   </quick_forward_did>
   <total_calls>1</total_calls>
   <quick_forward_did>
  <currency>USD</currency>
     <did>37161112347</did>
  <calls_stat>
     <forward_to></forward_to>
     <period>
     <description></description>
      <period_start>2008-03-07 11:48:18</period_start>
  </quick_forward_did>
      <period_end>2012-03-07 11:46:01</period_end>
  <quick_forward_did>
    </period>
     <did>37161112349</did>
     <show_user>all</show_user>
     <forward_to></forward_to>
     <show_device>all</show_device>
     <description></description>
    <show_status>all</show_status>
   </quick_forward_did>
    <show_provider>4</show_provider>
     <show_hgc>all</show_hgc>
     <show_did>1</show_did>
     <calls>
      <call>
        <calldate2>2009-01-02 00:00:01</calldate2>
<!---This functionality is available from MOR x3--->        <timezone>(GMT+02:00) Vilnius</timezone>
        <clid>37046246362</clid>
        <destination>Lithuania MOB Lithuania mobile</destination>
        <did>37063042438</did>
        <did_inc_price>1.0</did_inc_price>
        <did_price>1.0</did_price>
        <did_prov_price>1.0</did_prov_price>
        <dispod>ANSWERED(16)</dispod>
        <dst>37063042438</dst>
        <nice_billsec>20.0</nice_billsec>
        <nice_reseller> </nice_reseller>
        <prefix>3706</prefix>
        <profit>4</profit>
        <provider_name>Test Provider</provider_name>
        <provider_price>1.0</provider_price>
        <provider_rate>0.0</provider_rate>
        <reseller_price>0.0</reseller_price>
        <reseller_rate>0.0</reseller_rate>
        <server_id>1</server_id>
        <src>37046246362</src>
        <user></user>
        <user_price>2.0</user_price>
        <user_rate>0.0</user_rate>
      </call>
    </calls>
   </calls_stat>
  </page>
  </page>
'''NOTE''' that calldate is in system(server) Time Zone.


'''Errors:'''
'''Errors:'''


* <error>API Requests are disabled</error> – '''Allow API globally''' setting is unchecked.
* <error>Quickforwards list is empty</error> – Quickforwards list is empty.
* <error>Access Denied</error> – Such username does not exist in the database or it was not specified.
* <error>You are not authorized to use Quickforwards</error> – Such username does not exist in the database or it was not specified.
* <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
* <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
* <error>User was not found</error> – User was not found using user_id. Use correct user_id.
* <error>User was not found</error> – User was not found using user_id. Use correct user_id.
Example:
  <status>
    <error>API Requests are disabled</error>
  </status>
<br><br>


=See also=
=See also=


* [[MOR API]]
* [[MOR API]]

Latest revision as of 14:34, 17 February 2014

Description

Retrieves owner's list of Quickforward DIDs.

Simple User - can get his list of Quickforward DIDs which he is able to use.

Usage

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



Parameters



Request

HTML POST: http://<SERVER_IP>/billing/api/quickforwards_dids_get?u=USERNAME&hash=HASH

Example:

If you want find Quickforward DIDs list of username = test_user

You send:

http://127.0.0.1/billing/api/quickforwards_dids_get?u=test_user&hash=47fc73b6d374bd0a85e3984c1e1623451681569c



Returns

Success: Everything is ok. You get the list of Quickforward DIDs if there is any:

(for example)

<?xml version="1.0" encoding="UTF-8"?>
<page>
 <quick_forward_did>
   <did>37161112345</did>
   <forward_to></forward_to>
   <description></description>
 </quick_forward_did>
 <quick_forward_did>
   <did>37161112347</did>
   <forward_to></forward_to>
   <description></description>
 </quick_forward_did>
 <quick_forward_did>
   <did>37161112349</did>
   <forward_to></forward_to>
   <description></description>
 </quick_forward_did>
</page>

Errors:

  • <error>Quickforwards list is empty</error> – Quickforwards list is empty.
  • <error>You are not authorized to use Quickforwards</error> – Such username does not exist in the database or it was not specified.
  • <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
  • <error>User was not found</error> – User was not found using user_id. Use correct user_id.

See also