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

Contract Schema

Schema-ID
contract
Collection
contracts
Permissions
  • Lezencontract_view
  • Aanmakencontract_create
  • Wijzigencontract_edit
  • Verwijderencontract_delete

Velden

Contract Schema

contracts4 permissions

Schema for validating contract entities

namestringvereist

Contract name

1–200 tekens
descriptionstringoptioneel

Contract description

nullable
descriptionHtmlstringoptioneel

Rich text HTML version of the contract description

nullable
contractTypeIduuidoptioneel

Contract type UUID

nullable
contractCategorystringvereist

Contract category — MAINTENANCE covers all service contracts (positions, asset assignments, contingents, SLA, compliance, coverage); LICENSE is the separate license-billing flow (positions grid + Weclapp invoice import).

MAINTENANCELICENSE
partyIduuidvereist

Associated party UUID

contactPartyIduuidoptioneel

Associated contact person UUID

nullable
deliveryAddressIdstringoptioneel

Delivery address (party.addresses[]._id of partyId) for invoices from this contract. Null/absent = none (weclapp default).

max. 64 tekensnullable
billingAddressIdstringoptioneel

Invoice address (party.addresses[]._id of partyId) for invoices from this contract. Null/absent = the customer default (BILLING → MAIN → first).

max. 64 tekensnullable
parentContractIduuidoptioneel

Parent contract UUID for sub-contracts

nullable
statusstringvereist

Contract status (ADR 0198 R7): DRAFT → PENDING_APPROVAL → ACTIVE → EXPIRING → CANCELLED (+ TEMPLATE). SUSPENDED/RENEWED/EXPIRED removed — pausing gone, renewal is in-place, lapse at endDate ends in CANCELLED.

DRAFTPENDING_APPROVALACTIVEEXPIRINGCANCELLEDTEMPLATE
startDatedatevereist

Contract start date (YYYY-MM-DD)

endDatedateoptioneel

Contract end date (YYYY-MM-DD)

nullable
cancellationDeadlinedateoptioneel

Earliest cancellation deadline across the contract + positions (R5).

read-onlynullable
nextNotificationDatedateoptioneel

Earliest expiry reminder date across the contract + positions (R5).

read-onlynullable
nextRenewalDatedateoptioneel

Earliest auto-renewal boundary across the contract + positions (R5).

read-onlynullable
cancellationDeadlineSourcestringoptioneel
read-onlynullable
nextNotificationSourcestringoptioneel
read-onlynullable
nextRenewalSourcestringoptioneel
read-onlynullable
contractDatedatetimeoptioneel

Contract signing date (from legacy Toast import)

nullable
activatedAtdatetimeoptioneel

Activation timestamp

nullable
cancelledAtdatetimeoptioneel

Cancellation timestamp

nullable
expiredAtdatetimeoptioneel

Expiration timestamp

nullable
cancellationobjectoptioneel
nullable
noticePeriodDaysnumbervereist
≥ 0
extensionDaysnumberoptioneel

Auto-renewal extension length in days (day-precise, replaces extensionMonths)

≥ 0
extensionMonthsnumberoptioneel

deprecated — migrated to extensionDays; kept for backward compatibility

≥ 0
autoRenewbooleanvereist
nextPossibleDatedateoptioneel
nullable
cancellationRequestedAtdatetimeoptioneel
nullable
cancellationRequestedByuuidoptioneel
nullable
cancellationReasonstringoptioneel
nullable
cancellationEffectiveDatedateoptioneel
nullable
softframestringoptioneel

Reference frame for cancellation period (weclapp: cancellationPeriodSoftframe)

CONTRACT_ENDEND_OF_MONTHEND_OF_QUARTEREND_OF_CALENDAR_YEAREND_OF_CONTRACT_YEARnull
Default: nullnullable
notificationobjectoptioneel
nullable
enabledbooleanoptioneel
nullable
channelsstring[]optioneel
nullable
recipientsobject[]optioneel
nullable
typestringvereist
USERTEAMEMAIL
valuestringvereist
targetsobjectoptioneel
nullable
inAppobjectoptioneel
nullable
recipientsobject[]optioneel
nullable
typestringvereist
USERTEAMEMAIL
valuestringvereist
prioritystringoptioneel
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringoptioneel
nullable
emailobjectoptioneel
nullable
recipientsobject[]optioneel
nullable
typestringvereist
USERTEAMEMAIL
valuestringvereist
prioritystringoptioneel
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringoptioneel
nullable
taskobjectoptioneel
nullable
recipientsobject[]optioneel
nullable
typestringvereist
USERTEAMEMAIL
valuestringvereist
prioritystringoptioneel
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringoptioneel
nullable
opportunityobjectoptioneel
nullable
recipientsobject[]optioneel
nullable
typestringvereist
USERTEAMEMAIL
valuestringvereist
prioritystringoptioneel
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringoptioneel
nullable
leadQuantitynumberoptioneel
≥ 0nullable
leadUnitstringoptioneel
DAYWEEKMONTHYEARnull
nullable
lastNotifiedAtdatetimeoptioneel
nullable
monthlyRevenuestringoptioneel

