Difference between revisions of "MOR API Calling Card update"

From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with '= NOTE: Available from MOR X7 = =Description= MOR API Calling Card update <br><br> =Usage= * From '''MOR X7''' Calling Card: '''/api/calling_card_update''' * Methods: POST,…')
 
 
(4 intermediate revisions by 3 users not shown)
Line 9: Line 9:
* Methods: POST, GET(if allowed, not recomended)
* Methods: POST, GET(if allowed, not recomended)
<br><br>
<br><br>
===Parametres===
===Parameters===


* u - username for authentication.
* u - username for authentication.
Line 20: Line 20:
* min_balance - Minimum balance for the Calling Card.
* min_balance - Minimum balance for the Calling Card.
* daily_charge_paid_till - Timestamp of daily charge paid.
* daily_charge_paid_till - Timestamp of daily charge paid.
* language - Language for the Calling Card.  
* language - Language for the Calling Card.
* first_use - Date in a Timestamp format. To remove First Use date from Calling Card, please use parameter -1.
* distributor - Calling Card distributor (User) id.
* distributor - Calling Card distributor (User) id.


Line 38: Line 39:


  <page>
  <page>
   <status>
   <success>Calling Card successfully updated</success>
  <success>Calling card successfully updated</success>
  </status>
  </page>
  </page>
<br><br>
<br><br>
Line 46: Line 45:


'''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.
* <error>Access Denied</error> - User does not have access to Calling Cards.
* <error>Access Denied</error> - User does not have access to Calling Cards.
* <error>Wrong Calling card ID</error> - User supplied wrong Calling Card ID.
* <error>Wrong Calling Card ID</error> - User supplied wrong Calling Card ID.
* <error>Calling card not found</error> - Calling card was not found.
* <error>Calling Card not found</error> - Calling card was not found.
<br><br>
<br><br>



Latest revision as of 08:53, 16 October 2017

NOTE: Available from MOR X7

Description

MOR API Calling Card update

Usage

  • From MOR X7 Calling Card: /api/calling_card_update
  • Methods: POST, GET(if allowed, not recomended)



Parameters

  • u - username for authentication.
  • card_id - Calling Card ID. Required.
  • number - Number for the Calling Card.
  • name - Card name for the Calling Card.
  • pin - PIN code for the Calling Card.
  • batch_number - Batch number for the Calling Card.
  • callerid - Caller ID for the Calling Card.
  • min_balance - Minimum balance for the Calling Card.
  • daily_charge_paid_till - Timestamp of daily charge paid.
  • language - Language for the Calling Card.
  • first_use - Date in a Timestamp format. To remove First Use date from Calling Card, please use parameter -1.
  • distributor - Calling Card distributor (User) id.



Request

We have: API Secret Key = secret, card_id = 1, number = 4673451679, name = card, pin = 7468, batch_number = 5456484, callerid = 2, min_balance = 5, daily_charge_paid_till = 1446721871, language = en, distributor = 2

We send:

HTML POST: http://<SERVER_IP>/billing/api/calling_card_update?u=admin&card_id=1&number=4673451679&name=card&pin=7468&batch_number=5456484&callerid=2&min_balance=5&daily_charge_paid_till=1446721871&language=en&distributor=2&hash=bc2f114099d16656d37e45fd9e8744cb9386d462

NOTE that username is not included in hash

Success

<page>
 <success>Calling Card successfully updated</success>
</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 Card ID</error> - User supplied wrong Calling Card ID.
  • <error>Calling Card not found</error> - Calling card was not found.



See also