API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · contracts

Contract Schema

ID du schéma
contract
Collection
contracts
Autorisations
  • Lirecontract_view
  • Créercontract_create
  • Modifiercontract_edit
  • Supprimercontract_delete

Champs

Contract Schema

contracts4 autorisations

Schema for validating contract entities

namestringobligatoire

Contract name

1–200 caractères
descriptionstringfacultatif

Contract description

nullable
descriptionHtmlstringfacultatif

Rich text HTML version of the contract description

nullable
contractTypeIduuidfacultatif

Contract type UUID

nullable
contractCategorystringobligatoire

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
partyIduuidobligatoire

Associated party UUID

contactPartyIduuidfacultatif

Associated contact person UUID

nullable
deliveryAddressIdstringfacultatif

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

max. 64 caractèresnullable
billingAddressIdstringfacultatif

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

max. 64 caractèresnullable
parentContractIduuidfacultatif

Parent contract UUID for sub-contracts

nullable
statusstringobligatoire

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
startDatedateobligatoire

Contract start date (YYYY-MM-DD)

endDatedatefacultatif

Contract end date (YYYY-MM-DD)

nullable
cancellationDeadlinedatefacultatif

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

lecture seulenullable
nextNotificationDatedatefacultatif

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

lecture seulenullable
nextRenewalDatedatefacultatif

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

lecture seulenullable
cancellationDeadlineSourcestringfacultatif
lecture seulenullable
nextNotificationSourcestringfacultatif
lecture seulenullable
nextRenewalSourcestringfacultatif
lecture seulenullable
contractDatedatetimefacultatif

Contract signing date (from legacy Toast import)

nullable
activatedAtdatetimefacultatif

Activation timestamp

nullable
cancelledAtdatetimefacultatif

Cancellation timestamp

nullable
expiredAtdatetimefacultatif

Expiration timestamp

nullable
cancellationobjectfacultatif
nullable
noticePeriodDaysnumberobligatoire
≥ 0
extensionDaysnumberfacultatif

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

≥ 0
extensionMonthsnumberfacultatif

deprecated — migrated to extensionDays; kept for backward compatibility

≥ 0
autoRenewbooleanobligatoire
nextPossibleDatedatefacultatif
nullable
cancellationRequestedAtdatetimefacultatif
nullable
cancellationRequestedByuuidfacultatif
nullable
cancellationReasonstringfacultatif
nullable
cancellationEffectiveDatedatefacultatif
nullable
softframestringfacultatif

Reference frame for cancellation period (weclapp: cancellationPeriodSoftframe)

CONTRACT_ENDEND_OF_MONTHEND_OF_QUARTEREND_OF_CALENDAR_YEAREND_OF_CONTRACT_YEARnull
Par défaut : nullnullable
notificationobjectfacultatif
nullable
enabledbooleanfacultatif
nullable
channelsstring[]facultatif
nullable
recipientsobject[]facultatif
nullable
typestringobligatoire
USERTEAMEMAIL
valuestringobligatoire
targetsobjectfacultatif
nullable
inAppobjectfacultatif
nullable
recipientsobject[]facultatif
nullable
typestringobligatoire
USERTEAMEMAIL
valuestringobligatoire
prioritystringfacultatif
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringfacultatif
nullable
emailobjectfacultatif
nullable
recipientsobject[]facultatif
nullable
typestringobligatoire
USERTEAMEMAIL
valuestringobligatoire
prioritystringfacultatif
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringfacultatif
nullable
taskobjectfacultatif
nullable
recipientsobject[]facultatif
nullable
typestringobligatoire
USERTEAMEMAIL
valuestringobligatoire
prioritystringfacultatif
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringfacultatif
nullable
opportunityobjectfacultatif
nullable
recipientsobject[]facultatif
nullable
typestringobligatoire
USERTEAMEMAIL
valuestringobligatoire
prioritystringfacultatif
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringfacultatif
nullable
leadQuantitynumberfacultatif
≥ 0nullable
leadUnitstringfacultatif
DAYWEEKMONTHYEARnull
nullable
lastNotifiedAtdatetimefacultatif
nullable
monthlyRevenuestringfacultatif

Monthly revenue as decimal string

Motifnullable
currencyCodestringobligatoire

Three-letter currency code (ISO 4217)

Motif
billingCyclestringfacultatif

Billing cycle

MONTHLYQUARTERLYSEMI_ANNUALYEARLYONE_TIMENONE
nullable
paymentTermsDaysnumberfacultatif

Payment terms in days

≥ 0nullable
priceEscalationobjectfacultatif
nullable
typestringobligatoire
FIXED_PERCENTCPI_INDEXMANUAL
percentPerYearstringfacultatif
Motifnullable
effectiveMonthnumberfacultatif
1 – 12nullable
lastAppliedAtdatetimefacultatif
nullable
serviceTargetProfileIduuidfacultatif

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

