60% Off for 3 Months

Invoices

Invoices

Invoices in FreshBooks are what gets sent to Clients, detailing specific goods or services performed or provided by the Administrator of their System, and the amount that the Client owes to the Admin.

Invoices are created in a "Draft" status, and must be marked as sent or sent by email before they are recognized by accounting reports. See "Sending An Invoice" below.

If the invoice_number field is not specified in the request, FreshBooks generates an invoice_number value by incrementing the invoice_number of the previous invoice (for example, “0005” → “0006”, “000D” → “000E”). Otherwise, the user-provided invoice_number value is used.

For online payment options, see Online Payments.

For customizing the invoice appearance and attaching files, see Invoice Presentation and Attachments

Access Requirements

Access

Requires Authorization

Scopes

user:invoices:read
user:invoices:write

Creating Multiple Invoices

When creating multiple invoices concurrently and not specifying invoice_number in the request, there is a possibility of an invoice number collision (when two or more invoices with the same invoice_number are being processed). The FreshBooks API returns a 409 error in this case. Retrying a request with such failure will create an invoice successfully.

It is recommended to create multiple invoices either:

  • Concurrently - invoice_number must be specified in every request
  • Sequentially - invoice_number can be specified or omitted

Sending An Invoice

Invoices are created in a “Draft” status and must be marked as sent or sent by email before accounting reports recognize them. A client cannot view an invoice link in “Draft” status.

Invoices can be marked as sent by a PUT request with the "action_mark_as_sent": true action or sent by email with the "action_email":true action and a list of "email_recipients". See the sidebar for examples.

Invoice Statuses

Code

Status

Description

0

Disputed

An Invoice with the Dispute option enabled, which has been disputed by a Client. This is a feature of FreshBooks Classic only and should only appear in migrated accounts

1

Draft

An Invoice that has been created, but not yet sent.

2

Sent

An Invoice that has been sent to a Client or marked as sent.

3

Viewed

An Invoice that has been viewed by a Client.

4

Paid

A fully paid Invoice.

5

Auto Paid

An Invoice paid automatically with a saved credit card.

6

Retry

An Invoice that would normally be paid automatically, but encountered a processing issue, either due to a bad card or a service outage. It will be retried 1 day later.

7

Failed

An Invoice that was in Retry status which again encountered a processing issue when being retried.

8

Partial

An Invoice that has been partially paid.

v3 Statuses

v3 status fields give a descriptive name to states which can be used in filters.

Value

Description

created

Invoice is created and in no other state

draft

Invoice is saved in draft status

sent

Invoice has been sent

viewed

Invoice has been viewed by receipient

failed

an autobill related to the invoice has been tried more than once and failed

retry

an autobill related to the invoice has been tried once and failed, and will be retried

success

an autobill related to the invoice has succeeded

autopaid

a payment has been tied to the invoice automatically via autobill

paid

payments related to the invoice have succeeded and the object is fully paid

partial

some payment related to the invoice has succeeded but the invoice is not yet paid off

disputed

the invoice is disputed

resolved

the invoice was disputed and the dispute has been marked as resolved

overdue

the invoice required an action at an earlier date that was not met

deposit-partial

the invoice has a related deposit which has been partially paid

deposit-paid

the invoice has a related deposit which has been fully paid

declined

the invoice has a related order which has been declined

pending

the invoice has a related order which is pending

Includes

Include Name

Description

audit_logs

Show invoice view/send/payment history

client_audits

Show the client-visible invoice history

comments

Comments made on invoice

contacts

List of client contacts

lines

Invoice lines

owner

Owner info

latest_journal_entry

Journal entry info

allowed_gateways

List of allowed gateways

late_fee

Late fee info

presentation

Presentation type

project_total_amounts

Total amounts billed from projects

late_reminders

Late reminders

system

Invoice-owner's system

Filters

Filter Type

Name

Field

Description

Equals

invoiceid

invoiceid

matches exact invoiceid

In

invoiceids

invoiceid

matches list of invoiceids, one per query argument specified

Like

invoice _number _like

invoice _number

invoice number containing parameter

Equals

invoice _number

invoice _number

Matches exact invoice number

Like

notes

notes

Matches on notes containing the parameter

StatusEq Filter

statusid

special

Matches exact invoice status

StatusIn Filter

statusids

special

matches list of invoice statuses, one per query argument specified

V3StatusEq Filter

v3_status

special

matches exact v3_status

Equals

currency _code

currency _code

matches exact currency code

Equals

currency

currency _code

alternative to currency_code filter

Between

date_min

create_date

date greater than or equal to parameter, YYYY-MM-DD format

Between

date_max

create_date

date less than parameter, YYYY-MM-DD format

Between

total_min

amount

amount greater than or equal to parameter

Between

total_max

amount

amount less than parameter

Like

po_number

po_number

po_number containing parameter

Equals

customerid

customerid

matches exact customerid

In

customerids

customerid

matches list of customerids, one per query argument specified

Equals

parentid

parent

matches exact parentid

PaidFilter

paid

special

true/false returns paid invoices or unpaid invoices

Outstanding Filter

outstanding

special

true/false returns outstanding or not outstanding invoices

Between

updated_min

updated

updated date greater than or equal to parameter, YYYY-MM-DD format

Between

updated_max

updated

updated date less than parameter, YYYY-MM-DD format

ItemName Filter

item_name

name

item name containing the parameter

ItemDescriptionFilter

item _description

description

item description containing the parameter

Equals

projectid

special

Deprecated. Matches exact FreshBooks Classic projectid

Equals

modern_projectid

line.modern_projectid

Matches on modern_projectid in invoice line items

Outstanding AmountFilter

outstanding _min

special

matches invoices with an outstanding amount greater than input

Field Descriptions

underlined fields are required on creation

Computed Fields (read only)

Field

invoiceid

id

accounting_systemid

accountid

amount

   - amount

   - code

paid

   - amount

   - code

outstanding

   - amount

   - code

discount_total

   - amount

   - code

created_at

current_organization

date_paid

description

due_date

updated

Writable on Create

Field

ownerid

estimateid

sentid

status

parent

display_status

autobill_status

payment_status

last_order_status

dispute_status

deposit_status

auto_bill

v3_status

Data Fields (writable)

Field

invoice_number

customerid

create_date

generation_date

discount_value

discount _description

po_number

template

currency_code

language

terms

notes

address

return_uri

deposit_amount

deposit _percentage

gmail

show_attachments

ext_archive

vis_state

street

street2

city

province

code

country

organization

fname

lname

vat_name

vat_number

due_offset_days

lines

presentation

Invoice Lines

Invoice lines are used to determine the amount of an invoice, in addition to being able to tie the invoice to rebilled expenses. The invoice line type determines whether a line is an amount or whether it refers to an unbilled expense. Note:When updating lines with a PUT request, the request payload must contain all the lines of the invoice that you wish to remain.

Computed Fields (read only)

Field

lineid

amount

amount

code

updated

Data Fields (writable)

Field

type

expenseid

qty

unit_cost

- amount

- code

description

name

modern_project_id

modern_time_entries

taxName1

taxAmount1

taxName2

taxAmount2