Skip to main content

Get a Report by ID

Get report data by report_id.

Example

Use the $API->action('_report', $report_id, 'getData', $filter); method to get report data.

<?php
header('Content-Type: text/plain');

require '../ChargeOverAPI.php';
require 'config.php';

$API = new ChargeOverAPI($url, $authmode, $username, $password);

$report_id = 44;

$filter = array(
'invoice_invoice_date:GTE:2017-05-02',
'invoice_invoice_date:LTE:2017-07-02',
);

// Get report data
$resp = $API->action('_report', $report_id, 'getData', $filter);

if (!$API->isError($resp))
{
print_r($resp);
}
else
{
print('Error message was: ' . $resp->code . ': ' . $resp->message . "\n");

print("\n\n\n\n");
print($API->lastRequest());
print("\n\n\n\n");
print($API->lastResponse());
print("\n\n\n\n");
}