nullable
inlineTargetsanyfacultatif
defaultCoverageanyfacultatif
scopeobjectfacultatif
nullable
coverageTypestringobligatoire

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

ALL_ASSETSASSIGNED_ONLYCUSTOM
coverageModestringfacultatif

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[]facultatif
Par défaut : []
excludedLocationIdsuuid[]facultatif
Par défaut : []
excludedTechnicianIdsuuid[]facultatif
Par défaut : []
excludedTicketTypeKeysstring[]facultatif

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.

Par défaut : []
excludedAssetIdsuuid[]facultatif

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

Par défaut : []
includedServiceTypeIdsuuid[]facultatif
Par défaut : []
includedLocationIdsuuid[]facultatif
Par défaut : []
includedTechnicianIdsuuid[]facultatif
Par défaut : []
includedTicketTypeKeysstring[]facultatif

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.

Par défaut : []
serviceTypeIdsuuid[]facultatif
Par défaut : []
technicianUserIdsuuid[]facultatif
Par défaut : []
technicianOrgUnitIdsuuid[]facultatif
Par défaut : []
locationIdsuuid[]facultatif
Par défaut : []
excludeAfterHoursbooleanfacultatif
excludeTravelbooleanfacultatif
assignedToIduuidfacultatif

Assigned user UUID

nullable
orgUnitIduuidfacultatif

Associated org unit UUID

nullable
amendmentOfuuidfacultatif

Original contract UUID this amends

nullable
amendmentNumbernumberfacultatif

Amendment sequence number

≥ 0nullable
templateIduuidfacultatif

Template contract UUID this was created from

nullable
releasedServiceTypeIdsuuid[]facultatif

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[]facultatif

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

Par défaut : []
iduuidobligatoire
assignmentTypestringobligatoire

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
assetIduuidfacultatif
nullable
assetTypeKeystringfacultatif

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[]facultatif

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.

Par défaut : []
partyIduuidfacultatif
nullable
locationDescriptionstringfacultatif
nullable
locationIduuidfacultatif

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
serviceTypeIduuidfacultatif
nullable
itemIduuidfacultatif

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
monthlyPricestringfacultatif
Motifnullable
discountPercentstringfacultatif
Motifnullable
stockingCoststringfacultatif
Motifnullable
targetsOverrideanyfacultatif
coverageanyfacultatif
responseTimeMinutesnumberfacultatif

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
resolutionTimeMinutesnumberfacultatif

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
validFromdatefacultatif
nullable
validUntildatefacultatif
nullable
isActivebooleanobligatoire
sortOrdernumberobligatoire
notesstringfacultatif
nullable
contingentsobject[]facultatif

Contract contingents (prepaid hours, monetary budgets, trips)

Par défaut : []
iduuidobligatoire
contingentTypestringobligatoire
HOURSMONETARYTRIPS
labelstringobligatoire
totalAmountstringobligatoire
Motif
usedAmountstringobligatoire
Motif
unitstringobligatoire
HOURSMINUTESEURTRIPS
periodTypestringobligatoire
MONTHLYQUARTERLYYEARLYONE_TIMEUNLIMITED
periodStartdateobligatoire
periodEnddatefacultatif
nullable
carryOverobjectobligatoire
typestringobligatoire
NONEFULLCAPPEDPERCENT
maxCarryOverstringfacultatif
Motifnullable
maxCarryOverPercentnumberfacultatif
nullable
expiresAfterPeriodsnumberfacultatif
nullable
overagePolicystringobligatoire
BLOCKALLOWALLOW_WITH_SURCHARGENOTIFY
overageSurchargePercentstringfacultatif
Motifnullable
overageCapAmountstringfacultatif
Motifnullable
autoRefillobjectfacultatif
nullable
enabledbooleanfacultatif
schedulestringfacultatif
PERIOD_STARTMANUALTHRESHOLD
thresholdPercentnumberfacultatif
nullable
refillAmountstringfacultatif
Motif
conversionRatestringfacultatif
Motifnullable
fallbackContractIduuidfacultatif
nullable
fallbackPrioritynumberfacultatif
1 – 9nullable
isActivebooleanobligatoire
exhaustedAtdatetimefacultatif
nullable
itemsobject[]facultatif

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

Par défaut : []
iduuidobligatoire
itemTypestringobligatoire
RECURRINGONE_TIMESURCHARGEDISCOUNTNOTEGROUP
namestringobligatoire
max. 200 caractères
descriptionstringfacultatif
nullable
quantitynumberobligatoire
≥ 0
minQuantitynumberfacultatif

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

Par défaut : nullnullable
maxQuantitynumberfacultatif

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

