Sales Order Schema
Felder
Sales Order Schema
Schema for validating sales order entities
partyId
Customer party UUID
contactPartyId
Contact person UUID at customer
assignedToId
Assigned MSP employee UUID
orgUnitId
Responsible org unit UUID
status
Order status
ORDER_ENTRY_IN_PROGRESSSUBMITTEDPENDING_APPROVALORDER_CONFIRMATION_PRINTEDIN_PROGRESSPARTIALLY_FULFILLEDCLOSEDMANUALLY_CLOSEDCANCELLEDorderDate
Order date
source
Origin of the order (e.g. "portal" for customer-portal submissions)
note
Customer note
internalNote
Internal note (not visible to customer)
orderItems
Order line items
weclappItemId
weclapp salesOrderItem id — stable anchor so re-imports can match existing local items instead of regenerating them (preserves id/taskId/projectId linkage). Null for internal orders and for items imported before this field existed (positionNumber fallback).
articleId
Article UUID. Nullable to support inbound imports (e.g. weclapp) where the source article has no corresponding codemeta record yet — the missing-article resolver fills these in.
articleName
Denormalized article name
articleNumber
Denormalized article number
description
Line item description / note (from external systems or manual entry)
unitName
Unit label denormalized at order time (e.g. "Stück", "h")
externalArticleRef
Reference to the source-system article (e.g. weclapp). Used by the resolve-missing-articles endpoint to fetch and create codemeta articles for unresolved items.
quantity
Ordered quantity
unitPrice
Unit price at time of order
discountPercent
Line item discount percentage
netAmount
Net amount = quantity * unitPrice * (1 - discount)
billingInterval
Billing interval for this item
MONTHLYQUARTERLYSEMI_ANNUALYEARLYONE_TIMEsetupFee
One-time setup fee for this item
parentItemId
Parent bundle item UUID
isBomItem
Is a resolved BOM position from a bundle
fulfilledQuantity
Fulfilled quantity
fulfilledAt
Fulfillment timestamp
provisioningStatus
Provisioning status
PENDINGIN_PROGRESSDONEFAILEDpositionNumber
Position number for sorting
vatRate
Item-level VAT rate
shippedQuantity
Quantity shipped (synced from shipments)
serialNumbers
Assigned serial numbers
taskId
Linked task UUID (if this position has been materialized as a task)
ticketId
Linked ticket UUID (if this position has been materialized as a ticket via the "nur Tickets" path)
projectId
Linked project UUID (if this position has been materialized into a project)
isServiceItem
True if the article is a service article (computed at import/sync time from article.articleType)
plannedMinutes
Planned effort in minutes, computed at import time when the unit is hour-like (quantity * 60).
plannedAmount
Planned amount in EUR, computed at import time for non-hour service items (mirrors netAmount).
availability
Cached availability snapshot for delivery/non-service items. Updated by weclapp-order-sync reconcile job.
netAmount
Total net amount
recurringAmount
Recurring portion of total
onetimeAmount
One-time portion of total
setupFeesTotal
Total setup fees
currencyCode
ISO 4217 currency code
submittedAt
Submission timestamp
submittedBy
User who submitted the order
approvedAt
Approval timestamp
approvedBy
User who approved the order
rejectedAt
Rejection timestamp
rejectedBy
User who rejected the order
rejectionReason
Reason for rejection
fulfilledAt
Full fulfillment timestamp
cancelledAt
Cancellation timestamp
cancelledBy
User who cancelled the order
opportunityId
Source opportunity UUID (sales pipeline anchor). Set when an order is created/won directly without a quotation, so the deal can still be traced back to its Vertriebschance.
proposalId
Source proposal UUID (if order was created from an accepted proposal)
contractId
Generated contract UUID
invoiceIds
Generated invoice UUIDs (supports partial/collective invoicing)
tags
Order tags
deliveryAddress
Delivery address (snapshot)
invoiceAddress
Invoice address (snapshot)
paymentTermId
Reference to payment_terms collection
paymentTermsDays
paymentMethod
BANK_TRANSFERSEPA_DIRECT_DEBITCREDIT_CARDCASHPAYPALOTHERnullheaderDiscount
shippingMethod
shippingCost
defaultVatRate
vatAmount
grossAmount
plannedDeliveryDate
actualDeliveryDate
customerOrderNumber
Customer purchase order number
commission
Kommission — free-text reference from weclapp (§baseSalesRecord.commission). Mirrored by the order sync so intake templates can render {{order.commission}} (ADR 0373).
orderNumber
Auto-generated order number (BE-YYYY-NNNNN)
externalReferences
Cross-system linking refs (e.g. weclapp). Read by inbound sync worker.
weclappSalesOrderId
Linked weclapp sales order ID
weclappSalesOrderNumber
Linked weclapp sales order number (e.g. AB-2026-00042)
weclappOrderUrl
URL to the linked weclapp sales order detail page
weclappSalesOrderData
Cached weclapp sales order data
weclappCustomAttributes
Generic { [attributeKey]: value } map of the weclapp order-level custom attributes, translated from weclapp's opaque definition ids at sync time (ADR 0285, Phase 0). Backfill-free & additive: orders synced before this field lack it and fall back to defaults. The meaning of each key (deadline / responsible / "transfer" flag) is resolved downstream by the order_intake_profile — this field only carries the raw values.
Keine Felder passen zum Filter.
Standard-Endpoints
Diese Resource folgt dem generischen CRUD-Vertrag der Plattform. Lesen Sie die Konventionen für Pagination, Idempotenz, Optimistic Locking und Audit. Die wichtigsten Endpoints:
GET /api/v1/sales_orders— Liste, paginiert + filterbarGET /api/v1/sales_orders/<id>— Einzelne EntityPOST /api/v1/sales_orders— AnlegenPATCH /api/v1/sales_orders/<id>— Teil-UpdateDELETE /api/v1/sales_orders/<id>— Soft-DeleteGET /api/v1/sales_orders/<id>/timeline— Audit + Aktivitäten