Create invoice from work
create_invoice_from_workCreates a draft invoice from a project's unbilled work (same options as the preview): the finished billable hours and billable expenses become lines and are tied to the invoice, so they cannot be invoiced twice or edited until it is voided. The draft is private: nothing is sent. Counts toward the free plan's 2 documents per month. Only the project owner. Needs confirm: true and amount equal to the total of the preview; without them the result is that preview.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Only work up to this day, YYYY-MM-DD. | |
| from | No | Only work from this day on, YYYY-MM-DD. | |
| notes | No | Up to 4000 characters. Default: the profile's default notes. | |
| terms | No | Up to 4000 characters. Default: the profile's payment instructions. | |
| amount | No | The document's total in the currency's main unit, repeated from the preview (e.g. 220 or "220.00"). Must equal the total or nothing is done. | |
| toName | No | Who it is for. Default: the client's name. | |
| boardId | Yes | The project. | |
| confirm | No | true performs the action. Without it (or with any value other than the boolean true) nothing changes and the result is a preview of the effects. | |
| dueDate | No | YYYY-MM-DD. Default: the profile's payment terms (invoice) or 30 days (estimate). | |
| groupBy | No | How the work becomes lines. Default task. | |
| toEmail | No | ||
| toTaxId | No | ||
| clientId | No | One of the user's clients; its name, email, address, tax id and currency are copied onto the document. | |
| currency | No | Three-letter code. Default: the client's, else the profile's. | |
| discount | No | A fixed amount off the whole document. An amount in the currency's main unit, e.g. 85 or "85.50" (not cents). null clears it. | |
| taxLabel | No | What the tax is called, up to 30 characters. | |
| issueDate | No | The issue date. Default today, YYYY-MM-DD. | |
| toAddress | No | ||
| expenseIds | No | ||
| taxPercent | No | Tax as a percentage, e.g. 21 or "10,5". Default: the profile's. | |
| includeTime | No | ||
| taxableTime | No | ||
| timeEntryIds | No | ||
| includeExpenses | No | ||
| taxableExpenses | No |