Create Invoice with Expense
POST https://api.freshbooks.com/accounting/account/{{accountId}}/invoices/invoices
Creating invoice with expense.
First you will need to create an expense. Once that is created, save the expenseId and add it to the invoice.
When adding an expense, make sure you add to the markup_percent
parameter the amount you want to markup by and set cogs
to true
if it is an item you have paid for.
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |
RESPONSES
status: OK
{"response":{"result":{"invoice":{"accountid":"wkMd2g","accounting_systemid":"wkMd2g","address":"","amount":{"amount":"8000.00","code":"USD"},"auto_bill":false,"autobill_status":null,"basecampid":0,"city":"Toronto","code":"M6P 3T1","country":"","create_date":"2019-04-20","created_at":"2019-05-09 13:58:07","currency_code":"USD","current_organization":"Space Is Only Noise","customerid":92402,"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":"2019-04-20","due_offset_days":0,"estimateid":0,"ext_archive":0,"fname":"Nicholas","fulfillment_date":null,"generation_date":null,"gmail":false,"id":74540,"invoice_number":"0000027","invoiceid":74540,"language":"en","last_order_status":null,"lname":"Jaar","notes":"","organization":"Space Is Only Noise","outstanding":{"amount":"8000.00","code":"USD"},"ownerid":1,"paid":{"amount":"0.00","code":"USD"},"parent":0,"payment_details":"","payment_status":"unpaid","po_number":null,"province":"Ontario","return_uri":null,"sentid":1,"show_attachments":true,"status":1,"street":"1655 Dupont St. W.","street2":"","template":"clean-grouped","terms":"","updated":"2019-05-09 13:58:07","v3_status":"draft","vat_name":"","vat_number":"","vis_state":0}}}}