Skip to main content

Invoices

Entity›Activity›Activity.Invoice

Invoices represent billing and payment records in your CRM. They typically follow a Sales Order in the sales pipeline and track the payment lifecycle through phases such as Draft, Sent, and Paid.

Use the Activity_Invoice endpoint to manage your invoices. Invoices inherit all fields from Activity (subject, amount, financial totals) and support phase-based workflows to track payment status.

Endpoints​

List Invoices​

Retrieve a paginated list of invoices.

GET/v1/odata/Activity_Invoice

Single Invoice​

Retrieve a single invoice by its ID.

GET/v1/odata/Activity_Invoice({id})

With expanded relations:

GET/v1/odata/Activity_Invoice({id})?$expand=Phase,ProductLines,Relationship,Contact

Create Invoice​

Create a new invoice.

POST/v1/odata/Activity_Invoice

Update Invoice​

Update an existing invoice. Provide only the fields to update.

PUT/v1/odata/Activity_Invoice({id})

Update Invoice Phase​

Change the phase of an invoice (e.g., from Draft to Sent, or Sent to Paid):

POST/v1/odata/Activity_Invoice

Query available phases with:

GET/v1/odata/Datastore_Phase_ActivityInvoice

Delete Invoice​

Delete an invoice by ID.

DELETE/v1/odata/Activity_Invoice({id})

Fields​

Standard Fields (all entities)​

FieldTypeDescription
IDGuidPrimary key (UUID)
_TypeStringEntity type discriminator (Activity.Invoice)
_NameStringComputed display name
SortIndexDoubleSorting order
CreationDateDateTimeOffsetDate the record was created
LastMutationDateDateTimeOffsetDate of the last modification
IsActiveBooleanWhether the record is active
IsClosedBooleanWhether the record is closed

Inherited Fields (from Activity)​

FieldTypeDescription
SubjectStringActivity subject / title
NumberStringAuto-generated invoice number
AmountDoubleInvoice amount
CurrencyStringCurrency code (e.g., EUR)
IsVatIncludedBooleanWhether prices include VAT
DiscountPercentageDoubleDiscount percentage
RelationDescriptionStringDescription of the linked relation
NumberOfProductLinesDoubleNumber of product lines
NumberOfOpenTasksDoubleNumber of open tasks
BillingAmountDoubleAmount to be billed
TotalSalesExcludingVATDoubleSubtotal excluding VAT
TotalSalesIncludingVATDoubleTotal including VAT
VatAmountDoubleVAT amount
TotalDiscountExcludingVATDoubleTotal discount amount
TotalMarginDoubleTotal profit margin
TotalPurchaseAmountDoubleTotal purchase/cost amount

Relationships​

RelationshipTarget EntityCardinalityDescription
RelationshipRelationshipN:1Linked relation (customer)
ContactRelation.Person.ContactN:1Contact person
ProductLinesProductLine1:NProduct lines / line items
InvolvedInvolved1:NInvolved parties
PhaseDatastore.Phase.ActivityInvoiceN:1Invoice phase (Draft, Sent, Paid, etc.)
ActivityActivityN:1Parent activity (e.g., linked sales order)
LinkedActivitiesActivity1:NLinked activities
PriceListPriceListN:1Price list
TimeRegistrationsTimeRegistration1:NTime registrations

Expanding Relationships​

GET/v1/odata/Activity_Invoice({id})?$expand=Phase
GET/v1/odata/Activity_Invoice({id})?$expand=Phase,ProductLines,Relationship,Contact
GET/v1/odata/Activity_Invoice({id})/ProductLines
GET/v1/odata/Activity_Invoice({id})/Involved
DELETE/v1/odata/Activity_Invoice({id})/Phase/$ref

Filtering Examples​

GET/v1/odata/Activity_Invoice?$filter=Phase/Code eq '{Code}'&$top={top}
GET/v1/odata/Activity_Invoice?$filter=Phase/Code ne '{Code}'&$top={top}
GET/v1/odata/Activity_Invoice?$filter=Amount gt {Amount}&$top={top}
GET/v1/odata/Activity_Invoice?$filter=contains(Subject, '{Subject}')&$top={top}
GET/v1/odata/Activity_Invoice?$filter=CreationDate gt {CreationDate}&$top={top}
GET/v1/odata/Activity_Invoice?$filter=IsClosed eq {IsClosed}&$top={top}
GET/v1/odata/Activity_Invoice?$filter=Number eq '{Number}'&$top={top}

Paginating Through Unpaid Invoices​

GET/v1/odata/Activity_Invoice?$filter=Phase/Code ne 'Paid'&$orderby=ID&$top=100&$skip=0
GET/v1/odata/Activity_Invoice?$filter=Phase/Code ne 'Paid'&$orderby=ID&$top=100&$skip=100

Custom Query​

Build your own OData query against Activity_Invoice. Open Run and edit the whole request inline — swap the entity set, change the $filter, or add $expand, $select, $orderby, $top, $skip. Type $ for suggestions; use ↺ Reset to restore this example.

GET/v1/odata/Activity_Invoice?$top=10