MOR API Calling Cards get

From Kolmisoft Wiki

Jump to: navigation, search


[edit] Description

MOR API Returns the list of Calling Cards with respect to provided search parameters.

[edit] Usage

  • Call: /api/calling_cards_get (from MOR X7)
  • Methods: POST, GET(if allowed, not recomended)

[edit] Parameters

  • hash - SHA1 hash constructed using the required parameters (in this case none of the parameters is required). The hash will contain only an API_Secret_Key ( More described in Constructing hash). Required.
  • u - username for authentication. Required.
  • number - Calling Card's number.
  • name - Calling Card's name
  • pin - Calling Card's PIN code.
  • batch_number - Calling Card's batch number.
  • min_balance - lower boundary of the Calling Card's balance range.
  • max_balance - upper boundary of the Calling Card's balance range.
  • callerid - Calling Card's CallerID for "pinless" dialing.
  • language - Calling Card's language.
  • sold - determines whether a Calling Card is sold or not (send yes/no/all and recognize Card is sold or no by 1 - sold, 0 - not sold).
  • distributor - Calling Card's distributor's (User's) id.

[edit] Request

We have u = admin, API Secret Key = secret

We send:

HTML POST: http://<SERVER_IP>/billing/api/calling_cards_get?u=admin&number=1111111119&name=test_card&pin=2668&min_balance=10&max_balance=50&language=en&callerid=3&sold=0&distributor=2&hash=e5e9fa1ba31ecd1ae84f75caaa474f3a663f05f4
  • Now we get a search result containing the Calling Cards with the specified attributes data.

* Note that a Username and a Password are not included into hash

[edit] Returns


<?xml version="1.0" encoding="UTF-8"?>
      <card_daily_charge_paid_till>2015-11-05 02:00:00 +0200</card_daily_charge_paid_till>
      <card_distributor>Test User #1</card_distributor>


  • <error>Access Denied</error> - User is not authorized or is a Simple User. Only Admin, Reseller or Accounant can use this API method.
  • <error>Incorrect hash</error> - hash is not correct. Check API_Secret_Key and order or parameters while concatenating a hash_string.
  • <error>You are not authorized to use this functionality</error> - User has no permissions to manage Calling Cards.
  • <error>Cards were not found</error> - no Cards were found with provided search parameters.


<?xml version="1.0" encoding="UTF-8"?>
    <error>Cards were not found</error>

[edit] See also

Personal tools


Try M2