Invoices
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_InvoiceSingle 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,ContactCreate Invoice
Create a new invoice.
POST
/v1/odata/Activity_InvoiceUpdate 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_InvoiceQuery 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)
| Field | Type | Description |
|---|---|---|
ID | Guid | Primary key (UUID) |
_Type | String | Entity type discriminator (Activity.Invoice) |
_Name | String | Computed display name |
SortIndex | Double | Sorting order |
CreationDate | DateTimeOffset | Date the record was created |
LastMutationDate | DateTimeOffset | Date of the last modification |
IsActive | Boolean | Whether the record is active |
IsClosed | Boolean | Whether the record is closed |
Inherited Fields (from Activity)
| Field | Type | Description |
|---|---|---|
Subject | String | Activity subject / title |
Number | String | Auto-generated invoice number |
Amount | Double | Invoice amount |
Currency | String | Currency code (e.g., EUR) |
IsVatIncluded | Boolean | Whether prices include VAT |
DiscountPercentage | Double | Discount percentage |
RelationDescription | String | Description of the linked relation |
NumberOfProductLines | Double | Number of product lines |
NumberOfOpenTasks | Double | Number of open tasks |
BillingAmount | Double | Amount to be billed |
TotalSalesExcludingVAT | Double | Subtotal excluding VAT |
TotalSalesIncludingVAT | Double | Total including VAT |
VatAmount | Double | VAT amount |
TotalDiscountExcludingVAT | Double | Total discount amount |
TotalMargin | Double | Total profit margin |
TotalPurchaseAmount | Double | Total purchase/cost amount |
Relationships
| Relationship | Target Entity | Cardinality | Description |
|---|---|---|---|
| Relationship | Relationship | N:1 | Linked relation (customer) |
| Contact | Relation.Person.Contact | N:1 | Contact person |
| ProductLines | ProductLine | 1:N | Product lines / line items |
| Involved | Involved | 1:N | Involved parties |
| Phase | Datastore.Phase.ActivityInvoice | N:1 | Invoice phase (Draft, Sent, Paid, etc.) |
| Activity | Activity | N:1 | Parent activity (e.g., linked sales order) |
| LinkedActivities | Activity | 1:N | Linked activities |
| PriceList | PriceList | N:1 | Price list |
| TimeRegistrations | TimeRegistration | 1:N | Time registrations |
Expanding Relationships
GET
/v1/odata/Activity_Invoice({id})?$expand=PhaseGET
/v1/odata/Activity_Invoice({id})?$expand=Phase,ProductLines,Relationship,ContactNavigating Relationships
GET
/v1/odata/Activity_Invoice({id})/ProductLinesGET
/v1/odata/Activity_Invoice({id})/InvolvedDELETE
/v1/odata/Activity_Invoice({id})/Phase/$refFiltering 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