Sales Orders
Sales orders represent confirmed orders from customers. They typically follow an accepted quote and precede an invoice in the sales pipeline. Each order can track a delivery date, customer reference, and external order number.
Use the Activity_SalesOrder endpoint to manage orders. Sales orders inherit all fields from Activity (subject, amount, financial totals) and add order-specific fields like DeliveryDate, CustomerReference, and ExternalOrderNumber.
Endpoints
List Sales Orders
Retrieve a paginated list of sales orders.
GET
/v1/odata/Activity_SalesOrderSingle Sales Order
Retrieve a single sales order by its ID.
GET
/v1/odata/Activity_SalesOrder({id})With expanded relations:
GET
/v1/odata/Activity_SalesOrder({id})?$expand=Relationship,Contact,ProductLines,PhaseCreate Sales Order
Create a new sales order.
POST
/v1/odata/Activity_SalesOrderUpdate Sales Order
Update an existing sales order. Provide only the fields to update.
PUT
/v1/odata/Activity_SalesOrder({id})Delete Sales Order
Delete a sales order by ID.
DELETE
/v1/odata/Activity_SalesOrder({id})Fields
Standard Fields (all entities)
| Field | Type | Description |
|---|---|---|
ID | Guid | Primary key (UUID) |
_Type | String | Entity type discriminator (e.g., Activity.SalesOrder) |
_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 |
Sales Order Fields
| Field | Type | Description |
|---|---|---|
DeliveryDate | Date | Expected delivery date |
CustomerReference | String | Customer's purchase order reference |
ExternalOrderNumber | String | External order number |
Inherited Fields (from Activity)
| Field | Type | Description |
|---|---|---|
Subject | String | Activity subject / title |
Number | String | Auto-generated activity number |
Amount | Double | Activity 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 linked to this activity |
NumberOfPlannedActions | Double | Number of planned actions |
BillingAmount | Double | Amount to be invoiced |
BillingAmountInCurrency | Double | Amount to be invoiced (in currency) |
AmountInCurrency | Double | Amount (in currency) |
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) |
| 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.ActivitySalesOrder | N:1 | Order phase / status |
| PriceList | PriceList | N:1 | Price list |
| LinkedActivities | Activity | 1:N | Linked activities |
| Activity | Activity | N:1 | Parent activity |
| TimeRegistrations | TimeRegistration | 1:N | Time registrations |
Expanding Relationships
GET
/v1/odata/Activity_SalesOrder({id})?$expand=PhaseGET
/v1/odata/Activity_SalesOrder({id})?$expand=Relationship,Contact,ProductLines,PhaseNavigating Relationships
GET
/v1/odata/Activity_SalesOrder({id})/ProductLinesGET
/v1/odata/Activity_SalesOrder({id})/InvolvedDELETE
/v1/odata/Activity_SalesOrder({id})/Phase/$refFiltering Examples
GET
/v1/odata/Activity_SalesOrder?$filter=contains(Subject, '{Subject}')&$top={top}GET
/v1/odata/Activity_SalesOrder?$filter=Amount gt {Amount}&$top={top}GET
/v1/odata/Activity_SalesOrder?$filter=DeliveryDate gt {DeliveryDate}&$top={top}GET
/v1/odata/Activity_SalesOrder?$filter=CustomerReference eq '{CustomerReference}'&$top={top}GET
/v1/odata/Activity_SalesOrder?$filter=ExternalOrderNumber ne null&$top={top}GET
/v1/odata/Activity_SalesOrder?$filter=IsClosed eq {IsClosed}&$top={top}GET
/v1/odata/Activity_SalesOrder?$filter=CreationDate gt {CreationDate}&$top={top}