Create Invoice
Create a new invoice.
Required fields:
- `recordId`: Project or account ID (the record must exist first)
- `calculationMethod`: Must be "LINE_ITEMS" or "PERCENTAGE"
Conditionally required:
- `lineItems`: Required when `calculationMethod` is "LINE_ITEMS" (at least one item)
- `percentage`: Required when `calculationMethod` is "PERCENTAGE"
Optional fields:
- `issueDate`: ISO 8601 datetime string
- `dueDate`: ISO 8601 datetime string
- `status`: Initial invoice status (defaults to DRAFT)
- `description`: Invoice description
Authentication
x-api-keystring
API Key authentication via header
Request
This endpoint expects an object.
recordId
Project or account ID
calculationMethod
Calculation method
Allowed values:
lineItems
Required when calculationMethod is LINE_ITEMS. Array of line items (at least one required).
percentage
Required when calculationMethod is PERCENTAGE.
status
Initial invoice status (defaults to DRAFT)
issueDate
Issue date (ISO 8601 datetime string)
dueDate
Due date (ISO 8601 datetime string)
description
Invoice description
Response
Invoice created successfully
id
Invoice identifier
uid
Unique invoice number
status
Invoice status
amount
Total invoice amount
amountPaid
Amount paid
calculationMethod
Calculation method (e.g., LINE_ITEMS)
createdAt
Creation timestamp
updatedAt
Last update timestamp
description
Invoice description
type
Invoice type
Allowed values:
basedOnId
ID of the record this invoice is based on
basedOnUid
UID of the record this invoice is based on
dueDate
Due date
isArchived
Whether the invoice is archived
percentage
Percentage if applicable
baseAmount
Base amount if applicable
account
record
lineItems
Errors
400
Bad Request Error
401
Unauthorized Error
