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

Opportunity Schema

Schema-ID
opportunity
Collection
opportunities
Permissions
  • Lezenopportunity_view
  • Aanmakenopportunity_create
  • Wijzigenopportunity_edit
  • Verwijderenopportunity_delete

Velden

Opportunity Schema

opportunities4 permissions

Schema for validating sales opportunity entities

titlestringvereist

Opportunity title

1–300 tekens
descriptionstringoptioneel

Detailed description (plain text)

max. 5000 tekensnullable
descriptionHtmlstringoptioneel

Rich text HTML version of the opportunity description

nullable
statusstringvereist

Pipeline status (tenant-configurable)

prioritystringoptioneel

Opportunity priority level

LOWNORMALHIGHCRITICAL
Default: "NORMAL"
pipelineIduuidoptioneel

Sales pipeline UUID (references sales_pipelines collection)

nullable
partyIduuidoptioneel

Customer party UUID

nullable
partyAddressIduuidoptioneel

Specific site/address of the associated party

Default: nullnullable
contactPartyIduuidoptioneel

Contact person UUID

nullable
assignedToIduuidoptioneel

Assigned sales rep user UUID

nullable
orgUnitIduuidoptioneel

Organization unit UUID

nullable
valuestringoptioneel

Deal value / CLV (Decimal128 as string, synced with customerLifetimeValue)

Patternnullable
onetimeRevenuestringoptioneel

One-time revenue (hardware, projects, migrations)

Patternnullable
monthlyRecurringstringoptioneel

Monthly recurring revenue (MRR)

Patternnullable
contractDurationMonthsnumberoptioneel

Minimum contract duration in months

1 – 120nullable
estimatedLifetimeMonthsnumberoptioneel

Estimated customer lifetime in months (manual override; auto-calculated from party churn data or tenant default if null)

1 – 600nullable
annualRecurringRevenuestringoptioneel

ARR = MRR × 12

Patternnullable
totalContractValuestringoptioneel

TCV = onetime + (MRR × contractDurationMonths)

Patternnullable
customerLifetimeValuestringoptioneel

CLV = onetime + (MRR × estimatedLifetimeMonths)

Patternnullable
weightedValuestringoptioneel

Weighted value = CLV × (probability / 100)

Patternnullable
currencyCodestringoptioneel

ISO 4217 currency code

max. 3 tekensDefault: "EUR"
probabilitynumberoptioneel

Win probability in percent

0 – 100nullable
expectedCloseDatedateoptioneel

Expected close date (YYYY-MM-DD)

nullable
dueDatedateoptioneel

Due date — act on the opportunity by this day (YYYY-MM-DD)

nullable
sourcestringoptioneel

Lead source (references opportunity_sources name)

max. 100 tekensnullable
contractIduuidoptioneel

Linked contract UUID

nullable
projectIduuidoptioneel

Linked project UUID

nullable
lostReasonstringoptioneel

Reason for losing the opportunity

max. 2000 tekensnullable
mergedIntoOpportunityIduuidoptioneel

If set, this opportunity was merged into the referenced opportunity

nullable
mergedIntoOpportunityNumberstringoptioneel

Opportunity number of the opportunity this was merged into (denormalized for display)

nullable
tagsstring[]optioneel

Tags

Default: []nullable
attachmentsobject[]optioneel
Default: []nullable
s3Keystringvereist
fileNamestringvereist
mimeTypestringvereist
sizeBytesnumbervereist
uploadedAtdatetimevereist
uploadedByuuidvereist
isInternalbooleanvereist
linkedEntitiesobject[]optioneel
Default: []nullable
entityTypestringvereist
partyassetticketprojectuseropportunityproposalarticletaskcomplaintproblem
entityIduuidvereist
rolestringvereist
convertedToobjectoptioneel

Set when this opportunity was converted to another entity (ticket). The opportunity is kept — not deleted — so linked records stay reachable. Written only by the conversion routes.

read-onlynullable
entityTypestringvereist
ticketopportunitycomplaint
entityIduuidvereist
convertedAtdatetimeoptioneel
nullable
convertedBystringoptioneel
nullable
convertedFromobjectoptioneel

Set when this opportunity was created by converting another entity (ticket). Written only by the conversion routes.

read-onlynullable
entityTypestringvereist
ticketopportunitycomplaint
entityIduuidvereist
convertedAtdatetimeoptioneel
nullable
convertedBystringoptioneel
nullable
lineItemsobject[]optioneel
Default: []nullable
iduuidvereist
articleIduuidoptioneel

Article UUID (null = free-text manual position)

nullable
articleNamestringoptioneel

Denormalized article name at request time

nullable
articleNumberstringoptioneel

Denormalized article number at request time

nullable
quantitystringvereist

Requested quantity

Pattern
unitstringoptioneel

Unit label snapshot from the article (e.g. "Stk", "h")

max. 100 tekensnullable
unitPricestringoptioneel

Quoted unit price (null = price on request)

Patternnullable
billingIntervalstringoptioneel

Billing interval — drives MRR/onetime auto-calculation. Null is treated as ONE_TIME.

nullONE_TIMEMONTHLYYEARLY
nullable
currencyCodestringoptioneel

ISO 4217 currency code

max. 3 tekensnullable
sourcestringoptioneel

