Difference between revisions of "MOR API Card Groups get"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with '= NOTE: Available from MOR X7 = =Description= MOR API Calling Cards Groups get <br><br> =Usage= * From '''MOR X7''' Calling Cards Groups: '''/api/cc_groups_get''' * Methods…')
 
 
(3 intermediate revisions by 2 users not shown)
Line 11: Line 11:
===Parametres===
===Parametres===


* u - username for authentication. '''Required'''.
* u - username for authentication.
* cc_group_id - Calling Cards Group ID.
* cc_group_id - Calling Cards Group ID.
* [[MOR API hash construction | hash]] - SHA1 hash constructed using '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.
* [[MOR API hash construction | hash]] - SHA1 hash constructed using '''API_Secret_Key''' ([[MOR API hash construction | More described in Constructing hash]]). '''Required'''.
Line 28: Line 28:


  <page>
  <page>
   <status>
   <cc_groups>
   <group_id>1</group_id>
   <cc_group>
  <group_image>example.jpg</group_image>
    <group_id>1</group_id>
  <group_name>Test_cardgroup</group_name>
    <group_image>example.jpg</group_image>
  <group_description>Test_cardgroup description</group_description>
    <group_name>Test_cardgroup</group_name>
  <group_number_pin_length>10/4</group_number_pin_length>
    <group_description>Test_cardgroup description</group_description>
  <group_tarrif>Test Tariff for Users</group_tarrif>
    <group_number_pin_length>10/4</group_number_pin_length>
  <group_lcr>Primary</group_lcr>
    <group_tarrif>Test Tariff for Users</group_tarrif>
  <group_price>10.0840</group_price>
    <group_lcr>Primary</group_lcr>
  <group_price_without_tax>10.0840</group_price_without_tax>
    <group_price>10.0840</group_price>
  <group_cards_count>21</group_cards_count>
    <group_price_without_tax>10.0840</group_price_without_tax>
   </status>
    <group_cards_count>21</group_cards_count>
    <group_currency>EUR</group_currency>
  </cc_group>
   </cc_groups>
  </page>
  </page>
<br><br>
<br><br>
Line 45: Line 48:


'''Errors'''
'''Errors'''
* <error>Bad login</error> - User supplied bad login.
* <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>You are not authorized to use this functionality</error> - User does not have rights to manage Calling Cards.
* <error>You are not authorized to use this functionality</error> - User does not have rights to manage Calling Cards.

Latest revision as of 05:28, 27 June 2017

NOTE: Available from MOR X7

Description

MOR API Calling Cards Groups get

Usage

  • From MOR X7 Calling Cards Groups: /api/cc_groups_get
  • Methods: POST, GET(if allowed, not recomended)



Parametres



Request

We have: API Secret Key = secret

We send:

HTML POST: http://<SERVER_IP>/billing/api/cc_groups_get?u=admin&cc_group_id=1&hash=e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4

NOTE that username is not included in hash

Success

<page>
 <cc_groups>
  <cc_group>
   <group_id>1</group_id>
   <group_image>example.jpg</group_image>
   <group_name>Test_cardgroup</group_name>
   <group_description>Test_cardgroup description</group_description>
   <group_number_pin_length>10/4</group_number_pin_length>
   <group_tarrif>Test Tariff for Users</group_tarrif>
   <group_lcr>Primary</group_lcr>
   <group_price>10.0840</group_price>
   <group_price_without_tax>10.0840</group_price_without_tax>
   <group_cards_count>21</group_cards_count>
   <group_currency>EUR</group_currency>
  </cc_group>
 </cc_groups>
</page>




Errors

  • <error>Incorrect hash</error> - Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
  • <error>You are not authorized to use this functionality</error> - User does not have rights to manage Calling Cards.
  • <error>Access Denied</error> - User does not have access to Calling Cards.
  • <error>Wrong calling cards group ID</error> - User supplied wrong Calling Cards group ID.
  • <error>Calling cards groups were not found</error> - Calling cards groups were not found.



See also