Reports
Provides access to the most commonly used reports and information.
- report.getClientDetails
- report.getEstimateDetails
- report.getExpenseDetails
- report.getInvoiceDetails
- report.getProfitDetails
report.getClientDetails
Returns profit and account standing details for the specified client.
Request
<?xml version="1.0" encoding="utf-8"?>
<request method="report.getClientDetails">
<client_id>12</client_id>
</request>
Response
<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok">
<reports>
<report>
<client_id>12</client_id>
<balances>
<balance>
<total>1676.47</total>
<paid>2.50</paid>
<outstanding>1673.97</outstanding>
<currency_code>CAD</currency_code>
</balance>
<balance>
<total>6102.24</total>
<paid>110.00</paid>
<outstanding>5992.24</outstanding>
<currency_code>USD</currency_code>
</balance>
</balances>
</report>
</reports>
</response>
report.getEstimateDetails
Returns total estimated, accepted and invoiced values for invoices; broken down by currency.
Request
<?xml version="1.0" encoding="utf-8"?>
<request method="report.getEstimateDetails">
<client_id>69931</client_id>
<!-- All the fields below are optional -->
<date_from>YYYY-MM-DD</date_from>
<date_to>YYYY-MM-DD</date_to>
</request>
Response
<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok">
<reports>
<report>
<currency_code>CAD</currency_code>
<estimated>1012.00</estimated>
<accepted>560.00</accepted>
<invoiced>468.07</invoiced>
</report>
</reports>
</response>
report.getExpenseDetails
Returns information about all, or a filtered set of expenses.
Request
<?xml version="1.0" encoding="utf-8"?>
<request method="report.getExpenseDetails">
<!-- All fields below are optional -->
<client_id>12</client_id>
<date_from>YYYY-MM-DD</date_from>
<date_to>YYYY-MM-DD</date_to>
<group_by>date</group_by>
</request>
Response (When not grouped by date)
<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok">
<reports>
<report>
<unbilled>385.00</unbilled>
<invoiced>595.08</invoiced>
<recouped>240.00</recouped>
<internal>33438.39</internal>
</report>
</reports>
</response>
Response (When Grouped by date)
<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok">
<reports>
<report>
<unbilled>260.00</unbilled>
<invoiced>299.00</invoiced>
<recouped>0.00</recouped>
<internal>10565.02</internal>
<year>2014</year>
<month>7</month>
</report>
<report>
<unbilled>100.00</unbilled>
<invoiced>500.00</invoiced>
<recouped>280.00</recouped>
<internal>20540.00</internal>
<year>2013</year>
<month>5</month>
</report>
</reports>
</response>
report.getInvoiceDetails
Returns information about all, or a filtered set of invoices. Default sorting in the response is by currency code, unless overruled with the
Request
<?xml version="1.0" encoding="utf-8"?>
<request method="report.getInvoiceDetails">
<!-- All fields below are optional -->
<status>active</status>
<client_id>324</client_id>
<date_from>YYYY-MM-DD</date_from>
<date_to>YYYY-MM-DD</date_to>
<group_by>date</group_by>
</request>
Response
<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok">
<reports>
<report>
<billed>102959905.17</billed>
<collected>100046149.96</collected>
<outstanding>2913755.21</outstanding>
<currency_code>CAD</currency_code>
</report>
<report>
<billed>100.00</billed>
<collected>0.00</collected>
<outstanding>100.00</outstanding>
<currency_code>EUR</currency_code>
</report>
<report>
<billed>30.00</billed>
<collected>30.00</collected>
<outstanding>0.00</outstanding>
<currency_code>GBP</currency_code>
</report>
<report>
<billed>75394.35</billed>
<collected>1951.66</collected>
<outstanding>73442.69</outstanding>
<currency_code>USD</currency_code>
</report>
</reports>
</response>
Response (grouped by month)
<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok">
<reports>
<report>
<billed>89412.56</billed>
<collected>0.00</collected>
<outstanding>89412.56</outstanding>
<currency_code>CAD</currency_code>
<year>2014</year>
<month>11</month>
</report>
<report>
<billed>4510.00</billed>
<collected>0.00</collected>
<outstanding>4510.00</outstanding>
<currency_code>USD</currency_code>
<year>2014</year>
<month>11</month>
</report>
<report>
<billed>1173500.78</billed>
<collected>0.00</collected>
<outstanding>1173500.78</outstanding>
<currency_code>CAD</currency_code>
<year>2014</year>
<month>10</month>
</report>
...
</reports>
</response>
report.getProfitDetails
Returns profit & loss details. With this report we assume that the currency_code is the same as the system’s base currency_code. Invoice amounts in other currencies will be converted. The normal call (not filtered by date) will return the same information as the ‘Totals’ column on the Profit & Loss Report.
Request
<?xml version="1.0" encoding="utf-8"?>
<request method="report.getProfitDetails">
<!-- The fields below are REQUIRED -->
<date_from>YYYY-MM-DD</date_from>
<date_to>YYYY-MM-DD</date_to>
<!-- The fields below are OPTIONAL -->
<group_by>date</group_by>
</request>
Response (Not using optional date filter)
<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok">
<reports>
<report>
<income>6972.97</income>
<expenses>12681.89</expenses>
<profit>-5708.92</profit>
<currency_code>USD</currency_code>
</report>
</reports>
</response>
Response (using optional date filter)
<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok">
<reports>
<report>
<income>456.96</income>
<expenses>597.56</expenses>
<profit>-140.60</profit>
<currency_code>USD</currency_code>
<year>2014</year>
<month>01</month>
</report>
<report>
<income>912.41</income>
<expenses>204.88</expenses>
<profit>707.53</profit>
<currency_code>USD</currency_code>
<year>2014</year>
<month>02</month>
</report>
<report>
<income>102.24</income>
<expenses>97.56</expenses>
<profit>4.68</profit>
<currency_code>USD</currency_code>
<year>2014</year>
<month>03</month>
</report>
...
</reports>
</response>