Difference between revisions of "MOR API"
From Kolmisoft Wiki
Jump to navigationJump to search
Line 91: | Line 91: | ||
==Financial statements== | ==Financial statements== | ||
* [[MOR API | * [[MOR API financial_statements_get| financial_statements_get]] - financial statements list. | ||
==Payments== | ==Payments== |
Revision as of 05:03, 27 May 2013
About
MOR API lets other software interact with MOR without knowing the internal structure of the database (DB) and other logic.
MOR accepts requests by HTML POST and returns results in XML.
MOR users that are allowed to use MOR API
- Admin
- Reseller
- Accountant - only by using Admin Hash and Secret key
Functions
API Related
- API Configuration - configuration options for API.
- Hash construction - how to construct hash to authenticate data over API.
Login
- user_login - logs user in to MOR.
- user_logout - logs user out from MOR.
User
- user_register - create new user from params.
- user_details_get - gets user details
- user_details_update - update user from params.
Callback
- callback_init - initiates callback.
Accounting
- invoices_get - retrieves a list of invoices in a selected time period.
Calls
- user_calls_get - retrieves a list of calls in a selected time period for a user/device.
Balance
- user_balance_get - retrieves a user balance.
- simple_balance - gets user's balance
- user_balance_update - change user's balance
Rates
- rate_get - check user rate by prefix
- tariff_rates_get - get all tariff's rates
- import_tariff_retail - import xml retail tariff
- wholesale_tariff - update or create wholesale tariff
Device
- device_create – create device
- delete_device – delete device
- devices_get – users device list
- cli_info_get – shows id of device where CLI belongs.
DID
- did_create - DID create
- did_device_assign - Assign Device to DID
- did_device_unassign - Unassign Device from DID
Monitorings
- ma_activate - turn on monitorings addon
Phonebooks
- phonebooks_get - phonebooks list.
- phonebook_edit - edit phonebook.
Payments list
- payments_get - payments list.
Credit notes
- credit_notes_get - credit notes list.
- credit_note_update - credit note update.
- credit_note_create - credit note create.
- credit_note_delete - credit note delete.
Financial statements
- financial_statements_get - financial statements list.
Payments
- create_payment - create payment.
Calling cards
- cc_by_cli - creates and updates calling cards, including adding and transferring funds, by being identified according the Caller_ID.
- buy_card_from_callingroup - sells cards from calling card group.
- show_calling_card_group - show calling group info.
MOR version
- get_version - get MOR version number.
SMS Send
- sms_send - send SMS.
Send Email
- send_email - send Email.
Examples
HTML POST
All requests are in a similar format:
HTML POST: http://<SERVER_IP>/billing/api/<function>?u=username
- username - the user name and password of the user who is asking for the data.
If the user has 'admin' rights, he will get more results and can perform more actions compared to a user who does not have such rights.