API · v1 · stabiel
CODEMETA OSDeveloper Center
NL
Console openen
Entity · sales_orders

Sales Order Schema

Schema-ID
sales_order
Collection
sales_orders
Permissions
  • Lezensales_order_view
  • Aanmakensales_order_create
  • Wijzigensales_order_edit
  • Verwijderensales_order_delete

Velden

Sales Order Schema

sales_orders4 permissions

Schema for validating sales order entities

documentLanguagestringoptioneel

Language the document (PDF) is rendered in. Decided when the document is created (explicit → customer language → tenant default → de) and never re-derived. Missing = de.

deenesfrnlnull
nullable
partyIduuidvereist

Customer party UUID

contactPartyIduuidoptioneel

Contact person UUID at customer

nullable
assignedToIduuidoptioneel

Assigned MSP employee UUID

nullable
orgUnitIduuidoptioneel

Responsible org unit UUID

nullable
statusstringvereist

Order status

ORDER_ENTRY_IN_PROGRESSSUBMITTEDPENDING_APPROVALORDER_CONFIRMATION_PRINTEDIN_PROGRESSPARTIALLY_FULFILLEDCLOSEDMANUALLY_CLOSEDCANCELLED
orderDatedatetimevereist

Order date

sourcestringoptioneel

Origin of the order (e.g. "portal" for customer-portal submissions)

max. 50 tekensnullable
notestringoptioneel

Customer note

max. 2000 tekensnullable
internalNotestringoptioneel

Internal note (not visible to customer)

max. 4000 tekensnullable
orderItemsobject[]optioneel

Order line items

Default: []
iduuidvereist
weclappItemIdstringoptioneel

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

max. 200 tekensDefault: nullnullable
codemetaBillingMarkerstringoptioneel

ADR 0918: marker of a position Codemeta itself appended to the weclapp order — `[TR:…]` for a transferred booking (ADR 0412), `[PB:…]` for a collective replacement position (ADR 0634). Derived from the weclapp item (note, legacy description/title) on every mirror run, never preserved locally. Such a position is already billed work, not a sold position: the order intake never materialises it as a project position/task. Null for every other position.

max. 200 tekensDefault: nullnullable
articleIdstringvereist

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.

Patternnullable
articleNamestringoptioneel

Denormalized article name

nullable
articleNumberstringoptioneel

Denormalized article number

nullable
descriptionstringoptioneel

Line item description / note (from external systems or manual entry)

Default: nullnullable
unitNamestringoptioneel

Unit label denormalized at order time (e.g. "Stück", "h")

max. 100 tekensDefault: nullnullable
externalArticleRefobjectoptioneel

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.

Default: nullnullable
quantitystringvereist

Ordered quantity

Pattern
unitPricestringvereist

Unit price at time of order

Pattern
discountPercentstringoptioneel

Line item discount percentage

Patternnullable
netAmountstringoptioneel

Net amount = quantity * unitPrice * (1 - discount)

Patternnullable
billingIntervalstringoptioneel

Billing interval for this item

MONTHLYQUARTERLYSEMI_ANNUALYEARLYONE_TIME
nullable
setupFeestringoptioneel

One-time setup fee for this item

Patternnullable
parentItemIduuidoptioneel

Parent bundle item UUID

nullable
isBomItembooleanoptioneel

Is a resolved BOM position from a bundle

Default: false
fulfilledQuantitystringoptioneel

Fulfilled quantity

PatternDefault: "0"
fulfilledAtdatetimeoptioneel

Fulfillment timestamp

nullable
provisioningStatusstringoptioneel

Provisioning status

PENDINGIN_PROGRESSDONEFAILED
Default: "PENDING"
positionNumberintegervereist

Position number for sorting

≥ 0
vatRatestringoptioneel

Item-level VAT rate

Default: nullnullable
shippedQuantitystringoptioneel

Quantity shipped (synced from shipments)

Default: "0"
serialNumbersstring[]optioneel

Assigned serial numbers

Default: []
taskIdstringoptioneel

Linked task UUID (if this position has been materialized as a task)

PatternDefault: nullnullable
ticketIdstringoptioneel

Linked ticket UUID (if this position has been materialized as a ticket via the "nur Tickets" path)

PatternDefault: nullnullable
projectIdstringoptioneel

Linked project UUID (if this position has been materialized into a project)

PatternDefault: nullnullable
isServiceItembooleanoptioneel

True if the article is a service article (computed at import/sync time from article.articleType)

Default: nullnullable
plannedMinutesintegeroptioneel

Planned effort in minutes, computed at import time when the unit is hour-like (quantity * 60).

≥ 0Default: nullnullable
plannedAmountstringoptioneel

Planned amount in EUR, computed at import time for non-hour service items (mirrors netAmount).

PatternDefault: nullnullable
availabilityobjectoptioneel

Cached availability snapshot for delivery/non-service items. Updated by weclapp-order-sync reconcile job.

Default: nullnullable
netAmountstringoptioneel

Total net amount

Patternnullable
recurringAmountstringoptioneel

Recurring portion of total

Patternnullable
onetimeAmountstringoptioneel

One-time portion of total

Patternnullable
setupFeesTotalstringoptioneel

Total setup fees

