Using the Reporting API, you can get to your eBook download statistics in JSON or XML formats, to create all kinds of reporting tools on your own website. Simply perform a post request with a starting and ending date, along with your account credentials to get the report in the format you desire. Below are two examples in PHP

Sample form to get eBook download report in XML

  <!-- 
In this sample form, your EditionGuard account information is assumed to be:
E-Mail Address: abc@yourdomain.com  
Shared Secret: Secret
Please replace these values with your own credentials to use the API on your account.
-->
<?php
$secret = "Secret";
$nonce = rand(1000000, 999999999); // Random nonce value
$email = "abc@yourdomain";
$hash = hash_hmac("sha1", $nonce.$email, base64_decode($secret));
$format = "xml" // valid values are "xml" or "json"
?>
<form method="post" enctype="multipart/form-data" action="http://www.editionguard.com/api/report/<?php echo $format ?> ?>">
    <input type="hidden" name="email" value="<?php echo $email ?>" />
    <input type="hidden" name="nonce" value="<?php echo $nonce ?>" />
    <input type="hidden" name="hash" value="<?php echo $hash ?>" />
    Start Date: <input type="text" name="start_date" value="<?php echo date("Y", time())."-01-01" ?>"/>

    End Date:<input type="text" name="end_date" value="<?php echo date("Y-m-d", time()) ?>" />

    <input type="submit" />
</form>

Sample XML data returned from the API

 <?xml version="1.0" encoding="UTF-8"?>
<results>
        <result>
            <resourceid>urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</resourceid>
            <transtime>2012-06-06 11:33:51.0</transtime>
            <name>abc@yourdomain.com</name>
            <title>ABC eBook</title>
            <distributorid>urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</distributorid>
            <transactionid>12345</transactionid>
        </result>
        <result>
            <resourceid>urn:uuid:67d4e222-7d4f-4d90-9c63-81b91c180804</resourceid>
            <transtime>2012-06-08 15:25:45.0</transtime>
            <name>abc@yourdomain.com</name>
            <title>My Test</title>
            <distributorid>urn:uuid:xxxxxxxx-4a11-44f3-bfab-656b52502969</distributorid>
            <transactionid>12346</transactionid>
        </result>
        <result>
            <resourceid>urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</resourceid>
            <transtime>2012-06-10 11:33:51.0</transtime>
            <name>abc@yourdomain.com</name>
            <title>Your eBook</title>
            <distributorid>urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx</distributorid>
            <transactionid>12347</transactionid>
        </result>
    </results>

Sample JSON Data returned from the reporting API

[
{"name":"abc@yourdomain.com","transtime":"2012-06-06 11:33:51.0","transid":"12345","resourceid":"urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","distid":"urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","title":"ABC eBook"}
,
{"name":"abc@yourdomain.com","transtime":"2012-06-08 11:33:51.0","transid":"12346","resourceid":"urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","distid":"urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","title":"My Test"}
,
{"name":"abc@yourdomain.com","transtime":"2012-06-10 11:33:51.0","transid":"12347","resourceid":"urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","distid":"urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx","title":"Your eBook"}
]

Did this answer your question?