API · v1 · stable
CODEMETA OSDeveloper Center
EN
Open console
Entity · contracts

Contract Schema

Schema ID
contract
Collection
contracts
Permissions
  • Readcontract_view
  • Createcontract_create
  • Editcontract_edit
  • Deletecontract_delete

Fields

Contract Schema

contracts4 permissions

Schema for validating contract entities

namestringrequired

Contract name

1–200 characters
descriptionstringoptional

Contract description

nullable
descriptionHtmlstringoptional

Rich text HTML version of the contract description

nullable
contractTypeIduuidoptional

Contract type UUID

nullable
contractCategorystringrequired

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
partyIduuidrequired

Associated party UUID

contactPartyIduuidoptional

Associated contact person UUID

nullable
deliveryAddressIdstringoptional

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

max 64 charactersnullable
billingAddressIdstringoptional

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

max 64 charactersnullable
parentContractIduuidoptional

Parent contract UUID for sub-contracts

nullable
statusstringrequired

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
startDatedaterequired

Contract start date (YYYY-MM-DD)

endDatedateoptional

Contract end date (YYYY-MM-DD)

nullable
cancellationDeadlinedateoptional

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

read-onlynullable
nextNotificationDatedateoptional

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

read-onlynullable
nextRenewalDatedateoptional

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

read-onlynullable
cancellationDeadlineSourcestringoptional
read-onlynullable
nextNotificationSourcestringoptional
read-onlynullable
nextRenewalSourcestringoptional
read-onlynullable
contractDatedatetimeoptional

Contract signing date (from legacy Toast import)

nullable
activatedAtdatetimeoptional

Activation timestamp

nullable
cancelledAtdatetimeoptional

Cancellation timestamp

nullable
expiredAtdatetimeoptional

Expiration timestamp

nullable
cancellationobjectoptional
nullable
noticePeriodDaysnumberrequired
≥ 0
extensionDaysnumberoptional

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

≥ 0
extensionMonthsnumberoptional

deprecated — migrated to extensionDays; kept for backward compatibility

≥ 0
autoRenewbooleanrequired
nextPossibleDatedateoptional
nullable
cancellationRequestedAtdatetimeoptional
nullable
cancellationRequestedByuuidoptional
nullable
cancellationReasonstringoptional
nullable
cancellationEffectiveDatedateoptional
nullable
softframestringoptional

Reference frame for cancellation period (weclapp: cancellationPeriodSoftframe)

CONTRACT_ENDEND_OF_MONTHEND_OF_QUARTEREND_OF_CALENDAR_YEAREND_OF_CONTRACT_YEARnull
Default: nullnullable
notificationobjectoptional
nullable
enabledbooleanoptional
nullable
channelsstring[]optional
nullable
recipientsobject[]optional
nullable
typestringrequired
USERTEAMEMAIL
valuestringrequired
targetsobjectoptional
nullable
inAppobjectoptional
nullable
recipientsobject[]optional
nullable
typestringrequired
USERTEAMEMAIL
valuestringrequired
prioritystringoptional
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringoptional
nullable
emailobjectoptional
nullable
recipientsobject[]optional
nullable
typestringrequired
USERTEAMEMAIL
valuestringrequired
prioritystringoptional
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringoptional
nullable
taskobjectoptional
nullable
recipientsobject[]optional
nullable
typestringrequired
USERTEAMEMAIL
valuestringrequired
prioritystringoptional
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringoptional
nullable
opportunityobjectoptional
nullable
recipientsobject[]optional
nullable
typestringrequired
USERTEAMEMAIL
valuestringrequired
prioritystringoptional
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringoptional
nullable
leadQuantitynumberoptional
≥ 0nullable
leadUnitstringoptional
DAYWEEKMONTHYEARnull
nullable
lastNotifiedAtdatetimeoptional
nullable
monthlyRevenuestringoptional

Monthly revenue as decimal string

Patternnullable
currencyCodestringrequired

Three-letter currency code (ISO 4217)

Pattern
billingCyclestringoptional

Billing cycle

MONTHLYQUARTERLYSEMI_ANNUALYEARLYONE_TIMENONE
nullable
paymentTermsDaysnumberoptional

Payment terms in days

