Total Report

end point: https://api.smsdev.com.br/v1/report/total

Method: POST, GET ou JSON

Description: This method is used to consult a summary usage report by period.


Description of parameters

Name Type Standard Required Overview
key text yes Account authentication key.
date_from text not Start date for Ex filter: '01 / 01/2020 ′.
date_to text not End date for Ex filter: '02 / 01/2020 ′.

Was this article helpful to you?

			

{
	"key" : "XXXXXXXXXXXXXXXXXXXX",
	"date_from" : "01/01/2020",
	"date_to" : "30/01/2020"
}

				
			
		
			
				https://api.smsdev.com.br/v1/report/total?key=SUA_CHAVE_KEY&data_from=01/01/2020&data_to=30/01/2020
				
			
			
    

Copy and paste in the browser

			
curl --request GET \
  --url 'https://api.smsdev.com.br/v1/report/total?key=SUA_CHAVE_KEY&data_from=01/01/2020&data_to=30/01/2020'

		
			
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => "https://api.smsdev.com.br/v1/report/total?key=SUA_CHAVE_KEY&data_from=01/01/2020&data_to=30/01/2020",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "GET",
  CURLOPT_SSL_VERIFYHOST => 0,
  CURLOPT_SSL_VERIFYPEER => 0,
));

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}

?>
	
		
			
HttpResponse<String> response = Unirest.get("https://api.smsdev.com.br/v1/report/total?key=SUA_CHAVE_KEY&data_from=01/01/2020&data_to=30/01/2020").asString();


		
			

	var http = require("http");

var options = {
			"method": "GET",
			"hostname": "api.smsdev.com.br",
			"port": null,
			"path": "/v1/report/total?key=SUA_CHAVE_KEY&data_from=01/01/2020&data_to=30/01/2020",
			"headers": {}
		};

		var req = http.request(options, function (res) {
			var chunks = [];

			res.on("data", function (chunk) {
				chunks.push(chunk);
			});

			res.on("end", function () {
				var body = Buffer.concat(chunks);
				console.log(body.toString());
			});
		});

		req.end();

	
		
The above method returns code in the pattern below
		

{ 
   "situacao" : "OK",
   "codigo" : "1",
   "data_inicio" : "01\/01\/2020",
   "data_fim" : "30\/01\/2020",
   "enviada" : "100",
   "recebida" : "10200",
   "blacklist" : "0",
   "cancelada" : "0",
   "qtd_credito" : "10300",
   "descricao" : "CONSULTA REALIZADA"
}
		
	
Return description
Name Overview
situation “OK” - Successful submission
"ERROR" - Submission with error
code See error code table.
start_date Start date of the request made.
date_fin End date of the request made.
sent Qty of messages with status sent in the period.
received Qty of messages with status received in the period.
blacklist Qty of messages with blacklist status in the period.
canceled Qty of messages with status canceled in the period.
qty_credit Credit amount consumed in the period.
description Text of the received message (MO).