Create An Invoice
Invoice parameters
Important: this assumes that the invoice feature is enabled for your account via Settings > Choose Modules”.
User-editable parameters
Parameter | Description |
---|---|
due-at-human-format |
Invoice due date. Acceptable formats are NET N where N is the number of days until the invoice is due. |
client-id |
A valid client-id |
currency |
A valid currency format (Example: United States Dollar - USD ). Optional, and will default to the client currency if no value is passed. Click here for a list of supported currencies |
discount |
Optional value to discount invoice total. |
issued-at |
Invoice creation date. (Example: 2015-04-22 ) |
subject |
Optional invoice subject. |
notes |
Optional invoice notes. |
number |
Optional invoice number. If no value is set, the number will be automatically generated. |
kind |
Invoice type. Options: free-form , project , task , people , detailed . (See Invoice Types) |
projects-to-invoice |
Comma separated project IDs to gather data from, unused for free-form invoices. |
import-hours |
Hours to import into invoices. Options: all (import all hours), yes (import hours using period-start , period-end ), no (do not import hours). |
import-expenses |
Expenses to import into invoices. Options: all (import all expenses), yes (import expenses using expense-period-start , expense-period-end ), no (do not import expenses). |
expense-summary-type |
Summary type for expenses in an invoice. Options: project , people , category , detailed . |
period-start |
Date for included project hours. (Example: 2015-04-22) |
period-end |
End date for included project hours. (Example: 2015-05-22) |
expense-period-start |
Date for included project expenses. (Example: 2015-04-22) |
expense-period-end |
End date for included project expenses. (Example: 2015-05-22) |
csv-line-items |
Used to create line items in free-form invoices. Entries should have their entries enclosed in quotes when they contain extra commas. This is especially important if you are using a number format which uses commas as the decimal separator. |
tax |
First tax rate for created invoice. Optional. Account default used otherwise. |
tax2 |
Second tax rate for created invoice. Optional. Account default used otherwise. |
purchase-order |
Optional purchase order number. |
Invoice types
Type | Description |
---|---|
free-form |
Creates free form invoice. Line items added with csv-line-items |
project |
Gathers hours & expenses from Harvest grouped by projects. |
task |
Gathers hours & expenses from Harvest grouped by task. |
people |
Gathers hours & expenses from Harvest grouped by person. |
detailed |
Uses a line item for each hour & expense entry, including detailed notes. |
Parameters generated by Harvest
Parameters | Description |
---|---|
client-key |
Value to generate URL to client dashboard. (Example: https://YOURACCOUNT.harvestapp.com/clients/invoices/{CLIENTKEY} ) |
estimate-id |
This value will exist if an estimate was converted into an invoice. |
retainer-id |
This value will exist if the invoice was created from a retainer. |
recurring-invoice-id |
This value will exist if the invoice is recurring, and automatically generated. |
created-by-id |
User ID of the invoice creator. |
updated-at |
Date invoice was last updated. (Example: 2015-04-09T12:07:56Z) |
created-at |
Date invoice was created. (Example: 2015-04-09T12:07:56Z) |
state |
Updated when invoice is created, sent, paid, late, or written off. Options: draft , paid , late , sent , written-off . |
Create an invoice
POST https://YOURACCOUNT.harvestapp.com/invoices
HTTP Response: 201 Created
Invoice based on hours & expenses
Free form invoice
Sample free form invoice request, using
csv-line-items
: