About API?

About API?

About API's -


REST APIs
Using the Knowlus APIs you can make outgoing calls to phones and SIP-enabled endpoints. Since the API is based on REST principles, it’s very easy to write and test applications. You can use your browser to access URLs, and pretty much any HTTP client in any programming language to interact with the API.

HTTP GET and POST


You can configure Knowlus to make its initial HTML requests to your application via HTTP GET or POST methods.

POST

When Knowlus performs an HTTP POST to a web server, metadata associated with the call (phone number, etc.) is passed as the body of the POST just as if the parameters were submitted as part of a form on a webpage.

Tip : One important point to note is that you cannot cache POST requests. To cache HTML requests, make use of the HTTP GET method.

Note: In the POST method of all the APIs, Knowlus does not use username and password. Instead you will need an encryption and a decryption key. You can generate these anytime from within the Register Keys tab in the API section of the web interface. The encryption and decryption keys will be sent to your registered email id.

GET


When Knowlus performs an HTTP GET to a web server, metadata associated with the call (phone number, etc.) is passed as URL query string parameters as if the parameters were submitted as part of a form on a webpage. Knowlus locally caches static HTML documents and media files.


1. Points to remember for exception handling during API integration:

- All special characters are rejected in GET form api since they are converted into unicode at backend. It is an exception at the system.
- An API key provides access to the SR account details for any SMS or CRM integration without knowing the username or paasword.
- Any API cannot use the already defined variables of our system.For example if any api has 'to' or 'destination' then an exception occurs and the value of destination is changed which hampers the functioning of the API
- If the API consists of any parameters or declarations after ? Then it will be of type GET
- All URL types API are of the form POST
- GET API can be tested by hitting on the browser.
- As for post it can only be tested by certain tools for example postman etc which requires technical knowledge and hence it is advisable to ask the customer to check his API
- Our API does not support%2b(+) unicode
- API wrapper needs to be created for $caller_id to fetch the callers number and cut into it 10 digit numbers.
- POST form API gathers all the variables from our system and then sees it in the customers system
- GET API specifies the variables and values it wants from our system.
- All API respond back in either of the 3 formats: xml or json or plaintext
 


2. API Parameters to prepare API Key -


$dispnumber -- The SR number.
$caller_id -- caller's number
$call_id -- unique callid

$start_time -- start time of the call
$end_time -- end time of the call
$timezone -- timezone in which the start_time and end_time is made available.
$call_duration -- duration of the call
$destination -- connected agent's number.
$action -- action that was taken (phone/voicemai
$extension -- the extension which was pressed.


Output of one of the received packet of hookapi at server end:-

Incoming cdr: {'dispnumber': '', 'extension': '1', 'callid': 'ed29c4be-8e1b-', 'PWD': '705u8cluGWY', 'end_time': '2013-03-16 14:58:57', 'action': 'Phone', 'timezone': 'Asia/Kolkata', 'resource_url': '', 'type': 'incoming', 'start_time': '2013-03-16 14:58:57', 'UID': 'IVRadmin'}

Highlighted Items are the other static params that were configured in the hookapi .

3. Using the API key and the parameters provided in point number 2,  your developer will then design the API.

4. Once the API is designed and tested, you can setup that API in your SR account. (Refer Document 7.7 – for API Integration on SR)



    • Related Articles

    • How do I hook API keys in SuperReceptionist?

      The API key itself cannot be hooked in the Panel and has to be provided to your developer for different integrations. Once they create an API, the same can be hooked in the post call hooks and subsequently in the call flow.   For adding the Hook API: ...
    • Customized SMS API

      Customized SMS API allows you to acknowledge customers right after a call or find out how your agent responded to a specific customer query. If you already have an existing SMS service, you can use your own SMS-gateway with just a few clicks.
    • How do I integrate API in Super Receptionist?

      Follow these directions to know more about APIs and integrate them with SuperReceptionist: About APIs: REST APIs Using the Knowlus APIs, you can make outgoing calls to phones and SIP-enabled endpoints. Since the API is based on REST principles, it is ...
    • Where can I find my SuperReceptionist API key?

      Your SuperReceptionist API key can be found on your web app. Log in to your SuperReceptionist account and go to 'Settings' Go to the 'Plan Settings' next to 'Rules' section Scroll down to the bottom of the page to find your API key
    • How to Find API key in your SR panel?

      Click on SETTINGS on the Home screen Select CALL FLOW Click on PLAN SETTINGS beside the rules tab Scroll down and you will find your API key for your SuperReceptionist account. Each account will have a unique API key.