GET /auth/token

This call is used during testing to generate a security token you can used in future WS calls. This is the only call that does not require a security token itself.

Resource URL:

GET http://slingshot.surgentnetworks.com/api/auth/token

URL Parameters:

Name Description Required?
wsid Your SlingShot Web Service Id Yes
key Your Secret Key Yes

Example:

http://slingshot.surgentnetworks.com/notificationplatform-web/api/auth/token?wsid=ba230daf-124b-4c16-b002-8d85fa78301e&key=OJl162Uj1zniDV2iz17zJw

Expected Response:

Header:

HTTP/1.1 200 OK

Body:

<String representing your Token>
i.e: ba230daf-124b-4c16-b002-8d85fa78301e:ZqVSg_eftyhw9cmPo3JNfgHD-x7wC_Fg6_Mjwop9jYGT54Jttb0T_r4xhbH179CsfrvS2NBCn_ NmeTEXi3GzOD9NW8_3vloZV0ARPICsra8yRkjoQaT-66uxxp8jAHr7

GET /results

Get all results in the system after a certain date.

Resource URL:

http://slingshot.surgentnetworks.com/notificationplatform-web/api/results

Header Parameters:

Parameter Value Required?
If-Modified-Since Date (RFC 1123) No
Accept application/json or application/xml Yes

Expected Result:
Header:

HTTP/1.1 200 OK

Body:
Example / JSON

[
{
"resultId":1234,
"notificationId":"123456",
"notificationCustomerId":null,
"timeOfCall":"2015-05-05T02:33:53-04:00",
"callDuration":"0",
"slingshotResultCode":"900",
"moduleResultCode":null,
"moduleResultMessage":null,
"clientResultMessage":"xxx",
"history":null
},
{
"resultId":4321,
"notificationId":"54321",
"notificationCustomerId":"yyy",
"timeOfCall":"2015-05-05T02:34:06-04:00",
"callDuration":"27063",
"slingshotResultCode":"200",
"moduleResultCode":null,
"moduleResultMessage":null,
"clientResultMessage":null,
"history":null
}
]

GET /results/notification/uniqueid/:id

Pull the result history for one specific notification by system ID

Resource URL:

GET http://slingshot.surgentnetworks.com/api/results/notification/uniqueid/[id]

Header Parameters:

Parameter Value Required?
X-Security-Token [your security token] Yes
Accept application/json or application/xml Yes

Expected Result:
Header:

HTTP/1.1 201 Created

Body:
Example / JSON

[
   { 
      "callId":"1448240515672testNot1122",
      "appId":null,
      "callAlertId":"testNot1122",
      "callDate":"2015-11-22T20:02:28-05:00",
      "callPriority":1,
      "callbackNumber":"16665557777",
      "outboundCallNumber":"18579917607",
      "requestedCompletionTime":"2022-10-02T11:00:00-04:00",
      "requestedStartTime":"2012-10-02T11:00:00-04:00",
      "campaignId":null,
      "timezone":null,
      "results":[ 
         { 
            "resultId":3440,
            "notificationId":"1448240515672testNot1122",
            "timeOfCall":"2015-11-22T20:02:28-05:00",
            "callDuration":"4840",
            "SlingShotResultCode":"200",
            "moduleResultCode":null,
            "moduleResultMessage":null,
            "clientResultMessage":null
         }
      ]
   }
]

PUT /queue

Add one notification to the Queue
Resource URL:

PUT http://slingshot.surgentnetworks.com/api/queue

Header Parameters:

Parameter Value Required?
X-Security-Token [your security token] Yes
Content-Type application/json or application/xml Yes

Example Content / JSON

{
"callReferenceId":"D8B599",
"outboundNumber":"15556667777",
"notificationType":2,
"application":1,
"callBackNumber":"15557776666",
"message":"Default Message"
}

Example Content / XML

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<notification>
<callReferenceId>D8B599</callReferenceId>
<outboundNumber>15556667777</outboundNumber>
<callBackNumber>15557776666</callBackNumber>
<notificationType>1</notificationType>
<application>1</application>
<message>Some Message</message>
</notification>

Expected Result:
Header:

HTTP/1.1 201 Created

Body:

None

GET /notification/cust/:id

Pull the notification information by reference ID entered by a user.

Resource URL:

GET http://slingshot.surgentnetworks.com/api/notification/cust/134816595720120

Header Parameters:

Parameter Value Required?
X-Security-Token [your security token] Yes
Accept application/json or application/xml Yes

Expected Result:
Header:

HTTP/1.1 200 OK

Body:
Example / JSON

[
{
"callId":"1448240515672testNot1122",
"appId":null,
"callAlertId":"testNot1122",
"callDate":"2015-11-22T20:02:28-05:00",
"callPriority":1,
"callbackNumber":"16665557777",
"outboundCallNumber":"18579917607",
"requestedCompletionTime":"2022-10-02T11:00:00-04:00",
"requestedStartTime":"2012-10-02T11:00:00-04:00",
"campaignId":null,
"timezone":null,
"results":[
{
"resultId":3440,
"notificationId":"1448240515672testNot1122",
"timeOfCall":"2015-11-22T20:02:28-05:00",
"callDuration":"4840",
"SlingShotResultCode":"200",
"moduleResultCode":null,
"moduleResultMessage":null,
"clientResultMessage":null
}
]
}
]

PUT /queue/list

Add several notifications to the Queue at once.

Resource URL:

http://slingshot.surgentnetworks.com/api/queue/list

Header Parameters:

Parameter Value Required?
X-Security-Token [your security token] Yes
Content-Type application/json or application/xml Yes
Accept application/json or application/xml Yes

Example Content / JSON

Sample JSON Body for Phone Call:

[
{
"callReferenceId":"testNotification150912",
"outboundNumber":"18579917607",
"notificationType":1,
"callBackNumber":"16665557777",
"priority":"1",
"messageType":"VXML",
"message":"http://slingshot-stage.surgentnetworks.com/notificationplatform-web/testNVP5Load.vxml"
}
]

Sample JSON Body for Text Message:

[
{
"callReferenceId":"testNotification150912",
"outboundNumber":"18579917607",
"notificationType":2,
"callBackNumber":"16665557777",
"priority":"1",
"messageType":"SMS",
"message":"Simple SMS test message from Surgent"
}
]

Optional Parameters:
In the sample body above, we add a notification to the accounts default campaign, to be executed right away and without expiration time. There are a few optional parameters we can use to specify more details:

  • executionId: If we want to add the notification to a specific campaign, we use this field
  • startSchedule: If we want to delay delivery of the notification, we use this field
  • endSchedule: If we want to make sure that the notification is not delivered after a certain time, we use this field

Expected Result:
Header:

HTTP/1.1 201 Created

Body:

[{"callId":"testNotification150912","result":"ADDED"}]

GET /queue

Get information on the current state of the queue.

The Web Service will return the following Value:

Calls currently queued to go out, Calls currently Paused, Calls currently waiting for their Start Time, Calls currently being handled

Resource URL:

GET http://slingshot.surgentnetworks.com/api/queue/status

Header Parameters:

Parameter Value Required?
X-Security-Token [your security token] Yes
Accept application/json or application/xml Yes

Expected Response:
Header:

HTTP/1.1 200 OK

Body:
0,0,0,0