Send and Delete an Invoice
Explore how to send invoices to clients via email and delete invoices using the FreshBooks API. This lesson teaches you to work with the invoice endpoint for sending drafts and removing invoices, including handling request parameters and response statuses.
We'll cover the following...
In this lesson, we’ll discuss two very important operations on invoices using FreshBooks API—sending and deleting an invoice. Both operations use the same endpoint:
/accounting/account/{ACCOUNT_ID}/invoices/invoices/{INVOICE_ID}
Send an invoice by email
In this section, we’ll see how we can email clients an invoice. When an invoice is created, it’s in draft mode and hence, not visible to the clients. We can send the invoice to the client by making an HTTP PUT request. This endpoint also lets us send an invoice to multiple clients.
Request parameters
The table below shows the parameters that are wrapped in the bodyParameters object of this call:
Parameter Name | Type | Category | Description |
| Array | Optional | Contains the email ID(s) of the client(s) |
| Object | Optional | Defines the |
| Boolean | Required | Its value should be |
Let’s see the code in the widget below to send the invoice to the client by email.
Note: Please use the " ...