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

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