Difference between revisions of "MOR API did rates details get"
From Kolmisoft Wiki
Jump to navigationJump to search
(Created page with "=Description= <!---This functionality is available from MOR X17--> MOR API Get DID rates details <br><br> =Usage= * From '''MOR X17''' call: '''/api/did_rates_details_get''' * Methods: POST, GET(if allowed, not recommended) <br><br> ===Parameters=== Parameters which are '''included''' into hash: * did_id - DID number '''Required'''. Parameters which are '''not included''' into hash: * u - username for authentication. '''Required'''. * MOR API hash construction...") |
|||
(3 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
[[MOR API]] Get DID rates details | [[MOR API]] Get DID rates details | ||
<br><br> | <br><br> | ||
=Usage= | =Usage= | ||
Line 33: | Line 34: | ||
===Returns=== | ===Returns=== | ||
<page> | |||
<status> | |||
<did> | |||
<id>3</id> | |||
<provider_tariff_id>3</provider_tariff_id> | |||
<allow_call_reject_provider>1</allow_call_reject_provider> | |||
<owner_tariff_id>4</owner_tariff_id> | |||
<allow_call_reject>1</allow_call_reject> | |||
</did> | |||
</status> | |||
</page> | |||
---- | ---- | ||
Line 49: | Line 61: | ||
* Incorrect hash – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string. | * Incorrect hash – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string. | ||
* Access Denied – Only Admin | * Access Denied – Only Admin or Accountant may use API. | ||
* DID was not found – DID number does not exist or is incorrect. | * DID was not found – DID number does not exist or is incorrect. | ||
Latest revision as of 13:50, 6 April 2023
Description
MOR API Get DID rates details
Usage
- From MOR X17 call: /api/did_rates_details_get
- Methods: POST, GET(if allowed, not recommended)
Parameters
Parameters which are included into hash:
- did_id - DID number Required.
Parameters which are not included into hash:
- u - username for authentication. Required.
- hash - SHA1 hash constructed using params and API_Secret_Key ( More described in Constructing hash). Required.
Request
We have DID id 3, API Secret Key = secret
We send
HTML POST: http://<SERVER_IP>/billing/api/did_rates_details_get?did_id=3&u=admin&hash=350c0745ac7cb1565efda7e9c0e6ad2c6f9569c7
Returns
<page> <status> <did> <id>3</id> <provider_tariff_id>3</provider_tariff_id> <allow_call_reject_provider>1</allow_call_reject_provider> <owner_tariff_id>4</owner_tariff_id> <allow_call_reject>1</allow_call_reject> </did> </status> </page>
Errors
<?xml version="1.0" encoding="UTF-8"?> <page> <status> <error>Error message</error> </status> </page>
Error messages:
- Incorrect hash – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
- Access Denied – Only Admin or Accountant may use API.
- DID was not found – DID number does not exist or is incorrect.