Monthly revenue as decimal string

Patternnullable
currencyCodestringvereist

Three-letter currency code (ISO 4217)

Pattern
billingCyclestringoptioneel

Billing cycle

MONTHLYQUARTERLYSEMI_ANNUALYEARLYONE_TIMENONE
nullable
paymentTermsDaysnumberoptioneel

Payment terms in days

≥ 0nullable
priceEscalationobjectoptioneel
nullable
typestringvereist
FIXED_PERCENTCPI_INDEXMANUAL
percentPerYearstringoptioneel
Patternnullable
effectiveMonthnumberoptioneel
1 – 12nullable
lastAppliedAtdatetimeoptioneel
nullable
serviceTargetProfileIduuidoptioneel

Service target profile UUID (ADR 0117a — replaces slaProfileId)

nullable
inlineTargetsanyoptioneel
defaultCoverageanyoptioneel
scopeobjectoptioneel
nullable
coverageTypestringvereist

Legacy coverage type — kept for backwards-compat. New code reads `coverageMode` (see below).

ALL_ASSETSASSIGNED_ONLYCUSTOM
coverageModestringoptioneel

Defines what counts as a contract-covered service. ALL_WITH_EXCLUSIONS: all services except the excluded* lists. ONLY_SPECIFIC: only the included* lists. ONLY_EXPLICIT_ASSIGNMENTS: only matches via explicit assignments[]. Falls back to coverageType mapping when unset.

ALL_WITH_EXCLUSIONSONLY_SPECIFICONLY_EXPLICIT_ASSIGNMENTS
nullable
excludedServiceTypeIdsuuid[]optioneel
Default: []
excludedLocationIdsuuid[]optioneel
Default: []
excludedTechnicianIdsuuid[]optioneel
Default: []
excludedTicketTypeKeysstring[]optioneel

Ticket types (ticket_type.key, e.g. CHANGE_REQUEST) whose work does NOT count as contract work (ADR 0579). Empty = no ticket-type exclusion. A booking without a ticket carries no type and is therefore never excluded here.

Default: []
excludedAssetIdsuuid[]optioneel

Assets, die VERTRAGSWEIT ausgenommen sind — sie werden von keiner Regel dieses Vertrags gedeckt, auch nicht über Standort, Leistungstyp oder die allgemeine Deckung. Das ist die Bedeutung von „der Server gehört nicht zum Vertrag": eine Ausnahme, die nur eine einzelne Zuweisung entfernt, fienge das Asset über `defaultCoverage` sofort wieder ein. Leere Liste = keine Ausnahme; ein Vertrag ohne das Feld verhält sich identisch zu vorher (kein Backfill).

Default: []
includedServiceTypeIdsuuid[]optioneel
Default: []
includedLocationIdsuuid[]optioneel
Default: []
includedTechnicianIdsuuid[]optioneel
Default: []
includedTicketTypeKeysstring[]optioneel

Ticket types (ticket_type.key) that count as contract work in ONLY_SPECIFIC mode (ADR 0579). Empty = any ticket type. Non-empty means a booking WITHOUT a ticket (and thus without a type) falls out of coverage — same semantics as the other dimensions.

Default: []
serviceTypeIdsuuid[]optioneel
Default: []
technicianUserIdsuuid[]optioneel
Default: []
technicianOrgUnitIdsuuid[]optioneel
Default: []
locationIdsuuid[]optioneel
Default: []
excludeAfterHoursbooleanoptioneel
excludeTravelbooleanoptioneel
assignedToIduuidoptioneel

Assigned user UUID

nullable
orgUnitIduuidoptioneel

Associated org unit UUID

nullable
amendmentOfuuidoptioneel

Original contract UUID this amends

nullable
amendmentNumbernumberoptioneel

Amendment sequence number

≥ 0nullable
templateIduuidoptioneel

Template contract UUID this was created from

