invoices

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
post/invoices

Request

  • Base URL: https://api.coperniq.io/v1
  • URL: https://api.coperniq.io/v1/invoices
  • Auth: API key in header x-api-key

Request body

recordIdinteger required

Project or account ID

calculationMethod'LINE_ITEMS' | 'PERCENTAGE' required

Calculation method

percentagenumber double

Required when calculationMethod is PERCENTAGE.

status'DRAFT' | 'SENT' | 'PARTIALLY_PAID' | 'PAID'

Optional; defaults to DRAFT when omitted. To finalize the invoice, set SENT, PARTIALLY_PAID, or PAID — issueDate is then required. Lifecycle statuses (DECLINED, OVERDUE) cannot be set at creation.

issueDatestring date-time

Issue date (ISO 8601). Optional. Applied only when status is SENT/PARTIALLY_PAID/PAID (required for those); ignored for DRAFT invoices.

dueDatestring date-time

Due date (ISO 8601 datetime string)

descriptionstring nullable

Invoice description

Response

Invoice created successfully

idinteger required

Invoice identifier

invoiceNumberinteger required

Unique invoice number

descriptionstring nullable

Invoice description

status'DRAFT' | 'SENT' | 'DECLINED' | 'PAID' | 'PARTIALLY_PAID' | 'OVERDUE' required

Invoice status

basedOnIdinteger nullable

ID of the record this invoice is based on

basedOnUidinteger nullable

UID of the record this invoice is based on

dueDatestring date-time

Due date

issueDatestring date-time nullable

Issue date when the invoice has been issued

amountnumber double required

Total invoice amount

amountPaidnumber double required

Amount paid

isArchivedboolean

Whether the invoice is archived

sharedWithPortalboolean

Whether the invoice is shared with portal

calculationMethodstring required

Calculation method (e.g., LINE_ITEMS)

percentagenumber double nullable

Percentage if applicable

baseAmountnumber double nullable

Base amount if applicable

createdAtstring date-time required

Creation timestamp

updatedAtstring date-time required

Last update timestamp

Changes

No recorded changes to this operation across all 1 revision of this API.