MOR API Calling Card update

From Kolmisoft Wiki

Jump to: navigation, search


[edit] NOTE: Available from MOR X7

[edit] Description

MOR API Calling Card update

[edit] Usage

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

[edit] 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.

[edit] 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>Calling Card successfully updated</success>


  • <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.

[edit] See also

Personal tools


Try M2