nullable
releasedServiceTypeIdsuuid[]optioneel

Service types with requiresContract that this contract unlocks for its customer. Only decides whether the type may be booked: pricing and coverage stay with scope.* and assignments. Missing/empty = releases nothing (no backfill).

nullable
assignmentsobject[]optioneel

Contract assignments (assets, parties, locations, service types)

Default: []
iduuidvereist
assignmentTypestringvereist

Subject of the assignment. ASSET = concrete asset; ASSET_TYPE = curated asset-type bucket (see `assetTypeKey`); PARTY = concrete customer employee; ALL_ASSETS = default coverage for any asset under the contract; ALL_PARTIES = default coverage for any customer employee; LOCATION = matches when `asset.locationId === assignment.locationId` (ADR 0151 Phase B). SERVICE_TYPE is legacy.

ASSETASSET_TYPEPARTYALL_ASSETSALL_PARTIESLOCATIONSERVICE_TYPE
assetIduuidoptioneel
nullable
assetTypeKeystringoptioneel

Curated asset-type bucket key for `assignmentType: ASSET_TYPE`. Each key maps to a set of asset.schema discriminator patterns (see `constants/contract-asset-types.ts`).

PCSERVERNETWORKPERIPHERALMOBILELICENSEAPPLICATIONDATABASEBACKUPSTORAGECLOUD_SERVICEWEBSITEDOMAINTELEPHONYCOMMUNICATIONCONTAINERBUSINESS_PROCESSIPGENERIC
nullable
excludedAssetIdsuuid[]optioneel

Assets, die von DIESER Zuweisung ausgenommen sind ("der Server SRV-X gehört nicht zum Vertrag"). Leere Liste = keine Ausnahme, ein Vertrag ohne das Feld verhält sich identisch zu vorher — kein Backfill. Wirkt zusätzlich vertragsweit über `scope.excludedAssetIds`, damit ein ausgenommenes Asset nicht über eine andere Regel desselben Vertrags wieder eingefangen wird.

Default: []
partyIduuidoptioneel
nullable
locationDescriptionstringoptioneel
nullable
locationIduuidoptioneel

Reference to a Location entity. Required when `assignmentType === "LOCATION"` (ADR 0151 Phase B); the resolver matches assets whose `asset.locationId` equals this value at Specificity 2.5 (between ASSET_TYPE and SERVICE_TYPE).

nullable
serviceTypeIduuidoptioneel
nullable
itemIduuidoptioneel

Optional link to a contract.items[].id — when set, billing is driven by the position and the assignment-level monthlyPrice/discountPercent are ignored by the UI.

nullable
monthlyPricestringoptioneel
Patternnullable
discountPercentstringoptioneel
Patternnullable
stockingCoststringoptioneel
Patternnullable
targetsOverrideanyoptioneel
coverageanyoptioneel
responseTimeMinutesnumberoptioneel

Convenience field: when set, the save-helper synthesises a `targetsOverride.stages[]` entry with `kind=time_to_first_response` and this duration. Read back from the same stage.

≥ 0nullable
resolutionTimeMinutesnumberoptioneel

Convenience field: when set, the save-helper synthesises a `targetsOverride.stages[]` entry with `kind=time_to_close` and this duration. Read back from the same stage.

≥ 0nullable
validFromdateoptioneel
nullable
validUntildateoptioneel
nullable
isActivebooleanvereist
sortOrdernumbervereist
notesstringoptioneel
nullable
contingentsobject[]optioneel

Contract contingents (prepaid hours, monetary budgets, trips)

Default: []
iduuidvereist
contingentTypestringvereist
HOURSMONETARYTRIPS
labelstringvereist
totalAmountstringvereist
Pattern
usedAmountstringvereist
Pattern
unitstringvereist
HOURSMINUTESEURTRIPS
periodTypestringvereist
MONTHLYQUARTERLYYEARLYONE_TIMEUNLIMITED
periodStartdatevereist
periodEnddateoptioneel
nullable
carryOverobjectvereist
typestringvereist
NONEFULLCAPPEDPERCENT
maxCarryOverstringoptioneel
Patternnullable
maxCarryOverPercentnumberoptioneel
nullable
expiresAfterPeriodsnumberoptioneel
nullable
overagePolicystringvereist
BLOCKALLOWALLOW_WITH_SURCHARGENOTIFY
overageSurchargePercentstringoptioneel
Patternnullable
overageCapAmountstringoptioneel
Patternnullable
autoRefillobjectoptioneel
nullable
enabledbooleanoptioneel
schedulestringoptioneel
PERIOD_STARTMANUALTHRESHOLD
thresholdPercentnumberoptioneel
nullable
refillAmountstringoptioneel
Pattern
conversionRatestringoptioneel
Patternnullable
fallbackContractIduuidoptioneel
nullable
fallbackPrioritynumberoptioneel
1 – 9nullable
isActivebooleanvereist
exhaustedAtdatetimeoptioneel
nullable
itemsobject[]optioneel