Par défaut : nullnullable
unitPricestringobligatoire
Motif
discountPercentstringfacultatif
Motifnullable
intervalstringobligatoire
MONTHLYQUARTERLYSEMI_ANNUALYEARLYONE_TIMENONEDAILYWEEKLYTWO_YEARLYTHREE_YEARLY
validFromdatefacultatif
nullable
validUntildatefacultatif
nullable
isActivebooleanobligatoire
sortOrdernumberobligatoire
assetIduuidfacultatif
nullable
serviceTypeIduuidfacultatif
nullable
nextBillingDatedatefacultatif

Next billing date for this specific item

Par défaut : nullnullable
previousBillingDatedatefacultatif

Last time this item was billed

Par défaut : nullnullable
billingSchedulestringfacultatif

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

CONTRACTITEMnull
nullable
billingGroupIdstringfacultatif

Group ID for splitting items across multiple invoices

Par défaut : nullnullable
articleIduuidfacultatif

Optional link to a Codemeta catalog article

nullable
articleNumberstringfacultatif
nullable
isBillOfMaterialbooleanfacultatif

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

nullable
useSubItemPricesbooleanfacultatif

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

nullable
subItemsany[]facultatif
nullable
quantitySourceobjectfacultatif

Dynamic quantity source — resolved at billing time

Par défaut : nullnullable
conditionsobjectfacultatif

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

nullable
surchargeStackingModestringfacultatif

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[]facultatif

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.

Par défaut : []
iduuidfacultatif
nullable
serviceTypeIduuidobligatoire
validFromdatefacultatif
nullable
ratePerHourstringfacultatif
Motifnullable
ratePerKmstringfacultatif
Motifnullable
travelAllowanceobjectfacultatif

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

nullable
ratePerKmstringfacultatif
Motifnullable
flatRatestringfacultatif
Motifnullable
vehicleBaseFeestringfacultatif
Motifnullable
overtimeSurchargesobject[]facultatif

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

Par défaut : []
iduuidobligatoire
namestringobligatoire
1–100 caractères
fromTimestringobligatoire
Motif
toTimestringobligatoire
Motif
daysOfWeeknumber[]obligatoire
éléments uniques
surchargePercentstringobligatoire
Motif
serviceTypeIdsuuid[]facultatif

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

éléments uniquesPar défaut : []
holidayModestringfacultatif

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
validFromdatefacultatif
nullable
validUntildatefacultatif
nullable
serviceRoundingobject[]facultatif

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

Par défaut : []
serviceTypeIduuidobligatoire
roundingMinutesnumberfacultatif
≥ 0nullable
roundingModestringfacultatif
UPDOWNNEAREST
nullable
minimumMinutesnumberfacultatif
≥ 0nullable
billingUnitMinutesnumberfacultatif
≥ 0nullable
remarksobject[]facultatif

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

Par défaut : []
iduuidobligatoire
textstringobligatoire
min. 1 caractères
textHtmlstringfacultatif

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

nullable
mentionsobject[]facultatif

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

Par défaut : []nullable
iduuidobligatoire
typestringobligatoire
userticketasset
labelstringobligatoire
createdAtdatetimeobligatoire
lecture seule
createdByuuidobligatoire
lecture seule
updatedAtdatetimefacultatif
lecture seulenullable
notesstringfacultatif

External notes

nullable
internalNotesstringfacultatif

Internal notes (not visible to customer)

nullable
tagsstring[]facultatif

Contract tags

Par défaut : []
customFieldsobjectfacultatif

Custom fields (tenant-specific)

nullable
linkedRiskIdsstring[]facultatif

Linked risk IDs

Par défaut : []
licensePositionsobject[]facultatif

License contract positions (for LICENSE category)

Par défaut : []
uuidstringobligatoire
typestringobligatoire
STATICDYNAMIC
articleIdstringobligatoire
articleNumberstringobligatoire
titlestringobligatoire
descriptionstringfacultatif
nullable
companyNamestringfacultatif
nullable
quantityoneOfobligatoire
unitPricenumberobligatoire
unchangedUnitPricenumberfacultatif
nullable
manualUnitPricenumberfacultatif

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
discountPercentagenumberobligatoire
pricingDatedatetimefacultatif
nullable
startDatedatefacultatif
nullable
endDatedatefacultatif
nullable
periodstringfacultatif

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