≥ 0nullable
priceEscalationobjectoptional
nullable
typestringrequired
FIXED_PERCENTCPI_INDEXMANUAL
percentPerYearstringoptional
Patternnullable
effectiveMonthnumberoptional
1 – 12nullable
lastAppliedAtdatetimeoptional
nullable
serviceTargetProfileIduuidoptional

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

nullable
inlineTargetsanyoptional
defaultCoverageanyoptional
scopeobjectoptional
nullable
coverageTypestringrequired

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

ALL_ASSETSASSIGNED_ONLYCUSTOM
coverageModestringoptional

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[]optional
Default: []
excludedLocationIdsuuid[]optional
Default: []
excludedTechnicianIdsuuid[]optional
Default: []
excludedTicketTypeKeysstring[]optional

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

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[]optional
Default: []
includedLocationIdsuuid[]optional
Default: []
includedTechnicianIdsuuid[]optional
Default: []
includedTicketTypeKeysstring[]optional

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[]optional
Default: []
technicianUserIdsuuid[]optional
Default: []
technicianOrgUnitIdsuuid[]optional
Default: []
locationIdsuuid[]optional
Default: []
excludeAfterHoursbooleanoptional
excludeTravelbooleanoptional
assignedToIduuidoptional

Assigned user UUID

nullable
orgUnitIduuidoptional

Associated org unit UUID

nullable
amendmentOfuuidoptional

Original contract UUID this amends

nullable
amendmentNumbernumberoptional

Amendment sequence number

≥ 0nullable
templateIduuidoptional

Template contract UUID this was created from

nullable
releasedServiceTypeIdsuuid[]optional

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

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

Default: []
iduuidrequired
assignmentTypestringrequired

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
assetIduuidoptional
nullable
assetTypeKeystringoptional

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

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: []
partyIduuidoptional
nullable
locationDescriptionstringoptional
nullable
locationIduuidoptional

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
serviceTypeIduuidoptional
nullable
itemIduuidoptional

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
monthlyPricestringoptional
Patternnullable
discountPercentstringoptional
Patternnullable
stockingCoststringoptional
Patternnullable
targetsOverrideanyoptional
coverageanyoptional
responseTimeMinutesnumberoptional

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
resolutionTimeMinutesnumberoptional

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
validFromdateoptional
nullable
validUntildateoptional
nullable
isActivebooleanrequired
sortOrdernumberrequired
notesstringoptional
nullable
contingentsobject[]optional

Contract contingents (prepaid hours, monetary budgets, trips)

Default: []
iduuidrequired
contingentTypestringrequired
HOURSMONETARYTRIPS
labelstringrequired
totalAmountstringrequired
Pattern
usedAmountstringrequired
Pattern
unitstringrequired
HOURSMINUTESEURTRIPS
periodTypestringrequired
MONTHLYQUARTERLYYEARLYONE_TIMEUNLIMITED
periodStartdaterequired
periodEnddateoptional
nullable
carryOverobjectrequired
typestringrequired
NONEFULLCAPPEDPERCENT
maxCarryOverstringoptional
Patternnullable
maxCarryOverPercentnumberoptional
nullable
expiresAfterPeriodsnumberoptional
nullable
overagePolicystringrequired
BLOCKALLOWALLOW_WITH_SURCHARGENOTIFY
overageSurchargePercentstringoptional
Patternnullable
overageCapAmountstringoptional
Patternnullable
autoRefillobjectoptional
nullable
enabledbooleanoptional
schedulestringoptional
PERIOD_STARTMANUALTHRESHOLD
thresholdPercentnumberoptional
nullable
refillAmountstringoptional
Pattern
conversionRatestringoptional
Patternnullable
fallbackContractIduuidoptional
nullable
fallbackPrioritynumberoptional
1 – 9nullable
isActivebooleanrequired
exhaustedAtdatetimeoptional
nullable
itemsobject[]optional

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

Default: []
iduuidrequired
itemTypestringrequired
RECURRINGONE_TIMESURCHARGEDISCOUNTNOTEGROUP
namestringrequired
max 200 characters
descriptionstringoptional
nullable
quantitynumberrequired
≥ 0
minQuantitynumberoptional

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

Default: nullnullable
maxQuantitynumberoptional

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