Contract line items (incl. GROUP divider rows for positional grouping)

Default: []
iduuidvereist
itemTypestringvereist
RECURRINGONE_TIMESURCHARGEDISCOUNTNOTEGROUP
namestringvereist
max. 200 tekens
descriptionstringoptioneel
nullable
quantitynumbervereist
≥ 0
minQuantitynumberoptioneel

Lower clamp for a datasource-resolved quantity (ADR 0357). Ignored for static quantities.

Default: nullnullable
maxQuantitynumberoptioneel

Upper clamp for a datasource-resolved quantity (ADR 0357).

Default: nullnullable
unitPricestringvereist
Pattern
discountPercentstringoptioneel
Patternnullable
intervalstringvereist
MONTHLYQUARTERLYSEMI_ANNUALYEARLYONE_TIMENONEDAILYWEEKLYTWO_YEARLYTHREE_YEARLY
validFromdateoptioneel
nullable
validUntildateoptioneel
nullable
isActivebooleanvereist
sortOrdernumbervereist
assetIduuidoptioneel
nullable
serviceTypeIduuidoptioneel
nullable
nextBillingDatedateoptioneel

Next billing date for this specific item

Default: nullnullable
previousBillingDatedateoptioneel

Last time this item was billed

Default: nullnullable
billingSchedulestringoptioneel

ITEM = bill this position on its own schedule (nextBillingDate + interval); missing/CONTRACT = contract cadence (legacy behaviour)

CONTRACTITEMnull
nullable
billingGroupIdstringoptioneel

Group ID for splitting items across multiple invoices

Default: nullnullable
articleIduuidoptioneel

Optional link to a Codemeta catalog article

nullable
articleNumberstringoptioneel
nullable
isBillOfMaterialbooleanoptioneel

When true, this item is a sales bill of material with sub-items

nullable
useSubItemPricesbooleanoptioneel

BOM pricing: when true, unitPrice mirrors the sum of subItems; else own price

nullable
subItemsany[]optioneel
nullable
quantitySourceobjectoptioneel

Dynamic quantity source — resolved at billing time

Default: nullnullable
conditionsobjectoptioneel

Contract-level overrides for billing conditions. Each block is optional; unset fields fall back to service-type / tenant defaults (punctual override strategy).

nullable
surchargeStackingModestringoptioneel

How surcharges combine when several apply to the same minute (ADR 0431). ADDITIVE (default) sums them (1 + Σ pct/100) — the long-standing behaviour; MAX lets the single highest surcharge win (collective-agreement practice). Unset = fall back to service_type.billing.surchargeStackingMode, then ADDITIVE.

ADDITIVEMAX
nullable
serviceRatesobject[]optioneel

Per-service-type rate schedule (overrides service-type.billing.pricing). Multiple entries per serviceTypeId are allowed: each may carry a validFrom date; an entry without validFrom is the baseline. For a given booking date the effective entry is the one with the latest validFrom <= date. To change a rate, ADD a new entry (do not overwrite an existing one) so historical bookings keep their old rate.

Default: []
iduuidoptioneel
nullable
serviceTypeIduuidvereist
validFromdateoptioneel
nullable
ratePerHourstringoptioneel
Patternnullable
ratePerKmstringoptioneel
Patternnullable
travelAllowanceobjectoptioneel

Arrival/departure travel costs: per-km rate, flat per-trip fee, vehicle base fee.

nullable
ratePerKmstringoptioneel
Patternnullable
flatRatestringoptioneel
Patternnullable
vehicleBaseFeestringoptioneel
Patternnullable
overtimeSurchargesobject[]optioneel

Overtime / evening / weekend / holiday surcharges applied multiplicatively to the service rate when the time-of-day + day-of-week (+ optional service-type / holiday) match.

Default: []
iduuidvereist
namestringvereist
1–100 tekens
fromTimestringvereist
Pattern
toTimestringvereist
Pattern
daysOfWeeknumber[]vereist
unieke items
surchargePercentstringvereist
Pattern
serviceTypeIdsuuid[]optioneel

