Introduction

The REST API allows you to interact with application: connect to the application, populate data, extract data into other applications, extract reports, make calls and even develop your applications to integrate with your application.

The API is implemented using plain URL with all the REST commands: GET, PUT, POST and DELETE. These APIs allow you to read, modify, add and delete data in application. Outbound Calls, Click2Call, inbound Calls, Missed Calls and Other Solutions are the resources in the application that can be manipulated using the APIs.

Authentication

Solutions Infini uses HTTP Basic Authentication. You do not need a disclose your username nor password to access the Solutions Infini APIs. In Your account dashboard you can generate secure unlimited api keys to access the Solutions Infini APIs, which also means that you will be restricted to only accessing the data enabled on your Solutions Infini user profile.

Making a Request

To access the data, you simply request a URL from www.solutionsinfini.com/voice-solutions.html and let us know what you want. The URLs are simple, they can be built with the following output:

Making the URL

api_key Your unique identification key generate from your account section
method The data you want. The different request types are listed below.
output (optional) Specify the output type. We currently offer JSON, PHP, and XML formats.

Generate API Key (api_key)

You can generate very secure and unlimited api keys in developers section of the application. Every api key in system is unique it doesn't match with any other user api keys. You can regenerate or delete your api keys if you found api keys are misusing somebody

Requests (method) you can make

misscall Get the Missed call report
voice.call Make outbound call or play outbound sound
voice.upload Upload sound file to the application.
voice.campaigns Get the outbound campaign details
voice.reports Get the outbound call group wise and all reports.
dial Get all incoming call reports including IVR.

Response Formats (output)

All of the different response formats return the exact same data, but you can choose the format that is easiest to work with in the programming language that you're using.

JSON

The JSON format can be used directly in JavaScript and many other languages. You can use this format in PHP: just call json_decode() to convert the data into an array.

JSONP

JSONP is the same as the JSON response, but it's wrapped in a callback function. To get a JSONP response, just append &callback=myFunction to the end of the JSON request URL.

PHP

When using this format, Voice will return a serialized PHP array. All you have to do is pass the data through unserialize() and you'll have an array of the data.

XML

The XML version of the data is a very simple XML format that should be easy for you to parse. You can use SimpleXML class in PHP to easily parse it.

Making a Miss Call (misscall) Report Request

To get a list of the missed calls, in XML format, you'd make this request:

http://api-voice.solutionsinfini.com/v1/?api_key=854da42ee2e4734a48017c&method=misscall&format=xml

Your unique identification
key generate from your
accound section

method The data you want. The different request types are listed below.
format (optional) Specify the output type. We currently offer JSON, PHP, and XML formats.
limit (optional) Number of results per each request. (default 50 items)
page (optional) Number of the page to get request.
callto (optional) if you have multiple missed call numbers send number to which you want results.
callfrom (optional) Get the results for perticular mobile number
fromdate (optional) Results starting from date. Date in any format. ex: 2012/02/22 or 22/02/2012 ...
todate (optional) Results ending to this date. Date in any format. ex: 2012/02/22 or 22/02/2012 ...
unique (optional) Removes duplicate numbers in results.

Example Response (in XML format)

<?xml version="1.0" encoding="utf-8"?>
<api>
  <status>200</status>
  <message>OK</message>
  <data>
    <misscall>
      <callfrom>9999644638</callfrom>
      <callto>8067006944</callto>
      <provider>VODAFONE</provider>
      <location>Karnataka</provider>
      <uniqid>1351157494.90647</uniqid>
      <date>25/10/2012 03:01 PM</date>
    </misscall>
    ...
  </data>
</api>

Response Data

status It indicates the success or failure of your request. 200 is success, others are failure
message It indicates the success or failure message.
data All the response is wrapped in side data
misscall This is the method you requested.
callfrom Mobile number of the user who gave the missed call.
callto Missed Call number.
provider Mobile number service provider
location The location of the caller mobile
uniqid This is the unique id to each missed call
date When you got the missed call

Making a Outbound Call (voice) Request

To initiate outbound calls, in JSON output, you'd make this request:

http://api-voice.solutionsinfini.com/v1/?api_key=854da42ee2e4734a48017c&method=voice.call&output=json
numbers Mobile numbers, Multiples separated by comma(,)
group Name of the group from which number have to pick (optional)
play ID of the IVR or Sound file to play in this campaign. Check id in manage ivr or sounds
retries (optional) Number of call retries if person doesn't answer first time (default no retires)
interval (optional) Interval between each retry.
campaign (optional) Name of this campaign for your reference (HTTP API Request)
newgroup (optional) If this is set every time new group will be created
scheduletime (optional) Schedule campaign to future time. Date time in any output. ex: 2012/02/22 11:00 AM or 22/02/2012 22:10 ....

