Cancelling All Pending Outbound Calls

delete
Cancel All Pending Outbound Calls

https://insight.plumvoice.com/api/surveys/{survey_id}/{instance_id}/cancel
Cancel all pending outbound calls in the call queue.
Request
Response
Request
Path Parameters
survey_id
optional
string
Plum Insight survey ID number
instance_id
optional
string
Plum Insight survey instance number
Headers
content-type
optional
string
application/x-www-form-urlencoded
Response
202: Accepted
No body returned
‚Äč
404: Not Found
Example: Invalid deployment
JSON
XML
JSON
{'success':false,'error':'The specified deployment was not found for this survey.'}
XML
<result>
<success>false</success>
<error>The specified deployment was not found for this survey.</error>.
</result>

Possible Response Codes

Note: On a successful response (HTTP code 202), no body will be returned.

  • 202: calls successfully marked for deletion

  • 401: authentication headers invalid or the account is inactive

  • 403: the account attempting to cancel calls does not have appropriate permissions

  • 404: deployment was not found by the supplied survey and instance id

  • 405: invalid HTTP method supplied (only DELETE allowed)

  • 415: unsupported media type (Content-Type value in request)

  • 500: database error

The return structure will contain the following item(s):

Name

Data Type

Always Present

Description

success

boolean

no

Indicates the outcome of the request. This will only be present when the response http code is something other than HTTP 202, indicating a failure.

error

string

no

If the success value is false this provides a message indicating what error(s) occurred. This will only be present when the response http code is something other than HTTP 202, indicating a failure.

Sample Code

This sample PHP code that makes a request to this method:

<?php
$ch = curl_init();
$url = 'https://insight.plumvoice.com/api/surveys/{survey_id}/{instance_id}/cancel';
$username = 'you@yourdomain.com';
$password = 'your_developer_key';
curl_setopt($ch, CURLOPT_USERPWD, $username.":".$password);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Accept: application/json", "Content-Type: application/x-www-form-urlencoded"));
$result = curl_exec($ch);
$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
var_dump($result);
var_dump($http_code);