× FreshBooks App Logo
FreshBooks
Official App
Free - Google Play
Get it
You're currently on our US site. Select your regional site here:

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

AccessRequires Authorization
Scopesuser: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

CodeStatusDescription
0DisputedAn 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
1DraftAn Invoice that has been created, but not yet sent.
2SentAn Invoice that has been sent to a Client or marked as sent.
3ViewedAn Invoice that has been viewed by a Client.
4PaidA fully paid Invoice.
5Auto PaidAn Invoice paid automatically with a saved credit card.
6RetryAn 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.
7FailedAn Invoice that was in Retry status which again encountered a processing issue when being retried.
8PartialAn Invoice that has been partially paid.

v3 Statuses

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

ValueDescription
createdInvoice is created and in no other state
draftInvoice is saved in draft status
sentInvoice has been sent
viewedInvoice has been viewed by receipient
failedan autobill related to the invoice has been tried more than once and failed
retryan autobill related to the invoice has been tried once and failed, and will be retried
successan autobill related to the invoice has succeeded
autopaida payment has been tied to the invoice automatically via autobill
paidpayments related to the invoice have succeeded and the object is fully paid
partialsome payment related to the invoice has succeeded but the invoice is not yet paid off
disputedthe invoice is disputed
resolvedthe invoice was disputed and the dispute has been marked as resolved
overduethe invoice required an action at an earlier date that was not met
deposit-partialthe invoice has a related deposit which has been partially paid
deposit-paidthe invoice has a related deposit which has been fully paid
declinedthe invoice has a related order which has been declined
pendingthe invoice has a related order which is pending

Includes

Include NameDescription
audit_logsShow invoice view/send/payment history
client_auditsShow the client-visible invoice history
commentsComments made on invoice
contactsList of client contacts
linesInvoice lines
ownerOwner info
latest_journal_entryJournal entry info
allowed_gatewaysList of allowed gateways
late_feeLate fee info
presentationPresentation type
project_total_amountsTotal amounts billed from projects
late_remindersLate reminders
systemInvoice-owner’s system

Filters

Filter TypeNameFieldDescription
Equalsinvoiceidinvoiceidmatches exact invoiceid
Ininvoiceidsinvoiceidmatches list of invoiceids, one per query argument specified
Likeinvoice _number _likeinvoice _numberinvoice number containing parameter
Equalsinvoice _numberinvoice _numberMatches exact invoice number
LikenotesnotesMatches on notes containing the parameter
StatusEq FilterstatusidspecialMatches exact invoice status
StatusIn Filterstatusidsspecialmatches list of invoice statuses, one per query argument specified
V3StatusEq Filterv3_statusspecialmatches exact v3_status
Equalscurrency _codecurrency _codematches exact currency code
Equalscurrencycurrency _codealternative to currency_code filter
Betweendate_mincreate_datedate greater than or equal to parameter, YYYY-MM-DD format
Betweendate_maxcreate_datedate less than parameter, YYYY-MM-DD format
Betweentotal_minamountamount greater than or equal to parameter
Betweentotal_maxamountamount less than parameter
Likepo_numberpo_numberpo_number containing parameter
Equalscustomeridcustomeridmatches exact customerid
Incustomeridscustomeridmatches list of customerids, one per query argument specified
Equalsparentidparentmatches exact parentid
PaidFilterpaidspecialtrue/false returns paid invoices or unpaid invoices
Outstanding Filteroutstandingspecialtrue/false returns outstanding or not outstanding invoices
Betweenupdated_minupdatedupdated date greater than or equal to parameter, YYYY-MM-DD format
Betweenupdated_maxupdatedupdated date less than parameter, YYYY-MM-DD format
ItemName Filteritem_namenameitem name containing the parameter
ItemDescriptionFilteritem _descriptiondescriptionitem description containing the parameter
EqualsprojectidspecialDeprecated. Matches exact FreshBooks Classic projectid
Equalsmodern_projectidline.modern_projectidMatches on modern_projectid in invoice line items
Outstanding AmountFilteroutstanding _minspecialmatches invoices with an outstanding amount greater than input

Field Descriptions

underlined fields are required on creation

Computed Fields (read only)
FieldTypeDescription
invoiceidintunique-to-this-system invoice id
idintunique-to-this-system invoice id, duplicate of invoiceid
accounting_systemidstringunique id for system
accountidstringunique id for system, repeat of accounting_systemid
amountobject

total amount of invoice.

subfields: amount, code

   – amountstringtotal amount of invoice, to two decimal places
   – codestringthree-letter currency code
paidobjectsubfields: amount and code
   – amountstringamount paid on invoice, to two decimal places
   – codestringthree-letter currency code