Example Response (in JSON output)

{
    "status": 200,
    "message": "OK"
}

voice.upload

To upload sound file to application, response in JSON output, you'd make this request:

http://api-voice.solutionsinfini.com/v1/?api_key=854da42ee2e4734a48017c&method=voice.upload&output=json
title Title of the sound file
soundfile Sound file to upload. either full url or upload using curl

Request need to be POST Request

Example Response (in JSON output)

{
    "status": 200,
    "message": "OK",
    "data": [{
        "id": "123"
    }]
}

voice.campaigns

Get list all campaigns, response in JSON output, you'd make this request:

http://api-voice.solutionsinfini.com/v1/?api_key=854da42ee2e4734a48017c&method=voice.campaign&output=json
limit (optional) Number of results per each request. (default 50 items)
page (optional) Number of the page to get request.
fromdate (optional) Results starting from date. Date in any output. ex: 2012/02/22 or 22/02/2012 ...
todate (optional) Results ending to this date. Date in any output. ex: 2012/02/22 or 22/02/2012 ...

Example Response (in JSON output)

{
    "status": 200,
    "message": "OK",
    "data": [{
        "id": "627",
        "campaign": "9019955622",
        "totalnumbers": "1",
        "retries": "0",
        "retryinterval": "15",
        "added": "2012-10-25 19:09:45"
    },
    ...
    ]
}

voice.reports

Get list all campaigns, response in PHP output, you'd make this request:

http://api-voice.solutionsinfini.com/v1/?api_key=854da42ee2e4734a48017c&method=voice.reports&output=php
limit (optional) Number of results per each request. (default 50 items)
page (optional) Number of the page to get request.
number (optional) Report for particular number.
campaign (optional) Report for particular group.
fromdate (optional) Results starting from date. Date in any output. ex: 2012/02/22 or 22/02/2012 ....
todate (optional) Results ending to this date. Date in any output. ex: 2012/02/22 or 22/02/2012 ....

Example Response (in JSON output)

Array
(
    [status] => 200
    [message] => OK
    [data] => Array
        (
            [596] => Array
                (
                    [0] => Array
                        (
                            [group] => test 33
                            [groupid] => 596
                            [mobile] => 9901166773
                            [attempts] => 1
                            [starttime] => 25-08-2015 06:41:47
                            [endtime] => 25-08-2015 06:42:08
                            [duration] => 21
                            [finalstatus] => COMPLETED
                        )
                  ...

                )
            ...
        )

)

Making incoming (dial) reports request

Get list of all incoming and click2calls, response in PHP output, you'd make this request:

http://api-voice.solutionsinfini.com/v1/?api_key=854da42ee2e4734a48017c&method=dial&output=json
limit (optional) Number of results per each request. (default 50 items)
page (optional) Number of the page to get request.
callto (optional) Report for particular number.
fromdate (optional) Results starting from date. Date in any output. ex: 22/02/2012 ....
todate (optional) Results ending to this date. Date in any output. ex: 2012/02/22 or 22/02/2012 ....

Example Response (in JSON output)

Array
(
    [status] => 200
    [message] => OK
    [data] => Array
        (
            [0] => Array
                (
                    [callfrom] => 90199556XX
                    [callto] => 80476155xx
                    [duration] => 30
                    [billsec] => 15
                    [date] => 20/06/2014 10:01 AM
                    [notes] => Important client call
                    [location] => KARNATAKA
                    [provider] => VODAFONE
                    [status] => ANSWER
                    [uniqid] => 1402671795.58
                )
            ...
           ]

        )

)

Making a Click2Call (dial Request)

To initiate click2call, in JSON output, you'd make this request:

http://api-voice.solutionsinfini.com/v1/?api_key=854da42ee2e4734a48017c&method=dial.click2call&output=json
caller Caller will get the call first and connected to receiver
receiver Second call will be triggered to receiver
retry (optional) No of times to retry if no answer from receiver
callback (optional) urlencoded url will be triggered on end of the call

Example Response (in JSON output)

{
    "status": 200,
    "message": "OK"
}

Checking Balance (members.balance) Request

To check balance, in JSON output, you'd make this request:

http://api-voice.solutionsinfini.com/v1/?api_key=854da42ee2e4734a48017c&method=members.balance&output=json

Example Response (in JSON output)

{
    "status": 200,
    "message": "OK"
    "data": {
        "credits": 13.00
     }
}