SUMMARY (GET) - Get the Summary of your Queries

This endpoint allows you get the summary of your queries within a given perios

Base URL

https://ussd.simhosting.ng/api/summary/

Get the summary of your queries within a given period. All the requests are submitted through HTTPS 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.


PARAMETERS

Parameter Type Description
token string The API authentication token. This can be accessed from API Tokens' page
timeframe string

The time frame for the summary. Below are valid queries

1h = 1 hour ago

6h = 6 hours ago

12h = 12 hours ago

24h = 24 hours ago

1d = Today

1w = 1 week ago

If no time frame is supplied today's value will be returned

 
 
 

Summary Request Format  (HTTPS GET Method)

Sample PHP code to get query status via refid

 

<?php
    $baseurl 
"https://ussd.simhosting.ng/api/summary/?";
    
$status_array = array (

      "token" =>"API_TOKEN_HERE",
      
"timeframe" =>"TIME_FRAME"
    
     
); 
    
$status_url $ussd_base.http_build_query($status_array);
    
$response file_get_contents($status_url);
    echo 
$response// response code 
?>


 

USSD Response Format

All response are in the format below:

{json data}

 

Response on Success

{
   "success": true,
   "comment": "Showing the summary between 2020-05-18 00:00:00 and 2020-05-18 23:59:59",
   "data": [      
{
         "server_name":"SERVER_1",
         "server_number":"2348100000000",
         "summary":{
"pending":2,
            "successful":"681"         
}
      
},
      {        
"server_name":"SERVER_2",
         "server_number":"23480300000000",
         "summary":{
            "successful":"103",
            "failed":"6"
}
] }

 

Response on Failure

{
"success": "false",
"comment": "ADDITIONAL_COMMENT"
}

 

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.