Default: nullnullable
unitPricestringrequired
Pattern
discountPercentstringoptional
Patternnullable
intervalstringrequired
MONTHLYQUARTERLYSEMI_ANNUALYEARLYONE_TIMENONEDAILYWEEKLYTWO_YEARLYTHREE_YEARLY
validFromdateoptional
nullable
validUntildateoptional
nullable
isActivebooleanrequired
sortOrdernumberrequired
assetIduuidoptional
nullable
serviceTypeIduuidoptional
nullable
nextBillingDatedateoptional

Next billing date for this specific item

Default: nullnullable
previousBillingDatedateoptional

Last time this item was billed

Default: nullnullable
billingSchedulestringoptional

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

CONTRACTITEMnull
nullable
billingGroupIdstringoptional

Group ID for splitting items across multiple invoices

Default: nullnullable
articleIduuidoptional

Optional link to a Codemeta catalog article

nullable
articleNumberstringoptional
nullable
isBillOfMaterialbooleanoptional

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

nullable
useSubItemPricesbooleanoptional

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

nullable
subItemsany[]optional
nullable
quantitySourceobjectoptional

Dynamic quantity source — resolved at billing time

Default: nullnullable
conditionsobjectoptional

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

nullable
surchargeStackingModestringoptional

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

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: []
iduuidoptional
nullable
serviceTypeIduuidrequired
validFromdateoptional
nullable
ratePerHourstringoptional
Patternnullable
ratePerKmstringoptional
Patternnullable
travelAllowanceobjectoptional

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

nullable
ratePerKmstringoptional
Patternnullable
flatRatestringoptional
Patternnullable
vehicleBaseFeestringoptional
Patternnullable
overtimeSurchargesobject[]optional

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: []
iduuidrequired
namestringrequired
1–100 characters
fromTimestringrequired
Pattern
toTimestringrequired
Pattern
daysOfWeeknumber[]required
unique items
surchargePercentstringrequired
Pattern
serviceTypeIdsuuid[]optional

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

unique itemsDefault: []
holidayModestringoptional

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
validFromdateoptional
nullable
validUntildateoptional
nullable
serviceRoundingobject[]optional

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

Default: []
serviceTypeIduuidrequired
roundingMinutesnumberoptional
≥ 0nullable
roundingModestringoptional
UPDOWNNEAREST
nullable
minimumMinutesnumberoptional
≥ 0nullable
billingUnitMinutesnumberoptional
≥ 0nullable
remarksobject[]optional

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

Default: []
iduuidrequired
textstringrequired
min 1 characters
textHtmlstringoptional

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

nullable
mentionsobject[]optional

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
iduuidrequired
typestringrequired
userticketasset
labelstringrequired
createdAtdatetimerequired
read-only
createdByuuidrequired
read-only
updatedAtdatetimeoptional
read-onlynullable
notesstringoptional

External notes

nullable
internalNotesstringoptional

Internal notes (not visible to customer)

nullable
tagsstring[]optional

Contract tags

Default: []
customFieldsobjectoptional

Custom fields (tenant-specific)

nullable
linkedRiskIdsstring[]optional

Linked risk IDs

Default: []
licensePositionsobject[]optional

License contract positions (for LICENSE category)

Default: []
uuidstringrequired
typestringrequired
STATICDYNAMIC
articleIdstringrequired
articleNumberstringrequired
titlestringrequired
descriptionstringoptional
nullable
companyNamestringoptional
nullable
quantityoneOfrequired
unitPricenumberrequired
unchangedUnitPricenumberoptional
nullable
manualUnitPricenumberoptional

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
discountPercentagenumberrequired
pricingDatedatetimeoptional
nullable
startDatedateoptional
nullable
endDatedateoptional
nullable
periodstringoptional

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