P1YP1Mnull
nullable
factornumberfacultatif
nullable
roundingstringfacultatif
EXACTCEILROUND
nullable
articleTypestringfacultatif
BASICSALES_BILL_OF_MATERIALSTORABLE
nullable
groupNamestringfacultatif
nullable
useSalesBillOfMaterialItemPricesbooleanfacultatif
nullable
salesBillOfMaterialItemsobject[]facultatif
Par défaut : []
uuidstringfacultatif
typestringfacultatif
STATICDYNAMIC
articleIdstringfacultatif
articleNumberstringfacultatif
titlestringfacultatif
descriptionstringfacultatif
nullable
quantityoneOffacultatif
unitPricenumberfacultatif
unchangedUnitPricenumberfacultatif
nullable
discountPercentagenumberfacultatif
nullable
pricingDatedatetimefacultatif
nullable
articleFactornumberfacultatif
nullable
roundingstringfacultatif
EXACTCEILROUND
nullable
factornumberfacultatif
nullable
cancellationPeriodQuantitynumberfacultatif
nullable
cancellationPeriodUnitstringfacultatif
nullable
extensionQuantitynumberfacultatif
nullable
extensionUnitstringfacultatif
nullable
weclappContractIdstringfacultatif
max. 64 caractèresnullable
weclappContractItemIdstringfacultatif
max. 64 caractèresnullable
cancellationNotificationbooleanfacultatif
nullable
cancellationNotificationQuantitynumberfacultatif
nullable
cancellationNotificationUnitstringfacultatif
nullable
lastCancellationNotificationDatedatetimefacultatif
nullable
notificationChannelsstring[]facultatif
nullable
notificationRecipientsobject[]facultatif
nullable
typestringobligatoire
USERTEAMEMAIL
valuestringobligatoire
notificationTargetsobjectfacultatif
nullable
inAppobjectfacultatif
nullable
recipientsobject[]facultatif
nullable
typestringobligatoire
USERTEAMEMAIL
valuestringobligatoire
prioritystringfacultatif
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringfacultatif
nullable
emailobjectfacultatif
nullable
recipientsobject[]facultatif
nullable
typestringobligatoire
USERTEAMEMAIL
valuestringobligatoire
prioritystringfacultatif
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringfacultatif
nullable
taskobjectfacultatif
nullable
recipientsobject[]facultatif
nullable
typestringobligatoire
USERTEAMEMAIL
valuestringobligatoire
prioritystringfacultatif
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringfacultatif
nullable
opportunityobjectfacultatif
nullable
recipientsobject[]facultatif
nullable
typestringobligatoire
USERTEAMEMAIL
valuestringobligatoire
prioritystringfacultatif
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringfacultatif
nullable
groupNamesobject[]facultatif

Group names for license contract positions

Par défaut : []
uuidstringobligatoire
titlestringobligatoire
lastInvoicedAtdatetimefacultatif

Timestamp of last billing/invoice creation

nullable
licenseBillingClaimobjectfacultatif

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

lecture seulenullable
runIdstringfacultatif
unitKeystringfacultatif
claimedAtdatetimefacultatif
billingConfigobjectfacultatif

Automatic billing configuration

Par défaut : nullnullable
nextBillingDatedatefacultatif

Next billing date (calculated from lastInvoicedAt + billingCycle)

Par défaut : nullnullable
billingFrequencystringfacultatif

Billing frequency for license contracts

monatlichjährlichno_billing
nullable
weclappCustomerIdstringfacultatif

weclapp ERP customer ID

nullable
weclappContractRefsobject[]facultatif

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

max. 200 élémentsnullable
idstringobligatoire
1–64 caractères
contractNumberstringfacultatif
max. 64 caractèreslecture seulenullable
productsobject[]facultatif

Product logos for display

Par défaut : []
namestringobligatoire
imagestringfacultatif
nullable
initialsstringobligatoire
linkedDocumentsobject[]facultatif

Linked documents (tickets, etc.)

Par défaut : []
typestringobligatoire
idoneOfobligatoire
titlestringobligatoire
descriptionstringfacultatif
nullable
linkedEntitiesobject[]facultatif

Linked entities (assets, tickets, etc.)

Par défaut : []nullable
entityTypestringobligatoire
partyassetticketcontractprojectuseropportunity
entityIduuidobligatoire
rolestringobligatoire
ticketRulesobject[]facultatif

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.

Par défaut : []
iduuidobligatoire

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

ruleIduuidobligatoire

The contract_ticket_rule this activation executes.

positionIdstringfacultatif

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

Par défaut : nullnullable
positionSourcestringfacultatif

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

ITEMLICENSEnull
Par défaut : nullnullable
startDatedateobligatoire

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

nextDueDatedateobligatoire

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

nextCreateDatedateobligatoire

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

lastTicketDatedatefacultatif

Due date of the most recently generated ticket.

Par défaut : nullnullable
lastTicketIdstringfacultatif

Id of the most recently generated ticket.

MotifPar défaut : nullnullable
isActivebooleanobligatoire

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

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/contracts — Liste, paginée et filtrable
  • GET /api/v1/contracts/<id> — Une entité
  • POST /api/v1/contracts — Créer
  • PATCH /api/v1/contracts/<id> — Mise à jour partielle
  • DELETE /api/v1/contracts/<id> — Suppression logique
  • GET /api/v1/contracts/<id>/timeline — Audit et activités

Recherche