Patternnullable
currencyCodestringoptioneel

ISO 4217 currency code

PatternDefault: "EUR"
submittedAtdatetimeoptioneel

Submission timestamp

nullable
submittedByuuidoptioneel

User who submitted the order

nullable
approvedAtdatetimeoptioneel

Approval timestamp

nullable
approvedByuuidoptioneel

User who approved the order

nullable
rejectedAtdatetimeoptioneel

Rejection timestamp

nullable
rejectedByuuidoptioneel

User who rejected the order

nullable
rejectionReasonstringoptioneel

Reason for rejection

max. 2000 tekensnullable
fulfillmentStartedAtdatetimeoptioneel

Timestamp the order entered fulfillment (IN_PROGRESS) — ADR 0777

nullable
fulfilledAtdatetimeoptioneel

Full fulfillment timestamp

nullable
closedAtdatetimeoptioneel

Timestamp the order was closed (CLOSED / MANUALLY_CLOSED)

nullable
cancelledAtdatetimeoptioneel

Cancellation timestamp

nullable
cancelledByuuidoptioneel

User who cancelled the order

nullable
opportunityIdstringoptioneel

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.

PatternDefault: nullnullable
proposalIdstringoptioneel

Legacy: source proposal UUID. ADR 1237: proposal entity removed; field kept for existing documents.

PatternDefault: nullnullable
contractIduuidoptioneel

Generated contract UUID

nullable
invoiceIdsuuid[]optioneel

Generated invoice UUIDs (supports partial/collective invoicing)

Default: []
tagsstring[]optioneel

Order tags

Default: []
deliveryAddressobjectoptioneel

Delivery address (snapshot)

Default: nullnullable
invoiceAddressobjectoptioneel

Invoice address (snapshot)

Default: nullnullable
paymentTermIdstringoptioneel

Reference to payment_terms collection

PatternDefault: nullnullable
paymentTermsDaysintegeroptioneel
≥ 0Default: nullnullable
paymentMethodstringoptioneel
BANK_TRANSFERSEPA_DIRECT_DEBITCREDIT_CARDCASHPAYPALOTHERnull
Default: nullnullable
headerDiscountstringoptioneel
PatternDefault: nullnullable
shippingMethodstringoptioneel
max. 200 tekensDefault: nullnullable
shippingCoststringoptioneel
PatternDefault: nullnullable
defaultVatRatestringoptioneel
Default: "19"
vatAmountstringoptioneel
PatternDefault: nullnullable
grossAmountstringoptioneel
PatternDefault: nullnullable
plannedDeliveryDatedateoptioneel
Default: nullnullable
actualDeliveryDatedateoptioneel
Default: nullnullable
customerOrderNumberstringoptioneel

Customer purchase order number

max. 100 tekensDefault: nullnullable
commissionstringoptioneel

Kommission — free-text reference from weclapp (§baseSalesRecord.commission). Mirrored by the order sync so intake templates can render {{order.commission}} (ADR 0373).

max. 255 tekensDefault: nullnullable
orderNumberstringoptioneel

Auto-generated order number (BE-YYYY-NNNNN)

max. 30 tekensDefault: nullread-onlynullable
shipmentMethodNamestringoptioneel

Versandart — resolved NAME behind weclapp §baseSalesRecord.shipmentMethodId. Denormalised by the order sync (weclapp sends only the id next to a pinned properties list) so intake templates can render {{order.shipmentMethodName}}.

max. 255 tekensDefault: nullnullable
warehouseNamestringoptioneel

Lager — resolved NAME behind weclapp §salesOrder.warehouseId. Denormalised by the order sync so intake templates can render {{order.warehouseName}}.

max. 255 tekensDefault: nullnullable
externalReferencesobject[]optioneel

Cross-system linking refs (e.g. weclapp). Read by inbound sync worker.

Default: []
systemstringvereist
max. 100 tekens
externalIdstringvereist
max. 200 tekens
externalVersionstringoptioneel
nullable
syncedAtdatetimeoptioneel
nullable
weclappSalesOrderIdstringoptioneel

Linked weclapp sales order ID

Default: nullnullable
weclappSalesOrderNumberstringoptioneel

Linked weclapp sales order number (e.g. AB-2026-00042)

max. 100 tekensDefault: nullnullable
weclappOrderUrlstringoptioneel

URL to the linked weclapp sales order detail page

Default: nullnullable
weclappSalesOrderDataobjectoptioneel

Cached weclapp sales order data

Default: nullnullable
weclappCustomAttributesobjectoptioneel

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.

Default: nullnullable

Standaard-endpoints

Deze resource volgt het generieke CRUD-contract van het platform. Lees de conventies voor paginering, idempotentie, optimistic locking en audit. De belangrijkste endpoints:

  • GET /api/v1/sales_orders — Lijst, gepagineerd + filterbaar
  • GET /api/v1/sales_orders/<id> — Enkele entity
  • POST /api/v1/sales_orders — Aanmaken
  • PATCH /api/v1/sales_orders/<id> — Gedeeltelijke update
  • DELETE /api/v1/sales_orders/<id> — Soft-delete
  • GET /api/v1/sales_orders/<id>/timeline — Audit + activiteiten

Zoeken