outstandingobjectsubfields: amount, code
   – amountstringamount outstanding on invoice, to two decimal places
   – codestringthree-letter currency code
discount_totalobjectsubfields: amount and code
   – amountstringamount of discount, to two decimal places
   – codestringthree-letter currency code
created_atdatetimeTime the invoice was created, YYYY-MM-DD HH:MM:SS format
current_organizationstringName of organization being invoiced — denormalized from client
date_paiddatedate invoice was fully paid, YYYY-MM-DD format
descriptionstringdescription of first line of invoice
due_datedatedate 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.
updateddatetimetime invoice last updated at, YYYY-MM-DD HH:MM:SS format
Writable on Create
FieldTypeDescription
owneridintid of creator of invoice. 1 if business admin, other if created by e.g. a contractor
estimateidintid of associated estimate, 0 if none
sentidintuserid of user who sent the invoice, typically 1 for admin
statusstringSee Invoice Status table.
parentintid of object this invoice was generated from, 0 if none
display_statusstringDescription of status shown in FreshBooks UI, one of ‘draft’, ‘created’, ‘sent’, ‘viewed’, or ‘outstanding’.
autobill_statusstringone of retry, failed, or success
payment_statusstringdescription 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_statusstringdescribes status of last attempted payment
dispute_statusstringdescription of whether invoice has been disputed.
deposit_statusstringdescription of deposits applied to invoice. One of ‘paid’, ‘unpaid’, ‘partial’, ‘none’, and ‘converted’.
auto_billbooleanwhether this invoice has a credit card saved
v3_statusstringdescription of Invoice Status, see V3 Status Table.
Data Fields (writable)
FieldTypeDescription
invoice_numberstringuser-specified and visible invoice id
customeridintunique-to-this-system client-id
create_datestringdate invoice was created, YYYY-MM-DD (string) format
generation_datedatedate invoice generated from object, null if it wasn’t, YYYY-MM-DD (string) if it was
discount_valuedecimalpercent amount being discounted from the subtotal, decimal-string amount ranging from 0 to 100
discount _descriptionstringpublic note about discount
po_numberstringReference number for address on invoice.
templatestring(internal, deprecated) choice of rendering style
currency_codestringthree-letter currency code for invoice
languagestringtwo-letter language code, e.g. “en”
termsstringterms listed on invoice
notesstringNotes listed on invoice
addressstringFirst line of address on invoice
return_uristring(deprecated)
deposit_amountobjectamount required as deposit, null if none
deposit _percentagestringpercent of the invoice’s value required as a deposit
gmailbooleanwhether to send via ground mail
show_attachmentsbooleanwhether attachments on invoice are rendered
ext_archiveint(deprecated) 0 or 1 indicating archived or not
vis_stateint“visibility state”. 0 for active, 1 for deleted, 2 for archived
streetstringstreet for address on invoice
street2stringsecond line of street for address on invoice.
citystringcity for address on invoice
provincestringProvince for address on invoice.
codestringzip code for address on invoice
countrystringCountry for address on invoice
organizationstringName of organization being invoiced.
fnamestringFirst name of Client on invoice
lnamestringLast name of client being invoiced
vat_namestringValue Added Tax name if provided
vat_numberstringValue Added Tax number if provided
due_offset_daysintNumber of days from creation that invoice is due. If not set, the due date will default to the date of issue.
linesarrayLines of the invoice
presentationobjectwhere 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)
FieldTypeDescription
lineidintunique-to-this-invoice line id
amountobjectamount total of an invoice line, calculated with unit cost, quantity and tax. subfields: amount and code
amountstringamount of invoice line item account, to two decimal places
codestringthree-letter currency code
updateddatetimetime invoice line last updated at, YYYY-MM-DD HH:MM:SS format
Data Fields (writable)
FieldTypeDescription
typeintinvoice line type, 0 for normal invoice line, 1 for rebilling expense line
expenseid(optional) intid of unbilled expense, required when invoice line type is 1, otherwise should be excluded
qtydecimalquantity of the invoice line unit, multiplied against unit_cost
unit_costobjectunit cost of the line item. subfields: amount and code
– amountstringunit cost amount, to two decimal places
– codestringthree-letter currency code
descriptionstringdescription for the invoice line item
namestringname for the invoice line item
modern_project_idintProject_id if this line originated from a project (time tracking, project expense, etc.)
modern_time_entriesarray<int>List of time_entry_ids for any time entries this line item bills for
taxName1stringname for the first tax on the invoice line
taxAmount1decimalfirst tax amount, in percentage, up to 3 decimal places
taxName2stringname for the second tax on the invoice line
taxAmount2decimalsecond 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&gt"
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": {}
}