P1YP1Mnull
nullable
factornumberoptional
nullable
roundingstringoptional
EXACTCEILROUND
nullable
articleTypestringoptional
BASICSALES_BILL_OF_MATERIALSTORABLE
nullable
groupNamestringoptional
nullable
useSalesBillOfMaterialItemPricesbooleanoptional
nullable
salesBillOfMaterialItemsobject[]optional
Default: []
uuidstringoptional
typestringoptional
STATICDYNAMIC
articleIdstringoptional
articleNumberstringoptional
titlestringoptional
descriptionstringoptional
nullable
quantityoneOfoptional
unitPricenumberoptional
unchangedUnitPricenumberoptional
nullable
discountPercentagenumberoptional
nullable
pricingDatedatetimeoptional
nullable
articleFactornumberoptional
nullable
roundingstringoptional
EXACTCEILROUND
nullable
factornumberoptional
nullable
cancellationPeriodQuantitynumberoptional
nullable
cancellationPeriodUnitstringoptional
nullable
extensionQuantitynumberoptional
nullable
extensionUnitstringoptional
nullable
weclappContractIdstringoptional
max 64 charactersnullable
weclappContractItemIdstringoptional
max 64 charactersnullable
cancellationNotificationbooleanoptional
nullable
cancellationNotificationQuantitynumberoptional
nullable
cancellationNotificationUnitstringoptional
nullable
lastCancellationNotificationDatedatetimeoptional
nullable
notificationChannelsstring[]optional
nullable
notificationRecipientsobject[]optional
nullable
typestringrequired
USERTEAMEMAIL
valuestringrequired
notificationTargetsobjectoptional
nullable
inAppobjectoptional
nullable
recipientsobject[]optional
nullable
typestringrequired
USERTEAMEMAIL
valuestringrequired
prioritystringoptional
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringoptional
nullable
emailobjectoptional
nullable
recipientsobject[]optional
nullable
typestringrequired
USERTEAMEMAIL
valuestringrequired
prioritystringoptional
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringoptional
nullable
taskobjectoptional
nullable
recipientsobject[]optional
nullable
typestringrequired
USERTEAMEMAIL
valuestringrequired
prioritystringoptional
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringoptional
nullable
opportunityobjectoptional
nullable
recipientsobject[]optional
nullable
typestringrequired
USERTEAMEMAIL
valuestringrequired
prioritystringoptional
LOWNORMALHIGHCRITICALnull
nullable
contactPartyIdstringoptional
nullable
groupNamesobject[]optional

Group names for license contract positions

Default: []
uuidstringrequired
titlestringrequired
lastInvoicedAtdatetimeoptional

Timestamp of last billing/invoice creation

nullable
licenseBillingClaimobjectoptional

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

read-onlynullable
runIdstringoptional
unitKeystringoptional
claimedAtdatetimeoptional
billingConfigobjectoptional

Automatic billing configuration

Default: nullnullable
nextBillingDatedateoptional

Next billing date (calculated from lastInvoicedAt + billingCycle)

Default: nullnullable
billingFrequencystringoptional

Billing frequency for license contracts

monatlichjährlichno_billing
nullable
weclappCustomerIdstringoptional

weclapp ERP customer ID

nullable
weclappContractRefsobject[]optional

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

max 200 itemsnullable
idstringrequired
1–64 characters
contractNumberstringoptional
max 64 charactersread-onlynullable
productsobject[]optional

Product logos for display

Default: []
namestringrequired
imagestringoptional
nullable
initialsstringrequired
linkedDocumentsobject[]optional

Linked documents (tickets, etc.)

Default: []
typestringrequired
idoneOfrequired
titlestringrequired
descriptionstringoptional
nullable
linkedEntitiesobject[]optional

Linked entities (assets, tickets, etc.)

Default: []nullable
entityTypestringrequired
partyassetticketcontractprojectuseropportunity
entityIduuidrequired
rolestringrequired
ticketRulesobject[]optional

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: []
iduuidrequired

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

ruleIduuidrequired

The contract_ticket_rule this activation executes.

positionIdstringoptional

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

Default: nullnullable
positionSourcestringoptional

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

ITEMLICENSEnull
Default: nullnullable
startDatedaterequired

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

nextDueDatedaterequired

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

nextCreateDatedaterequired

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

lastTicketDatedateoptional

Due date of the most recently generated ticket.

Default: nullnullable
lastTicketIdstringoptional

Id of the most recently generated ticket.

PatternDefault: nullnullable
isActivebooleanrequired

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

Standard endpoints

This resource follows the platform's generic CRUD contract. Read the conventions for pagination, idempotency, optimistic locking and audit. The most important endpoints:

  • GET /api/v1/contracts — List, paginated + filterable
  • GET /api/v1/contracts/<id> — Single entity
  • POST /api/v1/contracts — Create
  • PATCH /api/v1/contracts/<id> — Partial update
  • DELETE /api/v1/contracts/<id> — Soft delete
  • GET /api/v1/contracts/<id>/timeline — Audit + activities

Search