QUERIES (POST) - Cancel all PENDING Queries
This endpoint allows you cancel all pending queries
Base URL
http://ussd.simhosting.ng/api/queries/cancel/
Submit USSD requests to the base URL. All the requests are submitted through HTTPS POST/GET method. Although you can use HTTP protocol, we strongly recommend you to submit all requests to API over HTTPS so the traffic is encrypted and the privacy is ensured.
USSD PARAMETERS
Parameter | Type | Description |
---|---|---|
servercode | string | Optional. The SIMServer token. This can be obtained from My Hosted SIMs page. If you desire to cancel pending messages of a single server |
token | string | The API authentication token. This can be accessed from API Tokens' page |
status | string | Optional. The status code of the pending queries to be marked as CANCELLED. 1: PENDING 2: RUNNING |
USSD Request Format (HTTPS POST Method)
Sample code to cancel pending queries
<?php
$baseurl = "http://ussd.simhosting.ng/api/queries/cancel/";
$ussdArray = array (
"servercode" => "SIMSERVER_TOKEN_HERE",
"token" =>"API_TOKEN_HERE",
"status" =>"STATUS_CODE"
);
$params = http_build_query($ussdArray);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$baseurl);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
$response = curl_exec($ch); curl_close($ch);
echo $response; // response code
?>
USSD Response Format
All response are in the format below:
{json data}
Response on Success
{
"success": "true",
"comment": "ADDITIONAL_COMMENT",
}
Response on Failure
{
"success": "false",
"comment": "ADDITIONAL_COMMENT"
}