Origin of the line item

nullportalmanualproposalsales_orderai
nullable
optionalbooleanoptioneel

Optional position — offered, but not counted into MRR/onetime. Becomes an optional quotation position (weclapp quotationItem.optional). Missing/null = false.

nullable
requestedAtdatetimeoptioneel

When the article was added to the opportunity

nullable
notestringoptioneel

Per-item note (e.g. customer remark)

max. 1000 tekensnullable
alternativesobject[]optioneel

Alternative positions offered alongside this line (e.g. cheaper / premium variant). Not aggregated into MRR/onetime.

Default: []nullable
iduuidvereist
articleIduuidoptioneel
nullable
articleNamestringoptioneel
nullable
articleNumberstringoptioneel
nullable
quantitystringoptioneel
Patternnullable
unitstringoptioneel
max. 100 tekensnullable
unitPricestringoptioneel
Patternnullable
billingIntervalstringoptioneel
nullONE_TIMEMONTHLYYEARLY
nullable
currencyCodestringoptioneel
max. 3 tekensnullable
notestringoptioneel
max. 1000 tekensnullable
risksobject[]optioneel

Internal calculation risks of the offer (extra effort, delivery, price, scope)

max. 12 itemsDefault: []nullable
iduuidvereist
titlestringvereist
1–120 tekens
detailstringoptioneel
max. 500 tekensnullable
effectstringoptioneel
nullhourspricedeliveryscopeother
nullable
sourcestringoptioneel
nullmanualai
nullable
assumptionsstring[]optioneel

Customer-facing assumptions / scope boundaries the offer is based on (one sentence each)

max. 12 itemsDefault: []nullable
statusChangedAtdatetimeoptioneel

Timestamp of the last status change (drives time_in_status / time_to_status targets, ADR 0117a)

nullable
inboundReplyAckedAtdatetimeoptioneel

Timestamp at which the latest inbound prospect email was acknowledged as "handled, no reply needed". Clears the awaiting-reply badge when >= the last inbound email time; a newer inbound email re-arms the badge. Mirrors ticket.inboundReplyAckedAt.

nullable
inboundReplyAckedBystringoptioneel

User who acknowledged the latest inbound prospect email (see inboundReplyAckedAt).

nullable
awaitingReplyPinnedAtdate-time[]optioneel

Timestamps of unanswered inbound customer emails that were carried over by a merge and that the standard computation can no longer see. The awaiting-reply badge derives from "inbound emails newer than the last OUTBOUND email of the record" — after a merge that comparison spans two formerly independent conversations, so a reply in one thread silently marks an open question in the other as answered. The merge therefore pins the affected timestamps here; the badge counts them in addition to the computed ones. Cleared by ack-inbound-reply. Server-managed (see merge.service.ts).

nullable
snoozedUntildatetimeoptioneel

Opportunity is snoozed until this timestamp; hidden from active pipeline views

nullable
snoozedByuuidoptioneel

User who snoozed the opportunity

nullable
snoozedAtdatetimeoptioneel

When the opportunity was snoozed

nullable
snoozeReasonstringoptioneel

Reason provided when snoozing

max. 500 tekensnullable
snoozeFollowUpTaskIduuidoptioneel

ID of the follow-up task created at snooze time (due at snoozedUntil). Cleared on unsnooze.

nullable
snoozeWokenAtdatetimeoptioneel

Set by the snooze-wakeup worker when snoozedUntil passed. snoozedUntil/snoozeReason stay in place so the board can flag the opportunity as "Wiedervorlage fällig" (red) until a user acts on it; it also makes the wakeup fire exactly once. Cleared on snooze/unsnooze. Absent on documents predating the field = never woken (no backfill needed).

nullable
targetsobject[]optioneel

Denormalized active service targets (ADR 0117a)

nullable
stageIdstringvereist
stageKindstringvereist
time_to_first_responsetime_in_statustime_to_statustime_to_close
stageStatusstringoptioneel
nullable
stageLabelstringoptioneel
nullable
bindingnessstringvereist
contractualinternal
deadlinedatetimevereist
breachedAtdatetimeoptioneel
nullable
completedAtdatetimeoptioneel
nullable
profileIduuidvereist
sourceRefobjectoptioneel

Provenance marker for the source system a weclapp-born opportunity was imported from (ADR 0220). The weclapp sync anchor lives in externalReferences[system="weclapp"], NOT here.

Default: nullnullable
systemstringvereist

Source system identifier (e.g. weclapp)

idstringvereist

Entity ID in the source system

externalReferencesobject[]optioneel

Cross-system linking refs (e.g. weclapp). The weclapp entry is the identity anchor for the bidirectional opportunity sync (ADR 0220). Read/written by the inbound + outbound sync workers and indexed for duplicate prevention.

Default: []nullable
systemstringvereist
max. 100 tekens
externalIdstringvereist
max. 200 tekens
externalVersionstringoptioneel
nullable
externalNumberstringoptioneel
max. 200 tekensnullable
syncedAtdatetimeoptioneel
nullable
lastSyncCorrelationIdstringoptioneel
nullable
lastInboundHashstringoptioneel
max. 64 tekensnullable
lastOutboundHashstringoptioneel
max. 64 tekensnullable

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

Zoeken