Actions58
- Client Actions
- Company Actions
- Contact Actions
- Expense Actions
- Expense Category Actions
- Invoice Actions
- Project Actions
- Project Task Assignment Actions
- Project User Assignment Actions
- Report Actions
- Task Actions
- Time Entry Actions
- User Actions
Invoice → Create
AI-generatedSummary
Create an invoice in Harvest either as a free-form invoice with specified line items or by importing tracked time entries and expenses from specified projects with configurable summaries and filters.
Inputs
- Invoice Type (required) — Choose between creating a free-form invoice with manual line items or creating one from tracked time and expenses.
- Client ID (required) — The ID of the client to whom the invoice will be issued.
- Line Items — When using 'Free-form Invoice', specify one or more line items including kind (service/product), description, quantity, unit price, tax applicability, and optional project association.
- Project IDs (required) — When using 'From Tracked Time/Expenses', provide a comma-separated list of project IDs from which to import time entries and expenses.
- Billable Hours (required) — For tracked invoices, specify whether to include all uninvoiced billable hours, a date range of hours, or no hours.
- Hours From Date — If including billable hours by date range, specify start date (YYYY-MM-DD).
- Hours To Date — If including billable hours by date range, specify end date (YYYY-MM-DD).
- How to Display Hours — Choose how to summarize included time entries: by task, person, project, or detailed line items.
- Expenses (required) — For tracked invoices, specify whether to include all uninvoiced billable expenses, a date range, or no expenses.
- Expenses From Date — If including expenses by date range, specify start date (YYYY-MM-DD).
- Expenses To Date — If including expenses by date range, specify end date (YYYY-MM-DD).
- How to Display Expenses — Choose how to summarize included expenses: by category, person, project, or detailed line items.
- Attach Receipts — Attach a PDF expense report with receipts to the invoice when including expenses.
- Payment Term (required) — The payment term for the invoice, with options such as Net 15, Net 30, Upon Receipt, or Custom.
- Custom Due Date (required) — Required if using a custom payment term; specify the due date (YYYY-MM-DD).
- Additional Fields — Optional invoice fields such as subject, notes, invoice number (auto-generated if omitted), purchase order number, taxes, discounts, currency, issue date, payment options, retainer ID, and estimate ID.
Output shape
a single record representing the created invoice with all details as returned by the Harvest API
Returns the created invoice object including its ID and properties. Errors during creation will throw exceptions unless 'Continue On Fail' is enabled causing an error message output.
Examples
Example 1: Create a free-form invoice for client 123 with two line items and a net 30 payment term
Invoice Type: freeform; Client ID: 123; Line Items: [{kind: 'Service', description: 'Consulting', quantity: 10, unitPrice: 100, taxed: true}, {kind: 'Product', description: 'Software License', quantity: 1, unitPrice: 500}]; Payment Term: net 30
Example 2: Create an invoice from tracked time and expenses for projects 101 and 102 including all uninvoiced billable hours and expenses summarized by task and category, with receipts attached
Invoice Type: tracked; Client ID: 456; Project IDs: '101,102'; Billable Hours: yes; Hours Summary: task; Expenses: yes; Expenses Summary: category; Attach Receipts: true; Payment Term: upon receipt