Quotation Schema
Champs
Quotation Schema
Schema for validating quotation (Angebot) entities
documentLanguage
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.
deenesfrnlnullquotationNumber
Auto-generated quotation number (AN-YYYY-NNNNN); in External-Master imported from weclapp commercialNumber
title
Optional title for the quotation
partyId
Recipient (customer) party UUID
contactPartyId
Contact person UUID at customer (PERSON)
opportunityId
Source opportunity UUID (sales pipeline anchor)
proposalId
Legacy: source proposal UUID (Angebotsmappe). ADR 1237: proposal entity removed; field kept for existing documents.
managedEventId
Veranstaltung, aus deren Positionsspiegel das Angebot erzeugt wurde (ADR 0861). Der Rückverweis steht am Angebot, nicht an der Veranstaltung — sie soll nicht wachsen.
assignedToId
Assigned MSP employee UUID
orgUnitId
Responsible org unit UUID
paymentTermId
Payment term reference
positions
Quotation line items
positionNumber
Position number for sorting
positionType
Position type — TEXT/SECTION_HEADER/SUBTOTAL skip quantity/price validation in the editor
ITEMTEXTSECTION_HEADERSUBTOTALarticleId
Article UUID (null for free positions)
articleNumber
Denormalized article number snapshot
name
Position name (snapshot, avoids drift when article changes)
description
Position description or note
unitName
Unit label snapshot (e.g. "Stk", "h", "Pauschal")
quantity
Quantity (null for TEXT/SECTION_HEADER positions)
unitPriceNet
Net unit price (null for TEXT/SECTION_HEADER positions)
discountPercent
Line item discount percentage (0–100)
netAmount
Net amount = quantity * unitPriceNet * (1 - discount/100)
vatRate
VAT rate, e.g. "19", "7", "0"
accountCode
DATEV revenue account code
billingInterval
Billing interval for recurring positions
MONTHLYQUARTERLYSEMI_ANNUALYEARLYONE_TIMEnullsetupFee
One-time setup fee on top of recurring
sourcePositionId
event_position, aus der diese Zeile abgeleitet ist. Der Positionsspiegel bleibt führend; Abweichungen werden angezeigt, nicht zurückgeschrieben.
isEstimate
Schätzposition — Abrechnung nach tatsächlicher Menge.
optional
Optional position (weclapp quotationItem.optional) — shown with its price, not counted in the totals. Missing/null = false.
alternative
Alternative position (weclapp quotationItem.alternative) — a variant of the preceding main position, not counted in the totals. Missing/null = false.
introText
Free cover-letter text shown above positions in the PDF
notes
Internal note (not visible to customer)
validUntil
Date until which the quotation is valid
status
Quotation lifecycle status
DRAFTSENTACCEPTEDREJECTEDEXPIREDCANCELLEDCONVERTEDsentAt
Send timestamp (also lock-marker for editability)
sentBy
User who sent the quotation
acceptedAt
Customer acceptance timestamp
acceptedByContactId
Contact party who accepted (from magic-link or internal "on behalf")
acceptedVia
Origin of the acceptance
MAGIC_LINKINTERNAL_ON_BEHALFAPIWECLAPP_PORTALWECLAPP_BACKOFFICEnullrejectedAt
rejectionReason
rejectionReasonCode
rejectionReasonLabel
cancelledAt
cancelledBy
convertedToSalesOrderId
Sales order created from this quotation
convertedAt
subtotalNet
Sum of net amounts before VAT
totalVat
Total VAT amount
totalGross
Gross total (net + VAT)
recurringNet
Recurring portion of net (sum of items with billingInterval != ONE_TIME)
onetimeNet
One-time portion of net
currencyCode
ISO 4217 currency code
defaultVatRate
Default VAT rate for items without explicit vatRate
headerDiscount
Header-level discount percentage (deferred to Phase 3)
recipientAddress
Recipient address snapshot (frozen at DRAFT → SENT)
pdfFileId
Generated PDF file UUID
pdfContentHash
SHA-256 of canonicalized content; prevents redundant PDF regeneration
acceptanceToken
Single-use token for magic-link acceptance (rotated on send)
acceptanceTokenExpiresAt
Token expiry (defaults to validUntil + 7 days)
respondedTokenHash
SHA-256 of the consumed magic-link token (read-only access after response)
customerAcceptance
Customer acceptance via magic link: typed name, drawn signature (PNG data URL) and time. IP/user agent live in the history row.
customerSelection
Customer selection (package, optional positions, alternatives) from the digital folder (ADR 1237)
linkFirstOpenedAt
First time the live customer link was opened (server-side)
linkLastOpenedAt
Last time the live customer link was opened (server-side)
linkOpenCount
How often the live customer link was opened
followUpState
Follow-up steps already handled for this quotation (ADR 1304)
requiresSignature
When true, acceptance is routed through the eSign module instead of click+log
source
Origin marker (API, WECLAPP, CUSTOMER_PORTAL, ...)
tags
weclappId
Linked weclapp quotation id
weclappLastSyncedAt
weclappUrl
Deeplink to the quotation in the weclapp UI
externalReferences
Cross-system linking refs (read by inbound sync worker, Phase 2)
weclappCustomAttributes
Captured values for weclapp mandatory/optional custom attributes, in weclapp `customAttributes[]` payload shape. Forwarded verbatim on every create/finalize push.
attributeDefinitionId
stringValue
numberValue
selectedValueId
selectedValues
id
entityId
inboundReplyAckedAt
Timestamp at which the latest inbound customer email on this quotation was acknowledged as "handled, no reply needed". Clears the awaiting-reply badge when >= the last inbound email time; a newer inbound email re-arms it. Local Codemeta annotation with no weclapp counterpart — listed in externalMaster.internalOnlyFields so it may be set even while weclapp masters the quotation and survives re-syncs. Mirrors opportunity.inboundReplyAckedAt.
inboundReplyAckedBy
User who acknowledged the latest inbound customer email (see inboundReplyAckedAt).
Aucun champ ne correspond au filtre.
Endpoints standard
Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :
GET /api/v1/quotations— Liste, paginée et filtrableGET /api/v1/quotations/<id>— Une entitéPOST /api/v1/quotations— CréerPATCH /api/v1/quotations/<id>— Mise à jour partielleDELETE /api/v1/quotations/<id>— Suppression logiqueGET /api/v1/quotations/<id>/timeline— Audit et activités