Service types this surcharge applies to. Empty/omitted = all service types (ADR 0163).

unieke itemsDefault: []
holidayModestringoptioneel

Public-holiday behaviour (ADR 0163). IGNORE/unset = match weekday windows only (never on a holiday); ALSO_ON_HOLIDAYS = weekday windows OR any holiday; ONLY_ON_HOLIDAYS = only on holidays (daysOfWeek ignored). Region resolved per technician via holiday-resolver.

IGNOREALSO_ON_HOLIDAYSONLY_ON_HOLIDAYS
nullable
validFromdateoptioneel
nullable
validUntildateoptioneel
nullable
serviceRoundingobject[]optioneel

Per-service-type rounding overrides. Unset fields fall back to service-type.billing.{roundingMinutes,roundingMode,minimumMinutes,billingUnitMinutes}.

Default: []
serviceTypeIduuidvereist
roundingMinutesnumberoptioneel
≥ 0nullable
roundingModestringoptioneel
UPDOWNNEAREST
nullable
minimumMinutesnumberoptioneel
≥ 0nullable
billingUnitMinutesnumberoptioneel
≥ 0nullable
remarksobject[]optioneel

Structured free-text remarks list for capturing miscellaneous contract data (per ADR 0149).

Default: []
iduuidvereist
textstringvereist
min. 1 tekens
textHtmlstringoptioneel

Optional Tiptap-rendered HTML with mention spans (`<span data-mention-id data-mention-type>...</span>`). Falls back to `text` when not set.

nullable
mentionsobject[]optioneel

Structured sidecar: every @-user or #-ticket mention extracted from `textHtml` at save time. Server-side resolvers can pick this up without parsing HTML.

Default: []nullable
iduuidvereist
typestringvereist
userticketasset
labelstringvereist
createdAtdatetimevereist
read-only
createdByuuidvereist
read-only
updatedAtdatetimeoptioneel
read-onlynullable
notesstringoptioneel

External notes

nullable
internalNotesstringoptioneel

Internal notes (not visible to customer)

nullable
tagsstring[]optioneel

Contract tags

Default: []
customFieldsobjectoptioneel

Custom fields (tenant-specific)

nullable
linkedRiskIdsstring[]optioneel

Linked risk IDs

Default: []
licensePositionsobject[]optioneel

License contract positions (for LICENSE category)

Default: []
uuidstringvereist
typestringvereist
STATICDYNAMIC
articleIdstringvereist
articleNumberstringvereist
titlestringvereist
descriptionstringoptioneel
nullable
companyNamestringoptioneel
nullable
quantityoneOfvereist
unitPricenumbervereist
unchangedUnitPricenumberoptioneel
nullable
manualUnitPricenumberoptioneel

Manually overridden own unit price (may be negative, e.g. discount positions). Replaces the weclapp article price as billing basis; unchangedUnitPrice keeps the fetched article price as revert target.

nullable
discountPercentagenumbervereist
pricingDatedatetimeoptioneel
nullable
startDatedateoptioneel
nullable
endDatedateoptioneel
nullable
periodstringoptioneel

ISO-8601 billing period for this position (P1Y = yearly, P1M = monthly)

