QUERIES(POST) - Mark all RUNNING queries as PENDING
This endpoint allows you to mark all RUNNING queries as PENDING. When this done, the affected USSD queries will be retried.
Base URL
http://ussd.simhosting.ng/api/queries/running_pending/
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 |
USSD Request Format (HTTPS POST Method)
Sample code to cancel pending queries
<?php
$baseurl = "http://ussd.simhosting.ng/api/queries/running_pending/";
$ussdArray = array (
"servercode" => "SIMSERVER_TOKEN_HERE",
"token" =>"API_TOKEN_HERE",
);
$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"
}