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.
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 |
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 | Type | Description |
invoiceid | int | unique-to-this-system invoice id |
id | int | unique-to-this-system invoice id, duplicate of invoiceid |
accounting_systemid | string | unique id for system |
accountid | string | unique id for system, repeat of accounting_systemid |
amount | object |
total amount of invoice. subfields: amount, code |
– amount | string | total amount of invoice, to two decimal places |
– code | string | three-letter currency code |
paid | object | subfields: amount and code |
– amount | string | amount paid on invoice, to two decimal places |
– code | string | three-letter currency code |
outstanding | object | subfields: amount, code |
– amount | string | amount outstanding on invoice, to two decimal places |
– code | string | three-letter currency code |
discount_total | object | subfields: amount and code |
– amount | string | amount of discount, to two decimal places |
– code | string | three-letter currency code |
created_at | datetime | Time the invoice was created, YYYY-MM-DD HH:MM:SS format |
current_organization | string | Name of organization being invoiced — denormalized from client |
date_paid | date | date invoice was fully paid, YYYY-MM-DD format |
description | string | description of first line of invoice |
due_date | date | date invoice is marked as due by, YYYY-MM-DD format, calculated from due_offset_days. If due_offset_days is not set, it will default to the date of issue. |
updated | datetime | time invoice last updated at, YYYY-MM-DD HH:MM:SS format |
Writable on Create | ||
Field | Type | Description |
ownerid | int | id of creator of invoice. 1 if business admin, other if created by e.g. a contractor |
estimateid | int | id of associated estimate, 0 if none |
sentid | int | userid of user who sent the invoice, typically 1 for admin |
status | string | See Invoice Status table. |
parent | int | id of object this invoice was generated from, 0 if none |
display_status | string | Description of status shown in FreshBooks UI, one of ‘draft’, ‘created’, ‘sent’, ‘viewed’, or ‘outstanding’. |
autobill_status | string | one of retry, failed, or success |
payment_status | string | description of payment status. One of ‘unpaid’, ‘partial’, ‘paid’, and ‘auto-paid’. See the v3_status table on this page for descriptions of each. |
last_order_status | string | describes status of last attempted payment |
dispute_status | string | description of whether invoice has been disputed. |
deposit_status | string | description of deposits applied to invoice. One of ‘paid’, ‘unpaid’, ‘partial’, ‘none’, and ‘converted’. |
auto_bill | boolean | whether this invoice has a credit card saved |
v3_status | string | description of Invoice Status, see V3 Status Table. |
Data Fields (writable) | ||
Field | Type | Description |
invoice_number | string | user-specified and visible invoice id |
customerid | int | unique-to-this-system client-id |
create_date | string | date invoice was created, YYYY-MM-DD (string) format |
generation_date | date | date invoice generated from object, null if it wasn’t, YYYY-MM-DD (string) if it was |
discount_value | decimal | percent amount being discounted from the subtotal, decimal-string amount ranging from 0 to 100 |
discount _description | string | public note about discount |
po_number | string | Reference number for address on invoice. |
template | string | (internal, deprecated) choice of rendering style |
currency_code | string | three-letter currency code for invoice |
language | string | two-letter language code, e.g. “en” |
terms | string | terms listed on invoice |
notes | string | Notes listed on invoice |
address | string | First line of address on invoice |
return_uri | string | (deprecated) |
deposit_amount | object | amount required as deposit, null if none |
deposit _percentage | string | percent of the invoice’s value required as a deposit |
gmail | boolean | whether to send via ground mail |
show_attachments | boolean | whether attachments on invoice are rendered |
ext_archive | int | (deprecated) 0 or 1 indicating archived or not |
vis_state | int | “visibility state”. 0 for active, 1 for deleted, 2 for archived |
street | string | street for address on invoice |
street2 | string | second line of street for address on invoice. |
city | string | city for address on invoice |
province | string | Province for address on invoice. |
code | string | zip code for address on invoice |
country | string | Country for address on invoice |
organization | string | Name of organization being invoiced. |
fname | string | First name of Client on invoice |
lname | string | Last name of client being invoiced |
vat_name | string | Value Added Tax name if provided |
vat_number | string | Value Added Tax number if provided |
due_offset_days | int | Number of days from creation that invoice is due. If not set, the due date will default to the date of issue. |
lines | array | Lines of the invoice |
presentation | object | where invoice logo and styles are defined. See our postman collection for details. |
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 | Type | Description |
lineid | int | unique-to-this-invoice line id |
amount | object | amount total of an invoice line, calculated with unit cost, quantity and tax. subfields: amount and code |
amount | string | amount of invoice line item account, to two decimal places |
code | string | three-letter currency code |
updated | datetime | time invoice line last updated at, YYYY-MM-DD HH:MM:SS format |
Data Fields (writable) | ||
Field | Type | Description |
type | int | invoice line type, 0 for normal invoice line, 1 for rebilling expense line |
expenseid | (optional) int | id of unbilled expense, required when invoice line type is 1, otherwise should be excluded |
qty | decimal | quantity of the invoice line unit, multiplied against unit_cost |
unit_cost | object | unit cost of the line item. subfields: amount and code |
– amount | string | unit cost amount, to two decimal places |
– code | string | three-letter currency code |
description | string | description for the invoice line item |
name | string | name for the invoice line item |
modern_project_id | int | Project_id if this line originated from a project (time tracking, project expense, etc.) |
modern_time_entries | array<int> | List of time_entry_ids for any time entries this line item bills for |
taxName1 | string | name for the first tax on the invoice line |
taxAmount1 | decimal | first tax amount, in percentage, up to 3 decimal places |
taxName2 | string | name for the second tax on the invoice line |
taxAmount2 | decimal | second tax amount, in percentage, up to 3 decimal places |
List Invoices
curl -L -X GET 'https://api.freshbooks.com/accounting/account/<accountId>/invoices/invoices' \
-H 'Authorization: Bearer <insert-bearer-token>'
#Response:
{
"response": {
"result": {
"invoices": [
{
"accountid": "LJArJ4",
"accounting_systemid": "LJArJ4",
"address": "",
"amount": {
"amount": "104.50",
"code": "CAD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "Canada",
"create_date": "2021-07-05",
"created_at": "2021-07-05 08:17:47",
"currency_code": "CAD",
"current_organization": "First1 Last1",
"customerid": 806,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "",
"discount_description": null,
"discount_total": {
"amount": "-5.00",
"code": "CAD"
},
"discount_value": "5",
"display_status": "draft",
"dispute_status": null,
"due_date": "2021-07-05",
"due_offset_days": 0,
"estimateid": 0,
"ext_archive": 0,
"fname": "First1",
"fulfillment_date": null,
"generation_date": null,
"gmail": false,
"id": 324,
"invoice_number": "0000007",
"invoiceid": 324,
"language": "en",
"last_order_status": null,
"lname": "Last1",
"net_paid_amount": {
"amount": "0.00",
"code": "CAD"
},
"notes": "Added a 5% discount for your continued support",
"organization": "First1 Last1",
"outstanding": {
"amount": "104.50",
"code": "CAD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "CAD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": false,
"status": 1,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "Please pay the invoice within 30 days",
"updated": "2021-07-05 08:17:47",
"uuid": "1a82a641-6683-466c-a522-6384c15c5357",
"v3_status": "draft",
"vat_name": null,
"vat_number": "",
"version": "2021-07-05 08:17:47.399872",
"vis_state": 0
},
{
"accountid": "LJArJ4",
"accounting_systemid": "LJArJ4",
"address": "",
"amount": {
"amount": "104.50",
"code": "CAD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "Canada",
"create_date": "2021-07-05",
"created_at": "2021-07-05 08:13:53",
"currency_code": "CAD",
"current_organization": "First1 Last1",
"customerid": 806,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "",
"discount_description": null,
"discount_total": {
"amount": "-5.00",
"code": "CAD"
},
"discount_value": "5",
"display_status": "sent",
"dispute_status": null,
"due_date": "2021-07-05",
"due_offset_days": 0,
"estimateid": 0,
"ext_archive": 0,
"fname": "First1",
"fulfillment_date": "2021-07-05",
"generation_date": null,
"gmail": false,
"id": 322,
"invoice_number": "0000006",
"invoiceid": 322,
"language": "en",
"last_order_status": null,
"lname": "Last1",
"net_paid_amount": {
"amount": "0.00",
"code": "CAD"
},
"notes": "Added a 5% discount for your continued support",
"organization": "First1 Last1",
"outstanding": {
"amount": "104.50",
"code": "CAD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "CAD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": false,
"status": 2,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "Please pay the invoice within 30 days",
"updated": "2021-07-05 08:13:55",
"uuid": "e4afb55b-0bca-4783-94be-818a41097138",
"v3_status": "sent",
"vat_name": null,
"vat_number": "",
"version": "2021-07-05 08:13:55.185882",
"vis_state": 0
},
{
"accountid": "LJArJ4",
"accounting_systemid": "LJArJ4",
"address": "",
"amount": {
"amount": "310.00",
"code": "CAD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "Canada",
"create_date": "2021-07-05",
"created_at": "2021-07-05 08:10:53",
"currency_code": "CAD",
"current_organization": "First1 Last1",
"customerid": 806,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "Jul 5, 2021 - Paid social media campaign",
"discount_description": null,
"discount_total": {
"amount": "0.00",
"code": "CAD"
},
"discount_value": "0",
"display_status": "draft",
"dispute_status": null,
"due_date": "2021-07-05",
"due_offset_days": 0,
"estimateid": 0,
"ext_archive": 0,
"fname": "First1",
"fulfillment_date": null,
"generation_date": null,
"gmail": false,
"id": 321,
"invoice_number": "0000005",
"invoiceid": 321,
"language": "en",
"last_order_status": null,
"lname": "Last1",
"net_paid_amount": {
"amount": "0.00",
"code": "CAD"
},
"notes": "Unbilled Expenses added",
"organization": "First1 Last1",
"outstanding": {
"amount": "310.00",
"code": "CAD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "CAD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": false,
"status": 1,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "Please pay the invoice within 30 days",
"updated": "2021-07-05 08:10:53",
"uuid": "c5122940-f746-45eb-a75d-d18fb031f884",
"v3_status": "draft",
"vat_name": null,
"vat_number": "",
"version": "2021-07-05 08:10:53.604805",
"vis_state": 0
},
{
"accountid": "LJArJ4",
"accounting_systemid": "LJArJ4",
"address": "",
"amount": {
"amount": "110.00",
"code": "CAD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "Canada",
"create_date": "2021-07-05",
"created_at": "2021-07-05 08:06:38",
"currency_code": "CAD",
"current_organization": "First1 Last1",
"customerid": 806,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "",
"discount_description": null,
"discount_total": {
"amount": "0.00",
"code": "CAD"
},
"discount_value": "0",
"display_status": "sent",
"dispute_status": null,
"due_date": "2021-07-05",
"due_offset_days": 0,
"estimateid": 0,
"ext_archive": 0,
"fname": "First1",
"fulfillment_date": "2021-07-05",
"generation_date": null,
"gmail": false,
"id": 319,
"invoice_number": "0000004",
"invoiceid": 319,
"language": "en",
"last_order_status": null,
"lname": "Last1",
"net_paid_amount": {
"amount": "0.00",
"code": "CAD"
},
"notes": "Unbilled Expenses added",
"organization": "First1 Last1",
"outstanding": {
"amount": "110.00",
"code": "CAD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "CAD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": false,
"status": 2,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "Please pay the invoice within 30 days",
"updated": "2021-07-05 08:09:20",
"uuid": "8e13f65b-0380-4d6a-a951-76ed037b8246",
"v3_status": "sent",
"vat_name": null,
"vat_number": "",
"version": "2021-07-05 08:09:20.332731",
"vis_state": 0
},
{
"accountid": "LJArJ4",
"accounting_systemid": "LJArJ4",
"address": "",
"amount": {
"amount": "110.00",
"code": "CAD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "Canada",
"create_date": "2021-07-05",
"created_at": "2021-07-05 07:59:58",
"currency_code": "CAD",
"current_organization": "First1 Last1",
"customerid": 806,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "",
"discount_description": null,
"discount_total": {
"amount": "0.00",
"code": "CAD"
},
"discount_value": "0",
"display_status": "draft",
"dispute_status": null,
"due_date": "2021-07-05",
"due_offset_days": 0,
"estimateid": 0,
"ext_archive": 0,
"fname": "First1",
"fulfillment_date": null,
"generation_date": null,
"gmail": false,
"id": 317,
"invoice_number": "0000003",
"invoiceid": 317,
"language": "en",
"last_order_status": null,
"lname": "Last1",
"net_paid_amount": {
"amount": "0.00",
"code": "CAD"
},
"notes": "These are Invoice notes",
"organization": "First1 Last1",
"outstanding": {
"amount": "110.00",
"code": "CAD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "CAD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": false,
"status": 1,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "Please pay the invoice within 30 days",
"updated": "2021-07-05 07:59:58",
"uuid": "5a1a3e97-082a-4954-80bf-82c8ab38925c",
"v3_status": "draft",
"vat_name": null,
"vat_number": "",
"version": "2021-07-05 07:59:58.717874",
"vis_state": 0
},
{
"accountid": "LJArJ4",
"accounting_systemid": "LJArJ4",
"address": "",
"amount": {
"amount": "110.00",
"code": "CAD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "Canada",
"create_date": "2021-07-05",
"created_at": "2021-07-05 07:58:08",
"currency_code": "CAD",
"current_organization": "First1 Last1",
"customerid": 806,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "",
"discount_description": null,
"discount_total": {
"amount": "0.00",
"code": "CAD"
},
"discount_value": "0",
"display_status": "draft",
"dispute_status": null,
"due_date": "2021-07-05",
"due_offset_days": 0,
"estimateid": 0,
"ext_archive": 0,
"fname": "First1",
"fulfillment_date": null,
"generation_date": null,
"gmail": false,
"id": 316,
"invoice_number": "0000002",
"invoiceid": 316,
"language": "en",
"last_order_status": null,
"lname": "Last1",
"net_paid_amount": {
"amount": "0.00",
"code": "CAD"
},
"notes": "These are Invoice notes",
"organization": "First1 Last1",
"outstanding": {
"amount": "110.00",
"code": "CAD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "CAD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": false,
"status": 1,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "Please pay the invoice within 30 days",
"updated": "2021-07-05 07:58:08",
"uuid": "36e917f4-38f8-4c74-b9b9-404fe0e0bdec",
"v3_status": "draft",
"vat_name": null,
"vat_number": "",
"version": "2021-07-05 07:58:08.297868",
"vis_state": 0
},
{
"accountid": "LJArJ4",
"accounting_systemid": "LJArJ4",
"address": "",
"amount": {
"amount": "5000.00",
"code": "USD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "Canada",
"create_date": "2021-07-05",
"created_at": "2021-07-05 07:46:40",
"currency_code": "USD",
"current_organization": "First1 Last1",
"customerid": 806,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "",
"discount_description": null,
"discount_total": {
"amount": "0.00",
"code": "USD"
},
"discount_value": "0",
"display_status": "draft",
"dispute_status": null,
"due_date": "2021-07-05",
"due_offset_days": 0,
"estimateid": 0,
"ext_archive": 0,
"fname": "First1",
"fulfillment_date": null,
"generation_date": null,
"gmail": false,
"id": 306,
"invoice_number": "0000001",
"invoiceid": 306,
"language": "en",
"last_order_status": null,
"lname": "Last1",
"net_paid_amount": {
"amount": "0.00",
"code": "USD"
},
"notes": "",
"organization": "First1 Last1",
"outstanding": {
"amount": "5000.00",
"code": "USD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "USD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": true,
"status": 1,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "",
"updated": "2021-07-05 07:46:40",
"uuid": "1aaee764-05fc-41c8-bfbb-6e58eaaf6352",
"v3_status": "draft",
"vat_name": "",
"vat_number": "",
"version": "2021-07-05 07:46:40.676008",
"vis_state": 0
}
],
"page": 1,
"pages": 1,
"per_page": 15,
"total": 7
}
}
}
Get Single Invoice
curl -L -X GET 'https://api.freshbooks.com/accounting/account/<accountId>/invoices/invoices/<invoiceId>' \
-H 'Authorization: Bearer <insert-bearer-token>'
#Response:
{
"response": {
"result": {
"invoice": {
"status": 2,
"deposit_percentage": null,
"create_date": "2016-09-09",
"outstanding": {
"amount": "800.00",
"code": "USD"
},
"payment_status": "unpaid",
"code": "",
"ownerid": 1,
"vat_number": "",
"id": 2201278,
"gmail": false,
"vat_name": "",
"v3_status": "sent",
"parent": 0,
"country": "United States",
"dispute_status": null,
"lname": "Client",
"deposit_status": "none",
"estimateid": 0,
"ext_archive": 0,
"template": "clean-grouped",
"basecampid": 0,
"generation_date": null,
"show_attachments": true,
"vis_state": 0,
"current_organization": "Test Client",
"province": "",
"due_date": "2016-10-09",
"updated": "2016-09-09 16:04:42",
"terms": null,
"description": "",
"discount_description": null,
"last_order_status": null,
"street2": "",
"deposit_amount": null,
"paid": {
"amount": "0.00",
"code": "USD"
},
"invoiceid": 2201278,
"discount_total": {
"amount": "0.00",
"code": "USD"
},
"address": "",
"invoice_number": "0000003",
"customerid": 2185379,
"discount_value": "0",
"accounting_systemid": "KAG77",
"organization": "Test Client",
"due_offset_days": 30,
"language": "en",
"po_number": null,
"display_status": "sent",
"notes": "",
"date_paid": null,
"amount": {
"amount": "800.00",
"code": "USD"
},
"street": "",
"city": "",
"currency_code": "USD",
"sentid": 1,
"autobill_status": null,
"return_uri": null,
"fname": "Test",
"created_at": "2016-09-09 14:37:59",
"auto_bill": false,
"accountid": "KAG77"
}
}
}
}
Create Invoice
curl -L -X POST 'https://api.freshbooks.com/accounting/account/<accountId>/invoices/invoices' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <insert-bearer-token>' \
--data-raw '{
"invoice": {
"allowed_gateway_name": null,
"deposit_percentage": null,
"due_offset_days": 30,
"estimateid": null,
"highlight_string": null,
"sender_name": null,
"invoiceid": null,
"invoice_client_id": null,
"language": "en",
"last_order_status": null,
"city": "",
"country": "United States",
"create_date": "2021-08-17",
"currency_code": "USD",
"discount_value": 0,
"fname": "F_Name",
"lname": "L_Name",
"notes": "Enter notes or Bank transfer details",
"invoice_number": "0000003",
"status": 2,
"organization": "Test Client company",
"code": "",
"po_number": null,
"province": "",
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "Enter your terms and conditions here, for example, pay within 30 days to avoid late fees.",
"payment_details": null,
"vat_name": null,
"vat_number": "",
"allowed_gateway_info": null,
"attachments": [],
"contacts": [
{
"contactid": "-1"
}
],
"direct_links": [],
"async_invoice_profile": null,
"late_fee": {
"compounded_taxes": false,
"days": 30,
"enabled": true,
"first_tax_name": null,
"first_tax_percent": 0,
"repeat": false,
"second_tax_name": null,
"second_tax_percent": 0,
"type": "percent",
"calculation_type": "total",
"value": 10
},
"late_reminders": [
{
"body": "Kindly pay within 27 days to avoid late payment fees",
"enabled": true,
"delay": 3,
"position": 1
},
{
"body": "Kindly pay within 15 days to avoid late payment fees",
"enabled": true,
"delay": 15,
"position": 2
}
],
"lines": [
{
"modern_project_id": null,
"retainer_id": null,
"retainer_period_id": null,
"amount": {
"amount": "240",
"code": "USD"
},
"description": "",
"expenseid": null,
"taxName1": "GST",
"taxAmount1": 10,
"name": "Photography Services",
"qty": 1,
"taxName2": null,
"taxAmount2": null,
"compounded_tax": false,
"type": null,
"unit_cost": {
"amount": "240",
"code": "USD"
},
"invoiceid": null
}
],
"owner": null,
"presentation": {
"id": "last",
"theme_font_name": "modern",
"theme_primary_color": "#4F697A",
"theme_layout": "simple",
"date_format": "mm/dd/yyyy",
"image_banner_position_y": 0,
"image_logo_src": null,
"image_banner_src": null
},
"transactioninvoiceid": null,
"payment_schedule": [],
"customerid": "2280"
}
}'
#Response:
{
"response": {
"result": {
"invoice": {
"accountid": "pJ1705",
"accounting_systemid": "pJ1705",
"address": "",
"amount": {
"amount": "264.00",
"code": "USD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "United States",
"create_date": "2021-08-17",
"created_at": "2021-08-17 08:20:11",
"currency_code": "USD",
"current_organization": "Test Client company",
"customerid": 2280,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "",
"discount_description": null,
"discount_total": {
"amount": "0.00",
"code": "USD"
},
"discount_value": "0",
"display_status": "sent",
"dispute_status": null,
"due_date": "2021-09-16",
"due_offset_days": 30,
"estimateid": 0,
"ext_archive": 0,
"fname": "F_Name",
"fulfillment_date": "2021-08-17",
"generation_date": null,
"gmail": false,
"id": 1627,
"invoice_number": "0000003",
"invoiceid": 1627,
"language": "en",
"last_order_status": null,
"lname": "L_Name",
"net_paid_amount": {
"amount": "0.00",
"code": "USD"
},
"notes": "Enter notes or Bank transfer details",
"organization": "Test Client company",
"outstanding": {
"amount": "264.00",
"code": "USD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "USD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": false,
"status": 2,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "Enter your terms and conditions here, for example, pay within 30 days to avoid late fees.",
"updated": "2021-08-17 08:20:12",
"uuid": "3664b9d4-31b8-4cad-8a1a-e8449e8e401b",
"v3_status": "sent",
"vat_name": null,
"vat_number": "",
"version": "2021-08-17 08:20:12.082129",
"vis_state": 0
}
}
}
}
Create Invoice With An Unbilled Expense
curl -L -X POST 'https://api.freshbooks.com/accounting/account/<accountId>/invoices/invoices' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <insert-bearer-token>' \
--data-raw '{
"invoice": {
"allowed_gateway_name": null,
"deposit_percentage": null,
"due_offset_days": 0,
"estimateid": null,
"highlight_string": null,
"sender_name": null,
"invoiceid": null,
"invoice_client_id": null,
"language": "en",
"last_order_status": null,
"city": "",
"country": "Canada",
"create_date": "2021-07-05",
"currency_code": "CAD",
"discount_value": 0,
"fname": "First1",
"lname": "Last1",
"notes": "Unbilled Expenses added",
"organization": "First1 Last1",
"code": "",
"po_number": null,
"province": "",
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "Please pay the invoice within 30 days",
"payment_details": null,
"vat_name": null,
"vat_number": "",
"allowed_gateway_info": null,
"attachments": [],
"contacts": [
{
"contactid": "-1"
}
],
"direct_links": [],
"async_invoice_profile": null,
"late_fee": {
"compounded_taxes": false,
"days": 30,
"enabled": false,
"first_tax_name": null,
"first_tax_percent": 0,
"repeat": false,
"second_tax_name": null,
"second_tax_percent": 0,
"type": "percent",
"calculation_type": "total",
"value": 10
},
"late_reminders": [],
"lines": [
{
"modern_project_id": null,
"retainer_id": null,
"retainer_period_id": null,
"amount": {
"amount": "100",
"code": "CAD"
},
"description": "",
"expenseid": null,
"taxName1": "GST",
"taxAmount1": 10,
"name": "Item1",
"qty": 1,
"taxName2": null,
"taxAmount2": null,
"compounded_tax": false,
"type": null,
"unit_cost": {
"amount": "100",
"code": "CAD"
},
"invoiceid": null
},
{
"modern_project_id": null,
"retainer_id": null,
"retainer_period_id": null,
"amount": {
"amount": "200",
"code": "CAD"
},
"description": "Jul 5, 2021 - Paid social media campaign",
"expenseid": 567,
"taxName1": "",
"taxAmount1": 0,
"name": "ABZ Creatives",
"qty": 1,
"taxName2": "",
"taxAmount2": 0,
"compounded_tax": false,
"type": 1,
"unit_cost": {
"amount": "200",
"code": "CAD"
},
"invoiceid": null
}
],
"owner": null,
"transactioninvoiceid": null,
"customerid": "806"
}
}'
#Response:
{
"response": {
"result": {
"invoice": {
"accountid": "LJArJ4",
"accounting_systemid": "LJArJ4",
"address": "",
"amount": {
"amount": "310.00",
"code": "CAD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "Canada",
"create_date": "2021-07-05",
"created_at": "2021-07-05 08:10:53",
"currency_code": "CAD",
"current_organization": "First1 Last1",
"customerid": 806,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "Jul 5, 2021 - Paid social media campaign",
"discount_description": null,
"discount_total": {
"amount": "0.00",
"code": "CAD"
},
"discount_value": "0",
"display_status": "draft",
"dispute_status": null,
"due_date": "2021-07-05",
"due_offset_days": 0,
"estimateid": 0,
"ext_archive": 0,
"fname": "First1",
"fulfillment_date": null,
"generation_date": null,
"gmail": false,
"id": 321,
"invoice_number": "0000005",
"invoiceid": 321,
"language": "en",
"last_order_status": null,
"lname": "Last1",
"net_paid_amount": {
"amount": "0.00",
"code": "CAD"
},
"notes": "Unbilled Expenses added",
"organization": "First1 Last1",
"outstanding": {
"amount": "310.00",
"code": "CAD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "CAD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": false,
"status": 1,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "Please pay the invoice within 30 days",
"updated": "2021-07-05 08:10:53",
"uuid": "c5122940-f746-45eb-a75d-d18fb031f884",
"v3_status": "draft",
"vat_name": null,
"vat_number": "",
"version": "2021-07-05 08:10:53.604805",
"vis_state": 0
}
}
}
}
Create Invoice With Discount Value
curl -L -X POST 'https://api.freshbooks.com/accounting/account/<accountId>/invoices/invoices' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <insert-bearer-token>' \
--data-raw '{
"invoice": {
"allowed_gateway_name": null,
"deposit_percentage": null,
"due_offset_days": 0,
"estimateid": null,
"highlight_string": null,
"sender_name": null,
"invoiceid": null,
"invoice_client_id": null,
"language": "en",
"last_order_status": null,
"city": "",
"country": "Canada",
"create_date": "2021-07-05",
"currency_code": "CAD",
"discount_value": 5,
"fname": "First1",
"lname": "Last1",
"notes": "Added a 5% discount for your continued support",
"organization": "First1 Last1",
"code": "",
"po_number": null,
"province": "",
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "Please pay the invoice within 30 days",
"payment_details": null,
"vat_name": null,
"vat_number": "",
"allowed_gateway_info": null,
"attachments": [],
"contacts": [
{
"contactid": "-1"
}
],
"direct_links": [],
"async_invoice_profile": null,
"late_fee": {
"compounded_taxes": false,
"days": 30,
"enabled": false,
"first_tax_name": null,
"first_tax_percent": 0,
"repeat": false,
"second_tax_name": null,
"second_tax_percent": 0,
"type": "percent",
"calculation_type": "total",
"value": 10
},
"late_reminders": [],
"lines": [
{
"modern_project_id": null,
"retainer_id": null,
"retainer_period_id": null,
"amount": {
"amount": "100",
"code": "CAD"
},
"description": "",
"expenseid": null,
"taxName1": "GST",
"taxAmount1": 10,
"name": "Item1",
"qty": 1,
"taxName2": null,
"taxAmount2": null,
"compounded_tax": false,
"type": null,
"unit_cost": {
"amount": "100",
"code": "CAD"
},
"invoiceid": null
},
{
"modern_project_id": null,
"retainer_id": null,
"retainer_period_id": null,
"amount": {
"amount": "0",
"code": "CAD"
},
"description": "",
"expenseid": null,
"taxName1": "",
"taxAmount1": 0,
"name": "",
"qty": 1,
"taxName2": "",
"taxAmount2": 0,
"compounded_tax": false,
"type": null,
"unit_cost": {
"amount": "0",
"code": "CAD"
},
"invoiceid": null
}
],
"customerid": "806"
}
}'
#Response:
{
"response": {
"result": {
"invoice": {
"accountid": "LJArJ4",
"accounting_systemid": "LJArJ4",
"address": "",
"amount": {
"amount": "104.50",
"code": "CAD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "Canada",
"create_date": "2021-07-05",
"created_at": "2021-07-05 08:18:37",
"currency_code": "CAD",
"current_organization": "First1 Last1",
"customerid": 806,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "",
"discount_description": null,
"discount_total": {
"amount": "-5.00",
"code": "CAD"
},
"discount_value": "5",
"display_status": "draft",
"dispute_status": null,
"due_date": "2021-07-05",
"due_offset_days": 0,
"estimateid": 0,
"ext_archive": 0,
"fname": "First1",
"fulfillment_date": null,
"generation_date": null,
"gmail": false,
"id": 325,
"invoice_number": "0000008",
"invoiceid": 325,
"language": "en",
"last_order_status": null,
"lname": "Last1",
"net_paid_amount": {
"amount": "0.00",
"code": "CAD"
},
"notes": "Added a 5% discount for your continued support",
"organization": "First1 Last1",
"outstanding": {
"amount": "104.50",
"code": "CAD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "CAD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": false,
"status": 1,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "Please pay the invoice within 30 days",
"updated": "2021-07-05 08:18:37",
"uuid": "cef2ca31-1139-4495-855e-e3c7f500c970",
"v3_status": "draft",
"vat_name": null,
"vat_number": "",
"version": "2021-07-05 08:18:37.418744",
"vis_state": 0
}
}
}
}
Update Invoice
curl -L -X PUT 'https://api.freshbooks.com/accounting/account/<accountId>/invoices/invoices/<invoiceId>' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <insert-bearer-token>' \
--data-raw '{
"invoice": {
"due_offset_days": 20
}
}'
#Response:
{
"response": {
"result": {
"invoice": {
"accountid": "LJArJ4",
"accounting_systemid": "LJArJ4",
"address": "",
"amount": {
"amount": "104.50",
"code": "CAD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "Canada",
"create_date": "2021-07-05",
"created_at": "2021-07-05 08:18:37",
"currency_code": "CAD",
"current_organization": "First1 Last1",
"customerid": 806,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "",
"discount_description": null,
"discount_total": {
"amount": "-5.00",
"code": "CAD"
},
"discount_value": "5",
"display_status": "sent",
"dispute_status": null,
"due_date": "2021-07-25",
"due_offset_days": 20,
"estimateid": 0,
"ext_archive": 0,
"fname": "First1",
"fulfillment_date": "2021-07-05",
"generation_date": null,
"gmail": false,
"id": 325,
"invoice_number": "0000008",
"invoiceid": 325,
"language": "en",
"last_order_status": null,
"lname": "Last1",
"net_paid_amount": {
"amount": "0.00",
"code": "CAD"
},
"notes": "Added a 5% discount for your continued support",
"organization": "First1 Last1",
"outstanding": {
"amount": "104.50",
"code": "CAD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "CAD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": false,
"status": 2,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "Please pay the invoice within 30 days",
"updated": "2021-07-05 08:22:13",
"uuid": "cef2ca31-1139-4495-855e-e3c7f500c970",
"v3_status": "sent",
"vat_name": null,
"vat_number": "",
"version": "2021-07-05 08:22:13.174445",
"vis_state": 0
}
}
}
}
Mark Invoice As Sent
curl -L -X PUT 'https://api.freshbooks.com/accounting/account/<accountId>/invoices/invoices/<invoiceId>' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <insert-bearer-token>' \
--data-raw '{
"invoice": {
"action_mark_as_sent": true
}
}'
#Response:
{
"response": {
"result": {
"invoice": {
"accountid": "LJArJ4",
"accounting_systemid": "LJArJ4",
"address": "",
"amount": {
"amount": "104.50",
"code": "CAD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "Canada",
"create_date": "2021-07-05",
"created_at": "2021-07-05 08:18:37",
"currency_code": "CAD",
"current_organization": "First1 Last1",
"customerid": 806,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "",
"discount_description": null,
"discount_total": {
"amount": "-5.00",
"code": "CAD"
},
"discount_value": "5",
"display_status": "sent",
"dispute_status": null,
"due_date": "2021-07-25",
"due_offset_days": 20,
"estimateid": 0,
"ext_archive": 0,
"fname": "First1",
"fulfillment_date": "2021-07-05",
"generation_date": null,
"gmail": false,
"id": 325,
"invoice_number": "0000008",
"invoiceid": 325,
"language": "en",
"last_order_status": null,
"lname": "Last1",
"net_paid_amount": {
"amount": "0.00",
"code": "CAD"
},
"notes": "Added a 5% discount for your continued support",
"organization": "First1 Last1",
"outstanding": {
"amount": "104.50",
"code": "CAD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "CAD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": false,
"status": 2,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "Please pay the invoice within 30 days",
"updated": "2021-07-05 08:22:13",
"uuid": "cef2ca31-1139-4495-855e-e3c7f500c970",
"v3_status": "sent",
"vat_name": null,
"vat_number": "",
"version": "2021-07-05 08:22:13.174445",
"vis_state": 2
}
}
}
}
Send Invoice By Email
curl -L -X PUT 'https://api.freshbooks.com/accounting/account/<accountId>/invoices/invoices/<invoiceId>' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <insert-bearer-token>' \
--data-raw '{
"invoice": {
"action_email": true
"email_recipients": ["dtherockjohnson@freshbooks.com", "beilish@freshbooks.com"],
"email_include_pdf": false,
"invoice_customized_email": {
"subject": "Thanks for being a customer",
"body": "This can be any personal message",
}
}
}'
#Response:
{
"response": {
"result": {
"invoice": {
"accountid": "LJArJ4",
"accounting_systemid": "LJArJ4",
"address": "",
"amount": {
"amount": "104.50",
"code": "CAD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "Canada",
"create_date": "2021-07-05",
"created_at": "2021-07-05 08:18:37",
"currency_code": "CAD",
"current_organization": "First1 Last1",
"customerid": 806,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "",
"discount_description": null,
"discount_total": {
"amount": "-5.00",
"code": "CAD"
},
"discount_value": "5",
"display_status": "sent",
"dispute_status": null,
"due_date": "2021-07-25",
"due_offset_days": 20,
"estimateid": 0,
"ext_archive": 0,
"fname": "First1",
"fulfillment_date": "2021-07-05",
"generation_date": null,
"gmail": false,
"id": 325,
"invoice_number": "0000008",
"invoiceid": 325,
"language": "en",
"last_order_status": null,
"lname": "Last1",
"net_paid_amount": {
"amount": "0.00",
"code": "CAD"
},
"notes": "Added a 5% discount for your continued support",
"organization": "First1 Last1",
"outstanding": {
"amount": "104.50",
"code": "CAD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "CAD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": false,
"status": 2,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "Please pay the invoice within 30 days",
"updated": "2021-07-05 08:22:13",
"uuid": "cef2ca31-1139-4495-855e-e3c7f500c970",
"v3_status": "sent",
"vat_name": null,
"vat_number": "",
"version": "2021-07-05 08:22:13.174445",
"vis_state": 2
}
}
}
}
Delete Invoice
curl -L -X PUT 'https://api.freshbooks.com/accounting/account/<accountId>/invoices/invoices/<invoiceId>' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <insert-bearer-token>' \
--data-raw '{
"invoice": {
"vis_state": 1
}
}'
#Response:
{
"response": {
"result": {
"invoice": {
"accountid": "LJArJ4",
"accounting_systemid": "LJArJ4",
"address": "",
"amount": {
"amount": "104.50",
"code": "CAD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "Canada",
"create_date": "2021-07-05",
"created_at": "2021-07-05 08:18:37",
"currency_code": "CAD",
"current_organization": "First1 Last1",
"customerid": 806,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "",
"discount_description": null,
"discount_total": {
"amount": "-5.00",
"code": "CAD"
},
"discount_value": "5",
"display_status": "sent",
"dispute_status": null,
"due_date": "2021-07-25",
"due_offset_days": 20,
"estimateid": 0,
"ext_archive": 0,
"fname": "First1",
"fulfillment_date": "2021-07-05",
"generation_date": null,
"gmail": false,
"id": 325,
"invoice_number": "0000008",
"invoiceid": 325,
"language": "en",
"last_order_status": null,
"lname": "Last1",
"net_paid_amount": {
"amount": "0.00",
"code": "CAD"
},
"notes": "Added a 5% discount for your continued support",
"organization": "First1 Last1",
"outstanding": {
"amount": "104.50",
"code": "CAD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "CAD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": false,
"status": 2,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "Please pay the invoice within 30 days",
"updated": "2021-07-05 08:25:16",
"uuid": "cef2ca31-1139-4495-855e-e3c7f500c970",
"v3_status": "sent",
"vat_name": null,
"vat_number": "",
"version": "2021-07-05 08:25:16.973795",
"vis_state": 1
}
}
}
}
List Invoices
Request: GET
api.freshbooks.com/accounting/account/<accountid>/invoices/invoices
url = "api.freshbooks.com/accounting/account/<accountid>/invoices/invoices"
headers = {'Authorization': 'Bearer <bearer token>', 'Api-Version': 'alpha', 'Content-Type': 'application/json'}
res = requests.get(url, data=None, headers=headers)
jsonData = res.json()
Response:
{
"response": {
"result": {
"invoices": [
{
// same format as single invoice
},
{
// same format as single invoice
},
{
// same format as single invoice
}
}
],
"per_page": 15,
"total": 2,
"page": 1,
"pages": 1
}
}
}
Get Single Invoice
Request: GET
api.freshbooks.com/accounting/account/<accountid> /invoices/invoices/<invoiceid>
url = "https://api.freshbooks.com/accounting/account/<accountid>
/invoices/invoices/<invoiceid>"
headers = {'Authorization': 'Bearer <bearer token>', 'Api-Version': 'alpha', 'Content-Type': 'application/json'}
res = requests.get(url, data=None, headers=headers)
jsonData = res.json()
// jsonData Response should be:
{
"response": {
"result": {
"invoice": {
"status": 2,
"deposit_percentage": null,
"create_date": "2016-09-09",
"outstanding": {
"amount": "800.00",
"code": "USD"
},
"payment_status": "unpaid",
"code": "",
"ownerid": 1,
"vat_number": "",
"id": 2201278,
"gmail": false,
"vat_name": "",
"v3_status": "sent",
"parent": 0,
"country": "United States",
"dispute_status": null,
"lname": "Client",
"deposit_status": "none",
"estimateid": 0,
"ext_archive": 0,
"template": "clean-grouped",
"basecampid": 0,
"generation_date": null,
"show_attachments": true,
"vis_state": 0,
"current_organization": "Test Client",
"province": "",
"due_date": "2016-10-09",
"updated": "2016-09-09 16:04:42",
"terms": null,
"description": "",
"discount_description": null,
"last_order_status": null,
"street2": "",
"deposit_amount": null,
"paid": {
"amount": "0.00",
"code": "USD"
},
"invoiceid": 2201278,
"discount_total": {
"amount": "0.00",
"code": "USD"
},
"address": "",
"invoice_number": "0000003",
"customerid": 2185379,
"discount_value": "0",
"accounting_systemid": "KAG77",
"organization": "Test Client",
"due_offset_days": 30,
"language": "en",
"po_number": null,
"display_status": "sent",
"notes": "",
"date_paid": null,
"amount": {
"amount": "800.00",
"code": "USD"
},
"street": "",
"city": "",
"currency_code": "USD",
"sentid": 1,
"autobill_status": null,
"return_uri": null,
"fname": "Test",
"created_at": "2016-09-09 14:37:59",
"auto_bill": false,
"accountid": "KAG77"
}
}
}
}
Create Invoice
Request: POST
"https://api.freshbooks.com/accounting/account/<accountid> /invoices/invoices"
url = "https://api.freshbooks.com/accounting/account/<accountid>
/invoices/invoices"
headers = {'Authorization': 'Bearer <bearer token>', 'Api-Version': 'alpha', 'Content-Type': 'application/json'}
payload = {'invoice': {'email': "test@example.com", 'customerid': 1831231, 'create_date': "2017-06-06"}}
res = requests.post(url, data=json.dumps(payload), headers=headers)
Response:
{
"response": {
"result": {
"invoice": {
"status": 2,
"deposit_percentage": null,
"create_date": "2016-09-09",
"outstanding": {
"amount": "800.00",
"code": "USD"
},
"payment_status": "unpaid",
"code": "",
"ownerid": 1,
"vat_number": "",
"id": 2201278,
"gmail": false,
"vat_name": "",
"v3_status": "sent",
"parent": 0,
"country": "United States",
"dispute_status": null,
"lname": "Client",
"deposit_status": "none",
"estimateid": 0,
"ext_archive": 0,
"template": "clean-grouped",
"basecampid": 0,
"generation_date": null,
"show_attachments": true,
"vis_state": 0,
"current_organization": "Test Client",
"province": "",
"due_date": "2016-10-09",
"updated": "2016-09-09 16:04:42",
"terms": null,
"description": "",
"discount_description": null,
"last_order_status": null,
"street2": "",
"deposit_amount": null,
"paid": {
"amount": "0.00",
"code": "USD"
},
"invoiceid": 2201278,
"discount_total": {
"amount": "0.00",
"code": "USD"
},
"address": "",
"invoice_number": "0000003",
"customerid": 2185379,
"discount_value": "0",
"accounting_systemid": "KAG77",
"organization": "Test Client",
"due_offset_days": 30,
"language": "en",
"po_number": null,
"display_status": "sent",
"notes": "",
"date_paid": null,
"amount": {
"amount": "800.00",
"code": "USD"
},
"street": "",
"city": "",
"currency_code": "USD",
"sentid": 1,
"autobill_status": null,
"return_uri": null,
"fname": "Test",
"created_at": "2016-09-09 14:37:59",
"auto_bill": false,
"accountid": "KAG77"
}
}
}
}
Create Invoice With An Unbilled Expense
Request: POST
https://api.freshbooks.com/accounting/account/<accountid>/invoices/invoices
url = "https://api.freshbooks.com/accounting/account/<accountid>/
invoices/invoices"
payload = {'invoice': {
'email': "test@example.com",
'customerid': 338441,
'create_date': "2016-04-04",
'lines': [
{
'type': 0,
'description': "",
'taxName1': "",
'taxAmount1': 0,
'name': "paperwork",
'qty': 1,
'taxName2': "",
'taxAmount2': 0,
'unit_cost':{
'amount': "5000.00",
'code': "USD"
}
},
{
'type': 1,
'description': "",
'expenseid': 1918390
'taxName1': "",
'taxAmount1': 0,
'name': "TV Ads",
'qty': 1,
'taxName2': "",
'taxAmount2': 0,
'unit_cost':{
'amount': "3000.00",
'code': "USD"
}
}
]
}
}
headers = {'Authorization': 'Bearer <bearer token>', 'Api-Version': 'alpha', 'Content-Type': 'application/json'}
res.requests.post(url, data=json.dumps(payload), headers=headers)
Response:
{
"response": {
"result": {
"invoice": {
"status": 1,
"deposit_percentage": null,
"create_date": "2016-04-04",
"outstanding": {
"amount": "8000.00",
"code": "USD"
},
"payment_status": "unpaid",
"code": "2011",
"ownerid": 1,
"vat_number": "",
"id": 2168250,
"gmail": false,
"vat_name": "",
"v3_status": "draft",
"parent": 0,
"country": "Australia",
"dispute_status": null,
"lname": "Gates",
"deposit_status": "none",
"estimateid": 0,
"ext_archive": 0,
"template": "clean-grouped",
"basecampid": 0,
"generation_date": null,
"show_attachments": true,
"vis_state": 0,
"current_organization": "Microsoft",
"province": "NSW",
"due_date": "2016-04-04",
"updated": "2016-09-01 16:16:15",
"terms": "",
"description": "",
"discount_description": null,
"last_order_status": null,
"street2": "",
"deposit_amount": null,
"paid": {
"amount": "0.00",
"code": "USD"
},
"invoiceid": 2168250,
"discount_total": {
"amount": "0.00",
"code": "USD"
},
"address": "",
"invoice_number": "0000007",
"customerid": 338441,
"discount_value": "0",
"accounting_systemid": "zDmNq",
"organization": "Microsoft",
"due_offset_days": 30,
"language": "en",
"po_number": null,
"display_status": "draft",
"notes": "",
"date_paid": null,
"amount": {
"amount": "8000.00",
"code": "USD"
},
"street": "12 Pacific Highway",
"city": "North Sydney",
"currency_code": "USD",
"sentid": 1,
"autobill_status": null,
"return_uri": null,
"fname": "Wyatt",
"created_at": "2016-09-01 16:16:14",
"auto_bill": false,
"accountid": "zDmNq"
}
}
}
}
Create Invoice With Discount Value
Request: POST
https://api.freshbooks.com/accounting/account/<accountid> /invoices/invoices”
url = "https://api.freshbooks.com/accounting/account/<accountid>
/invoices/invoices"
headers = {'Authorization': 'Bearer <bearer token>', 'Api-Version': 'alpha', 'Content-Type': 'application/json'}
payload = {
"invoice": {
"status": "2",
"invoice_number": "IV-1160",
"customerid": "167034",
"create_date": "2019-01-01",
"due_offset_days": "30",
"discount_value": 10,
"lines": [
{
"type": "0",
"name": "Consulting",
"description": "K. Graves - IT Support",
"qty": "3",
"taxName1": "CGST",
"taxAmount1": "7.5",
"taxName2": "SGST",
"taxAmount2": "7.5",
"unit_cost": {
"amount": "140"
}
}
]
}
}
res = requests.post(url, data=json.dumps(payload), headers=headers)
Response:
{
"response": {
"result": {
"invoice": {
"accountid": "85Zwnk",
"accounting_systemid": "85Zwnk",
"address": "",
"amount": {
"amount": "434.70",
"code": "CAD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "",
"create_date": "2019-01-01",
"created_at": "2019-09-20 11:17:13",
"currency_code": "CAD",
"current_organization": "K A",
"customerid": 167034,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "K. Graves - IT Support",
"discount_description": null,
"discount_total": {
"amount": "-42.00",
"code": "CAD"
},
"discount_value": "10",
"display_status": "sent",
"dispute_status": null,
"due_date": "2019-01-31",
"due_offset_days": 30,
"estimateid": 0,
"ext_archive": 0,
"fname": "K",
"fulfillment_date": "2019-01-01",
"generation_date": null,
"gmail": false,
"id": 101126,
"invoice_number": "IV-1160",
"invoiceid": 101126,
"language": "en",
"last_order_status": null,
"lname": "A",
"notes": "",
"organization": "K A",
"outstanding": {
"amount": "434.70",
"code": "CAD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "CAD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": true,
"status": 2,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "",
"updated": "2019-09-20 11:17:13",
"v3_status": "overdue",
"vat_name": "",
"vat_number": "",
"vis_state": 0
}
}
}
}
Update Invoice
Request: PUT api.freshbooks.com/accounting/account/<accountid>/invoices/invoices/<id>
url = "api.freshbooks.com/accounting/account/<accountid>/invoices/invoices/<id>"
headers = {'Authorization': 'Bearer <bearer token>', 'Api-Version': 'alpha', 'Content-Type': 'application/json'}
payload = {'invoice': {
'customerid': 1831231,
'create_date': "2017-06-06"
}
}
res = requests.put(url, data=json.dumps(payload), headers=headers)
Response:
{
"response": {
"result": {
"invoice": {
"status": 1,
"deposit_percentage": null,
"create_date": "2016-04-04",
"outstanding": {
"amount": "8000.00",
"code": "USD"
},
"payment_status": "unpaid",
"code": "2011",
"ownerid": 1,
"vat_number": "",
"id": 2168250,
"gmail": false,
"vat_name": "",
"v3_status": "draft",
"parent": 0,
"country": "Australia",
"dispute_status": null,
"lname": "Gates",
"deposit_status": "none",
"estimateid": 0,
"ext_archive": 0,
"template": "clean-grouped",
"basecampid": 0,
"generation_date": null,
"show_attachments": true,
"vis_state": 0,
"current_organization": "Microsoft",
"province": "NSW",
"due_date": "2016-04-04",
"updated": "2016-09-01 16:16:15",
"terms": "",
"description": "",
"discount_description": null,
"last_order_status": null,
"street2": "",
"deposit_amount": null,
"paid": {
"amount": "0.00",
"code": "USD"
},
"invoiceid": 2168250,
"discount_total": {
"amount": "0.00",
"code": "USD"
},
"address": "",
"invoice_number": "0000007",
"customerid": 1831231,
"discount_value": "0",
"accounting_systemid": "zDmNq",
"organization": "Microsoft",
"due_offset_days": 30,
"language": "en",
"po_number": null,
"display_status": "draft",
"notes": "",
"date_paid": null,
"amount": {
"amount": "8000.00",
"code": "USD"
},
"street": "12 Pacific Highway",
"city": "North Sydney",
"currency_code": "USD",
"sentid": 1,
"autobill_status": null,
"return_uri": null,
"fname": "Wyatt",
"created_at": "2016-09-01 16:16:14",
"auto_bill": false,
"accountid": "zDmNq"
}
}
}
}
Send Invoice By Email
Request: PUT
"https://api.freshbooks.com/accounting/account/<accountid> /invoices/invoices/<invoiceid>"
url = "https://api.freshbooks.com/accounting/account/<accountid>
/invoices/invoices/<invoiceid>"
headers = {'Authorization': 'Bearer <bearer token>', 'Api-Version': 'alpha', 'Content-Type': 'application/json'}
payload = {
"invoice": {
"email_subject": "Thanks for being a customer",
"email_recipients": ["dtherockjohnson@freshbooks.com", "beilish@freshbooks.com"],
"email_body": "This can be any personal message",
"action_email": True,
"email_include_pdf": False
}
}
}
res = requests.post(url, data=json.dumps(payload), headers=headers)
Response:
{
"response": {
"result": {
"invoice": {
"accountid": "85Zwnk",
"accounting_systemid": "85Zwnk",
"address": "",
"amount": {
"amount": "434.70",
"code": "CAD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "",
"create_date": "2019-01-01",
"created_at": "2019-09-20 11:17:13",
"currency_code": "CAD",
"current_organization": "K A",
"customerid": 167034,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "K. Graves - IT Support",
"discount_description": null,
"discount_total": {
"amount": "-42.00",
"code": "CAD"
},
"discount_value": "10",
"display_status": "sent",
"dispute_status": null,
"due_date": "2019-01-31",
"due_offset_days": 30,
"estimateid": 0,
"ext_archive": 0,
"fname": "Dwayne",
"fulfillment_date": "2019-01-01",
"generation_date": null,
"gmail": false,
"id": 101126,
"invoice_number": "IV-1160",
"invoiceid": 101126,
"language": "en",
"last_order_status": null,
"lname": "Johnson",
"notes": "",
"organization": "WWE",
"outstanding": {
"amount": "434.70",
"code": "CAD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "CAD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": true,
"status": 2,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "",
"updated": "2019-09-20 11:17:13",
"v3_status": "overdue",
"vat_name": "",
"vat_number": "",
"vis_state": 2
}
}
}
}
Mark Invoice As Sent
Request: PUT
"https://api.freshbooks.com/accounting/account/<accountid> /invoices/invoices/<invoiceid>"
url = "https://api.freshbooks.com/accounting/account/<accountid>
/invoices/invoices/<invoiceid>"
headers = {'Authorization': 'Bearer <bearer token>', 'Api-Version': 'alpha', 'Content-Type': 'application/json'}
payload = {
"invoice": {
"action_mark_as_sent": True
}
}
}
res = requests.post(url, data=json.dumps(payload), headers=headers)
Response:
{
"response": {
"result": {
"invoice": {
"accountid": "85Zwnk",
"accounting_systemid": "85Zwnk",
"address": "",
"amount": {
"amount": "434.70",
"code": "CAD"
},
"auto_bill": false,
"autobill_status": null,
"basecampid": 0,
"city": "",
"code": "",
"country": "",
"create_date": "2019-01-01",
"created_at": "2019-09-20 11:17:13",
"currency_code": "CAD",
"current_organization": "K A",
"customerid": 167034,
"date_paid": null,
"deposit_amount": null,
"deposit_percentage": null,
"deposit_status": "none",
"description": "K. Graves - IT Support",
"discount_description": null,
"discount_total": {
"amount": "-42.00",
"code": "CAD"
},
"discount_value": "10",
"display_status": "sent",
"dispute_status": null,
"due_date": "2019-01-31",
"due_offset_days": 30,
"estimateid": 0,
"ext_archive": 0,
"fname": "Dwayne",
"fulfillment_date": "2019-01-01",
"generation_date": null,
"gmail": false,
"id": 101126,
"invoice_number": "IV-1160",
"invoiceid": 101126,
"language": "en",
"last_order_status": null,
"lname": "Johnson",
"notes": "",
"organization": "WWE",
"outstanding": {
"amount": "434.70",
"code": "CAD"
},
"ownerid": 1,
"paid": {
"amount": "0.00",
"code": "CAD"
},
"parent": 0,
"payment_details": "",
"payment_status": "unpaid",
"po_number": null,
"province": "",
"return_uri": null,
"sentid": 1,
"show_attachments": true,
"status": 2,
"street": "",
"street2": "",
"template": "clean-grouped",
"terms": "",
"updated": "2019-09-20 11:17:13",
"v3_status": "overdue",
"vat_name": "",
"vat_number": "",
"vis_state": 2
}
}
}
}
Delete Invoice
Request: PUT
api.freshbooks.com/accounting/account/<accountid>/invoices/invoices/<id>
url = "api.freshbooks.com/accounting/account/<accountid>/invoices/invoices/<id>"
headers = {'Authorization': 'Bearer <bearer token>', 'Api-Version': 'alpha', 'Content-Type': 'application/json'}
payload = {'invoice': {
'vis_state': 1
}
}
res = reqests.put(url, data=json.dumps(payload), headers=headers)
Response:
{
"response": {}
}