P1YP1Mnull
nullable
factornumberoptioneel
nullable
roundingstringoptioneel
EXACTCEILROUND
nullable
articleTypestringoptioneel
BASICSALES_BILL_OF_MATERIALSTORABLE
nullable
groupNamestringoptioneel
nullable
useSalesBillOfMaterialItemPricesbooleanoptioneel
nullable
salesBillOfMaterialItemsobject[]optioneel
Default: []
uuidstringoptioneel
typestringoptioneel
STATICDYNAMIC
articleIdstringoptioneel
articleNumberstringoptioneel
titlestringoptioneel
descriptionstringoptioneel
nullable
quantityoneOfoptioneel
unitPricenumberoptioneel
unchangedUnitPricenumberoptioneel
nullable
discountPercentagenumberoptioneel
nullable
pricingDatedatetimeoptioneel
nullable
articleFactornumberoptioneel
nullable
roundingstringoptioneel
EXACTCEILROUND
nullable
factornumberoptioneel
nullable
cancellationPeriodQuantitynumberoptioneel
nullable
cancellationPeriodUnitstringoptioneel
nullable
extensionQuantitynumberoptioneel
nullable
extensionUnitstringoptioneel
nullable
weclappContractIdstringoptioneel
max. 64 tekensnullable
weclappContractItemIdstringoptioneel
max. 64 tekensnullable
cancellationNotificationbooleanoptioneel
nullable
cancellationNotificationQuantitynumberoptioneel
nullable
cancellationNotificationUnitstringoptioneel
nullable
lastCancellationNotificationDatedatetimeoptioneel
nullable
notificationChannelsstring[]optioneel
nullable
notificationRecipientsobject[]optioneel
nullable
typestringvereist
USERTEAMEMAIL
valuestringvereist
notificationTargetsobjectoptioneel
nullable
inAppobjectoptioneel
nullable
recipientsobject[]optioneel
nullable
typestringvereist
USERTEAMEMAIL
valuestringvereist
prioritystringoptioneel
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringoptioneel
nullable
emailobjectoptioneel
nullable
recipientsobject[]optioneel
nullable
typestringvereist
USERTEAMEMAIL
valuestringvereist
prioritystringoptioneel
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringoptioneel
nullable
taskobjectoptioneel
nullable
recipientsobject[]optioneel
nullable
typestringvereist
USERTEAMEMAIL
valuestringvereist
prioritystringoptioneel
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringoptioneel
nullable
opportunityobjectoptioneel
nullable
recipientsobject[]optioneel
nullable
typestringvereist
USERTEAMEMAIL
valuestringvereist
prioritystringoptioneel
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringoptioneel
nullable
groupNamesobject[]optioneel

Group names for license contract positions

Default: []
uuidstringvereist
titlestringvereist
lastInvoicedAtdatetimeoptioneel

Timestamp of last billing/invoice creation

nullable
licenseBillingClaimobjectoptioneel

Lock of a collective billing run (ADR 1280) on this license contract while its weclapp invoice is being created. Server-written only.

read-onlynullable
runIdstringoptioneel
unitKeystringoptioneel
claimedAtdatetimeoptioneel
billingConfigobjectoptioneel

Automatic billing configuration

Default: nullnullable
nextBillingDatedateoptioneel

Next billing date (calculated from lastInvoicedAt + billingCycle)

Default: nullnullable
billingFrequencystringoptioneel

Billing frequency for license contracts

monatlichjährlichno_billing
nullable
weclappCustomerIdstringoptioneel

weclapp ERP customer ID

nullable
weclappContractRefsobject[]optioneel

weclapp contracts this contract was transferred from (one-off transfer; a bundled contract references several). Reference only, nothing syncs back.

max. 200 itemsnullable
idstringvereist
1–64 tekens
contractNumberstringoptioneel
max. 64 tekensread-onlynullable
productsobject[]optioneel

Product logos for display

Default: []
namestringvereist
imagestringoptioneel
nullable
initialsstringvereist
linkedDocumentsobject[]optioneel

Linked documents (tickets, etc.)

Default: []
typestringvereist
idoneOfvereist
titlestringvereist
descriptionstringoptioneel
nullable
linkedEntitiesobject[]optioneel

Linked entities (assets, tickets, etc.)

Default: []nullable
entityTypestringvereist
partyassetticketcontractprojectuseropportunity
entityIduuidvereist
rolestringvereist
ticketRulesobject[]optioneel

Activated ticket-generation rules (ADR 0439). Each entry binds a tenant-wide contract_ticket_rule to this contract, usually to one position, with its own due-date cursor.

Default: []
iduuidvereist

Activation UUID (stable key, used in generated tickets’ sourceRef).

ruleIduuidvereist

The contract_ticket_rule this activation executes.

positionIdstringoptioneel

items[].id or licensePositions[].uuid this activation is bound to; null = manual activation without a position.

Default: nullnullable
positionSourcestringoptioneel

Which position array positionId refers to — the two stay separate models (ADR 0357). null when positionId is null.

ITEMLICENSEnull
Default: nullnullable
startDatedatevereist

First due date, chosen at activation. The UI prevents past dates; the server tolerates them (sweep creates exactly one ticket, then continues from the next future occurrence).

nextDueDatedatevereist

Cursor: next due date (initially = startDate). Advanced by the sweep.

nextCreateDatedatevereist

Derived scan key: nextDueDate minus the rule’s leadDays. The sweep creates the ticket when nextCreateDate <= today.

lastTicketDatedateoptioneel

Due date of the most recently generated ticket.

Default: nullnullable
lastTicketIdstringoptioneel

Id of the most recently generated ticket.

PatternDefault: nullnullable
isActivebooleanvereist

Paused activations are skipped by the sweep but stay documented on the contract.

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

Zoeken