Skip to main content

Sales Orders

EntityActivityActivity.SalesOrder

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_SalesOrder

Single 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,Phase

Create Sales Order

Create a new sales order.

POST/v1/odata/Activity_SalesOrder

Update 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)

FieldTypeDescription
IDGuidPrimary key (UUID)
_TypeStringEntity type discriminator (e.g., Activity.SalesOrder)
_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

Sales Order Fields

FieldTypeDescription
DeliveryDateDateExpected delivery date
CustomerReferenceStringCustomer's purchase order reference
ExternalOrderNumberStringExternal order number

Inherited Fields (from Activity)

FieldTypeDescription
SubjectStringActivity subject / title
NumberStringAuto-generated activity number
AmountDoubleActivity 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 linked to this activity
NumberOfPlannedActionsDoubleNumber of planned actions
BillingAmountDoubleAmount to be invoiced
BillingAmountInCurrencyDoubleAmount to be invoiced (in currency)
AmountInCurrencyDoubleAmount (in currency)
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/contact)
ContactRelation.Person.ContactN:1Contact person
ProductLinesProductLine1:NProduct lines / line items
InvolvedInvolved1:NInvolved parties
PhaseDatastore.Phase.ActivitySalesOrderN:1Order phase / status
PriceListPriceListN:1Price list
LinkedActivitiesActivity1:NLinked activities
ActivityActivityN:1Parent activity
TimeRegistrationsTimeRegistration1:NTime registrations

Expanding Relationships

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

Filtering 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}