Create Invoice

Create a new invoice. Required fields: - `title`: Invoice title - `recordId`: Project, opportunity, or account ID (the record must exist first) - `calculationMethod`: Must be "LINE_ITEMS" or "PERCENTAGE" - `lineItems`: Array of at least one line item if calculationMethod is "LINE_ITEMS" - `percentage`: Percentage if calculationMethod is "PERCENTAGE" - `dueDate`: ISO 8601 datetime string Optional fields: - `description`: Invoice description

Authentication

x-api-keystring
API Key authentication via header

Request

This endpoint expects an object.
titlestringRequired>=1 character
Invoice title
recordIdintegerRequired>=1
Project, opportunity, or account ID
calculationMethodenumRequired
Calculation method
Allowed values:
lineItemslist of objectsRequired

Array of line items (at least one required)

dueDatestringRequiredformat: "date-time"

Due date (ISO 8601 datetime string)

statusenumOptional

Initial invoice status (defaults to DRAFT)

descriptionstring or nullOptional
Invoice description

Response

Invoice created successfully
idinteger
Invoice identifier
uidinteger
Unique invoice number
titlestring
Invoice title
statusenum
Invoice status
amountdouble
Total invoice amount
amountPaiddouble
Amount paid
calculationMethodstring

Calculation method (e.g., LINE_ITEMS)

createdAtstringformat: "date-time"
Creation timestamp
updatedAtstringformat: "date-time"
Last update timestamp
descriptionstring or null
Invoice description
typeenum or null
Invoice type
Allowed values:
basedOnIdinteger or null
ID of the record this invoice is based on
basedOnUidinteger or null
UID of the record this invoice is based on
dueDatestring or nullformat: "date-time"
Due date
isArchivedboolean or null
Whether the invoice is archived
sharedWithPortalboolean or null
Whether the invoice is shared with portal
percentagedouble or null
Percentage if applicable
baseAmountdouble or null
Base amount if applicable
accountobject or null
recordobject or null
lineItemslist of objects or null

Errors