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($chCURLOPT_URL,$baseurl); 
        
curl_setopt($chCURLOPT_RETURNTRANSFER,true); 
        
curl_setopt($chCURLOPT_POST1); 
        
curl_setopt($chCURLOPT_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"
}

 

Tags
Tags
Image

USSD on SIMHosting is a product of HoRLaR I.T. Solutions. It automates data and airtime vending via HTTPS POST/GET requests to the hosted SIM.