× Freshbooks App Logo
FreshBooks
Official App
Free - Google Play
Get it

Receipts

Receipts should always be linked with one expense, therefore the element is a required element on all receipt calls. Whenever sending an image with the xml request (‘create’ and ‘update’ methods) the request must be implemented as a multipart/related request where the file will be related with the XML based on its Content-ID (cid).

receipt.create

Create a new expense receipt.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="receipt.create">
	<receipt>
		<expense_id>1</expense_id>        <!-- id of expense -->
		<image>cid:xxxxxxxxxxxxx</image>  <!-- content-id used on the related binary content -->
	</receipt>
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok" />

receipt.update

Update an existing expense receipt.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="receipt.update">
	<receipt>
		<expense_id>1</expense_id>        <!-- id of expense -->
		<image>cid:xxxxxxxxxxxxx</image>  <!-- content-id used on the related binary content -->
	</receipt>
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok" />

receipt.get

Gets information for a specified receipt.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="receipt.get">
	<expense_id>1</expense_id>  <!-- id of expense -->
</request>

Response

Binary data

receipt.delete

Delete the specified receipt.

Request

<?xml version="1.0" encoding="utf-8"?>
<request method="receipt.delete">
	<expense_id>1</expense_id>  <!-- id of expense -->
</request>

Response

<?xml version="1.0" encoding="utf-8"?>
<response xmlns="https://www.freshbooks.com/api/" status="ok" />