MOR API Quickforwards update
From Kolmisoft Wiki
Jump to navigationJump to search
NOTE: Available from MOR X5
Description
MOR API Quickforward DID edit.
User - can edit his Quickforward DID which he is able to use.
Usage
- From MOR X5 call: api/quickforwards_did_update
- Methods: POST, GET(if allowed, not recomended)
Parameters
- u - username for authentication. Required.
- did - DID number which will be edited. Required.
- forward_to - did, admin assigned you, will be forwarded to forward_to number.
- description - new description.
- hash - SHA1 hash constructed using params and API_Secret_Key ( More described in Constructing hash). Required (if setting Disable hash checking is not checked).
Request
HTML POST: http://192.168.0.40/billing/api/quickforwards_did_update?u=USERNAME&did=DID&forward_to=NUMBER&description=DESCRIPTION&hash=HASH
Example:
We have username = admin, did=37060503666, forward_to=37066603777, description=abyss and API Secret Key = 123456
You send:
http://127.0.0.1/billing/api/quickforwards_did_update?u=admin&did=37060503666&forward_to=37066603777&description=abyss&hash=b12dbb15d59356af0fd75dc413ebd07a5b852d15
NOTE that username and password are not included in hash
Returns
Success:
(example)
<?xml version="1.0" encoding="UTF-8"?> <page> <new_quickforward_did> <did>37060503666</did> <forward_to>37066603777</forward_to> <description>abyss</description> </new_quickforward_did> </page>
Errors:
- <error>DID was not found</error> – Specified DID was not found.
- <error>You are not authorized to use Quickforwards</error> – Such username does not exist in the database or it was not specified.
- <error>Incorrect hash</error> – Hash was not correct. Check API_Secret_Key and order or params while concatenating hash_string.
- <error>User was not found</error> – User was not found using username. Use correct username.