Get list of all downloads for a product

GET to list all downloads for the specified product...

/api/v2/products/:sku/downloads
/api/v2/products/:sku/downloads.xml

Example result...

<?xml version="1.0" encoding="UTF-8"?>
<downloads type="array">
    <download>
        <id>233</id>
        <filename>photo.jpg</filename>
        <product_sku>BILL-WAX</product_sku>
        <order_id>1001</order_id>
        <order_item_id>821431</order_item_id>
        <ip_address>127.0.0.1</ip_address>
        <downloaded_at type="datetime">2009-04-27T04:13:09+00:00</downloaded_at>
        <size_bytes type="float">87088
        </size_bytes>
    </download>
    <download>
        <id>433</id>
        <filename>ebook.pdf</filename>
        <product_sku>BILL-WAX</product_sku>
        <order_id nil="true"></order_id>
        <order_item_id nil="true"></order_item_id>
        <ip_address>127.0.0.1</ip_address>
        <downloaded_at type="datetime">2009-04-28T10:33:09+00:00</downloaded_at>
        <size_bytes type="float">332088
        </size_bytes>
    </download>
</downloads>

A nil order_id or order_item_id indicates a direct download of the product via the permalink.

Back to blog