–> Firstly research and study your material. Believe it all through cautiously, that which you will HOW and declare you are going to declare it. I believe of writing a great interesting guide, the fact Is with a hint, although simplicity (or can or not it’s “tinge” of the Strange). Continue reading
Author Archives: gloeber
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:
URL Parameters:
Name | Description | Required? |
wsid | Your SlingShot Web Service Id | Yes |
key | Your Secret Key | Yes |
Example:
Expected Response:
Header:
Body:
GET /results
Get all results in the system after a certain date.
Resource URL:
Header Parameters:
Parameter | Value | Required? |
If-Modified-Since | Date (RFC 1123) | No |
Accept | application/json or application/xml | Yes |
Expected Result:
Header:
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:
Header Parameters:
Parameter | Value | Required? |
X-Security-Token | [your security token] | Yes |
Accept | application/json or application/xml | Yes |
Expected Result:
Header:
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:
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:
Body:
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:
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:
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:
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:
Header Parameters:
Parameter | Value | Required? |
X-Security-Token | [your security token] | Yes |
Accept | application/json or application/xml | Yes |
Expected Response:
Header:
Body:
0,0,0,0