Returns an already created report in PDF format.

Route /report/getPdf[/:key[/:id[/:format]]]
Necessary parameter id
Optional parameter format
Return values name
Cross references getDownloads()
Hints Choose between the formats “json” and “xml” to get the PDF as a Base64 string within the field “file” and the name of the data file within the field “name”. If you choose the format “pdf” you will get the pdf file.


Labeling Description Values margin Default value
id Unique identifier for compiled and downloadable report. (0-9)+
format Defines in which format the result will be returned. json|xml|pdf json

Return values

Labeling Description
name Contains a unique designator for an already created and thus downloadable report.
file Contains a PDF file.


Message Description
no permission The key has no access to this function.
internal error An internal error occured.
param missing A required parameter is missing.
param invalid The value of a parameter is not valid.
result empty The request was successful, but the result itself is empty.
cost error The current credit amount is not sufficient to handle the request.
0k. The processing was successful.

Exemplary code

$root = ''; 
$arrayParams = array( 
'service'   =>'report',
'method'    =>'getPdf',
'key'       =>'myPersonalKey',
'id'        =>'getDownloads-Id',
'format'    =>'pdf',
$GETparams = implode('/', $arrayParams);

$requestURL = $root.$GETparams;

if (!function_exists('curl_init')) die('cURL not available');

$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_URL, $requestURL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

// Download the given URL, and return output
$output = curl_exec($ch);

// Close the cURL resource, and free system resources

echo $output;

Exemplary results


         "name":" (-) GOOGLE.DE 2013-03-10 (---) 2013-03-11.pdf",


                <name> (-) GOOGLE.DE 2013-03-10 (---) 2013-03-11.pdf</name>