Harvest icon

Harvest

Interact with Harvest API for time tracking and invoicing

Invoice → Download PDF

AI-generated

Summary

Download the PDF file of an invoice using its client key obtained from the invoice object.

Inputs

  • Client Key (required) — The client_key of the invoice; this is used to identify and download the specific invoice PDF. It can be retrieved from the invoice object via the "Get" operation.

Output shape

a single binary file representing the PDF of the invoice.

The output includes binary data of the invoice PDF named as 'invoice-{clientKey}.pdf'. You must provide the client key exactly as retrieved to successfully download the file.

Examples

Example 1: Download an invoice PDF after retrieving an invoice

First use the 'Get' operation on the 'Invoice' resource to fetch an invoice and extract its 'client_key'. Then use this operation with that client key to download the corresponding invoice PDF.

Discussion