API · v1 · stabil
CODEMETA OSDeveloper Center
Konsole öffnen
Entity · parties

Party Schema

Schema-ID
party
Collection
parties
Permissions
  • Lesenparty_view
  • Anlegenparty_create
  • Ändernparty_edit
  • Löschenparty_delete

Felder

Party Schema

parties4 Permissions

Schema for validating party entities

partyTypestringerforderlich

Type of party

ORGANIZATIONPERSON
namestringerforderlich

Party name

1–200 Zeichen
displayNamestringerforderlich

Display name

1–200 Zeichen
abbreviationstringoptional

Unique ALL CAPS abbreviation (e.g. ITF)

2–10 ZeichenPatternnullable
isCustomerbooleanoptional

Whether party is a customer

Default: falsenullable
isProspectbooleanoptional

Whether party is a prospect (Interessent) — potential customer not yet converted

Default: falsenullable
isSupplierbooleanoptional

Whether party is a supplier

Default: falsenullable
isApproverbooleanoptional

Whether this person may approve customer-portal orders (used by approval-policy supervisor-chain resolution).

Default: falsenullable
createdViaInvitationbooleanoptional

True when this PERSON party was created solely as part of a portal-invite flow (not via the Kontakte-Tab). Used by the revoke handler to clean up stub persons whose only purpose was the invitation, when that invitation gets cancelled before acceptance.

Default: falsenullable
approvalLimitnumberoptional

Maximum order net total (EUR) this person may approve. null = unlimited. Only meaningful when isApprover=true.

≥ 0nullable
addressesobject[]optional
Default: []nullable
_iduuidoptional

Address ID (UUIDv7, auto-generated)

read-only
sourceRefobjectoptional

Origin of this address when it represents an entity that exists as a separate record in the source system (e.g. a TANSS branch imported as an address). Typed-prefixed like party sourceRefs: `company:<id>`.

nullable
systemstringerforderlich
max 50 Zeichen
idstringerforderlich
max 200 Zeichen
namestringoptional

Site name (e.g. Niederlassung Berlin)

max 200 Zeichennullable
typestringoptional

Address type

MAINBRANCHDELIVERYBILLINGDUNNINGOTHER
Default: "MAIN"
labelstringoptional

Custom label (e.g. Standort Berlin)

max 100 Zeichennullable
streetstringerforderlich
1–200 Zeichen
zipCodestringerforderlich
1–20 Zeichen
citystringerforderlich
1–100 Zeichen
statestringoptional
max 100 Zeichennullable
countryCodestringerforderlich

Two-letter country code (ISO 3166-1 alpha-2)

Pattern
latitudenumberoptional

GPS latitude (WGS84)

-90 – 90nullable
longitudenumberoptional

GPS longitude (WGS84)

-180 – 180nullable
invoiceReferencestringoptional

Free reference/SAP number for this address (e.g. customer's own supplier number). Printed on invoices when showInvoiceReference is true.

max 100 Zeichennullable
showInvoiceReferencebooleanoptional

Whether invoiceReference is printed on invoices using this address.

Default: false
contactChannelsobject[]optional
Default: []nullable
typestringerforderlich
PHONEMOBILEEMAILFAXURLOTHER
valuestringerforderlich
1–255 Zeichen
labelstringoptional
max 50 Zeichennullable
isPrimarybooleanoptional
Default: false
purposesstring[]optional

Designated purposes for this contact channel (e.g. invoice emails, IT emails)

Default: []nullable
isPartnerbooleanoptional

Whether party is a partner

Default: falsenullable
parentPartyIduuidoptional

Parent ORGANIZATION party (corporate group hierarchy). Must be null on PERSON parties — see ADR 0098.

nullable
partyAddressIduuidoptional

Address ID at the parent organization where this person is located

Default: nullnullable
websitestringoptional

Website URL

max 500 Zeichennullable
businessHoursobjectoptional

Customer business/opening hours (Geschäftszeiten)

nullable
weeklyScheduleobjectoptional

Opening hours per weekday. Keys: mon,tue,wed,thu,fri,sat,sun. Values: array of {start,end} time slots in HH:MM format. Same shape as business_hours_profile.weeklySchedule.

nullable
monobject[]optional
nullable
startstringerforderlich
Pattern
endstringerforderlich
Pattern
tueobject[]optional
nullable
startstringerforderlich
Pattern
endstringerforderlich
Pattern
wedobject[]optional
nullable
startstringerforderlich
Pattern
endstringerforderlich
Pattern
thuobject[]optional
nullable
startstringerforderlich
Pattern
endstringerforderlich
Pattern
friobject[]optional
nullable
startstringerforderlich
Pattern
endstringerforderlich
Pattern
satobject[]optional
nullable
startstringerforderlich
Pattern
endstringerforderlich
Pattern
sunobject[]optional
nullable
startstringerforderlich
Pattern
endstringerforderlich
Pattern
notestringoptional

Free-text note (e.g. "Mittagspause 12–13 Uhr", "Notdienst 24/7")

max 500 Zeichennullable
taxIdstringoptional

Steuernummer (locally issued by Finanzamt, e.g. "12/345/67890"). 10–15 digits, optional slashes; whitespace must be stripped client-side. For the EU VAT ID use vatId instead.

max 20 ZeichenPatternnullable
vatIdstringoptional

USt-IdNr. / EU VAT identification number (ISO 3166-1 alpha-2 country code + identifier, e.g. "DE123456789"). Must be normalized (uppercase, no whitespace/dots/dashes) before persisting; landesspezifische Format-Validität wird über @codemeta/shared `isValidVatId` zusätzlich am Client geprüft.

max 20 ZeichenPatternnullable
notesstringoptional

Free-text notes

max 5000 Zeichennullable
firstNamestringoptional

First name (for PERSON type)

max 100 Zeichennullable
lastNamestringoptional

Last name (for PERSON type)

max 100 Zeichennullable
salutationstringoptional

Salutation (for PERSON type)

HerrFrauDivers
nullable
jobTitlestringoptional

Job title (for PERSON type)

max 200 Zeichennullable
preferredLanguagestringoptional

Preferred communication language (ISO 639-1, for PERSON type)

aaabaeafakamanarasavayazbabebgbhbibmbnbo
nullable
additionalLanguagesstring[]optional

Additional communication languages (ISO 639-1, for PERSON type)

Default: []
postResolutionContactPreferencestringoptional

How this party wants to be reached after a ticket is resolved (CALL | MESSAGE | NONE; null = not specified). Set on a PERSON for that contact, or on an ORGANIZATION as the default for its contacts; a PERSON value overrides the company default.

CALLMESSAGENONEnull
nullable
customerNumberstringoptional

Customer number

max 50 Zeichennullable
datevDebitorenkontostringoptional

Stable DATEV-Debitorenkontonummer (assigned on first DATEV export, persisted for subsequent exports)

max 10 Zeichenread-onlynullable
datevKreditorenkontostringoptional

Stable DATEV-Kreditorenkontonummer (assigned when this party is referenced from a vendor invoice)

max 10 Zeichenread-onlynullable
supplierNumberstringoptional

Supplier number (Lieferantennummer)

max 50 Zeichennullable
responsibleUserIduuidoptional

Account manager / responsible user (synced with weclapp)

nullable
hasOwnResponsibleUserbooleanoptional

PERSON only: true = AM is curated on the person directly; false = AM is derived from the linked organizations via party_relationships. ORGANIZATION: ignored. Documents lacking this field are treated at read time as (responsibleUserId != null), preserving pre-existing data on live tenants.

Default: false
inheritedResponsibleUserIdsuuid[]optional

PERSON + hasOwnResponsibleUser=false only: distinct account managers of all linked organizations (driven by recomputePersonResponsibleUser). Server-managed — not writable via the API. Empty array otherwise.

Default: []read-only
teamIduuidoptional

Primary technical team (org unit). Automatically mirrored into assignedOrgUnitIds so the team gains access; secondary teams may be added directly via the team management page (ADR 0124, revised).

nullable
assignedOrgUnitIdsuuid[]optional

All org units (teams) that have access to this party. Drives the team_member data-scope and the SpiceDB assigned_org_unit relation. Contains teamId plus any extra teams granted access via the team management page.

Default: []
hasOwnTeambooleanoptional

PERSON only: true = primary technical team (teamId) is curated on the person directly; false = teamId is derived from the linked organizations via party_relationships (ADR 0318, mirrors hasOwnResponsibleUser). ORGANIZATION: ignored. Documents lacking this field are treated at read time as (teamId != null), preserving pre-existing data on live tenants (no backfill required).

Default: false
inheritedTeamIdsuuid[]optional

PERSON + hasOwnTeam=false only: distinct primary technical teams of all linked organizations (driven by recomputePersonTeam). Server-managed — not writable via the API. Empty array otherwise.

Default: []read-only
classificationstringoptional

Customer classification (A = highest priority)

ABCD
nullable
tagsstring[]optional

Party tags

Default: []nullable
isSelfCompanybooleanoptional

Whether this party represents the tenant own company

Default: false
travelConfigobjectoptional

Travel/distance configuration for this party

nullable
distancesobject[]optional
Default: []
ownLocationIdstringerforderlich

ID of own company location address

ownLocationLabelstringoptional

Display label of the own location

max 200 Zeichennullable
customerAddressIduuidoptional

Target party address this distance refers to. Null = legacy entry, resolved against the main customer address.

nullable
distanceKmnumbererforderlich

Distance in kilometers

≥ 0
durationMinutesnumbererforderlich

Travel duration in minutes

≥ 0
travelAllowanceIduuidoptional

Default travel allowance for this route

nullable
calculatedAtdatetimeoptional

When the distance was last calculated

nullable
calculationSourcestringoptional

How the distance was determined

MANUALOPENROUTESERVICE
nullable
defaultBillingModestringoptional

Default billing mode for travel to this party

DISTANCE_BASEDFLAT_RATE
nullable
notesstringoptional

Travel configuration notes

max 1000 Zeichennullable
dunningBlockedbooleanoptional

Block all dunning for this customer (Mahnsperre)

Default: falsenullable
billingBlockobjectoptional

Billing block (Abrechnungssperre) — when active, invoices and Leistungsnachweise cannot be created for this party

nullable
activebooleanerforderlich
Default: false
reasonstringoptional
max 1000 Zeichennullable
blockedAtdatetimeoptional
read-onlynullable
blockedByuuidoptional
read-onlynullable
blockedUntildateoptional
nullable
serviceBlockobjectoptional

Service block (Leistungssperre) — when active, tickets/time-records/calendar-events for this party trigger warnings; time-records require approval

nullable
activebooleanerforderlich
Default: false
reasonstringoptional
max 1000 Zeichennullable
blockedAtdatetimeoptional
read-onlynullable
blockedByuuidoptional
read-onlynullable
blockedUntildateoptional
nullable
weclappBlockobjectoptional

Read-only mirror of the weclapp customer block (customerBlocked / customerInsolvent + customerBlockNotice). weclapp-master — set by the weclapp party sync, never edited in Codemeta and never pushed back. When blocked, it triggers both the billing- and service-block warnings (party-block helpers), mirroring the TANSS lockout behaviour.

nullable
blockedbooleanerforderlich
Default: false
noticestringoptional
max 1000 Zeichennullable
syncedAtdatetimeoptional
nullable
logoFileIduuidoptional

File ID of the party logo (from file storage)

nullable
serviceTypeOverridesobject[]optional

Per-customer overrides for service type billing parameters

Default: []nullable
serviceTypeIduuiderforderlich

Service type to override pricing for

roundingMinutesintegeroptional

Override rounding increment for this customer

≥ 1nullable
inclusiveMinutesintegeroptional

Override inclusive minutes for this customer

≥ 0nullable
pricingDateBasisstringoptional

ADR 0415 — per-customer override of the pricing date basis for this service type: SERVICE_DATE = price at the day the work was performed, BILLING_DATE = price at the day of the billing run. Null falls back to service_type.billing.pricingDateBasis (then SERVICE_DATE).

SERVICE_DATEBILLING_DATEnull
nullable
pricingobject[]optional

Customer-specific price schedule — absolute rate or discount, dated (overrides service type defaults)

nullable
validFromdateerforderlich

Price effective from this date

ratePerHourstringoptional

Customer-specific hourly rate. Absolute price — takes precedence over discountPercent when both are set.

Patternnullable
discountPercentnumberoptional

Customer discount in percent off the rate that would otherwise apply (article price or service-type mask price). Alternative to ratePerHour (ADR 0411).

0 – 100nullable
flatRateAmountstringoptional

Customer-specific flat rate amount

Patternnullable
travelBillingobjectoptional

ADR 0480 — customer-wide travel conditions. Third step of the €/km precedence (contract → customer → tenant default → fallback); applies to customers with negotiated rates but no maintenance contract. Same fields as contract.conditions.travelAllowance, deliberately named differently to keep it apart from party.travelConfig (the ADR 0033b distance matrix).

nullable
ratePerKmstringoptional

Customer-wide mileage rate in EUR per km

Patternnullable
flatRatestringoptional

Customer-wide flat travel fee per assignment

Patternnullable
vehicleBaseFeestringoptional

Customer-wide vehicle base fee per assignment

Patternnullable
noticesobject[]optional

Persistente Hinweise zur Firma, die kontextabhängig in Tickets, Leistungserfassung oder anderen Workflows als Banner angezeigt werden. Pendant zu TANSS-supportInfos: dort wurden sie beim Auswählen des Kunden als Popup gezeigt; in Codemeta surface wir sie an den Touchpoints, an denen mit dem Kunden gearbeitet wird.

Default: []nullable
_iduuidoptional

Notice ID (UUIDv7, auto-generated server-side wenn fehlend)

read-only
namestringoptional

Optionale Überschrift des Hinweises (z. B. "Wartung", "Patch Management"). Quelle u. a. die TANSS-„wichtigen Firmeninformationen", wo jeder Eintrag benannt ist. Optional und ohne Default — Alt-Notices haben keinen Namen und werden weiterhin nur als Text gerendert.

max 200 Zeichennullable
textstringerforderlich

Hinweistext (Plaintext, mehrzeilig erlaubt)

1–5000 Zeichen
severitystringoptional

Visuelle Wichtigkeit. CRITICAL = rotes Banner (entspricht TANSS popup=true), WARNING = gelb, INFO = neutral.

INFOWARNINGCRITICAL
Default: "INFO"
showOnTicketbooleanoptional

Banner auf der Ticket-Detail-Seite anzeigen, wenn das Ticket auf diese Firma referenziert (partyId).

Default: true
showOnTimeRecordbooleanoptional

Banner im Time-Record-/Leistungserfassungs-Dialog anzeigen, wenn die Leistung auf diese Firma gebucht wird.

Default: true
sourcestringoptional

Herkunft des Hinweises (z. B. "TANSS-Import", "TANSS (Headquarter)", "Manuell"). Informativ für den Bearbeiter.

max 100 Zeichennullable
validFromdateoptional

Optionaler Beginn des Gültigkeitszeitraums (YYYY-MM-DD, inklusiv). Vor diesem Datum wird der Hinweis an den Touchpoints (Ticket, Leistungserfassung, Detailseiten-Banner) nicht angezeigt. Fehlend/null = ab sofort gültig. Anwendungsfall: zeitgebundene Hinweise wie Betriebsferien.

nullable
validUntildateoptional

Optionales Ende des Gültigkeitszeitraums (YYYY-MM-DD, inklusiv). Nach diesem Datum läuft der Hinweis automatisch aus, ohne dass ihn jemand manuell entfernen muss. Fehlend/null = unbegrenzt gültig.

nullable
createdAtdatetimeoptional

Anlagezeitpunkt (informativ).

read-onlynullable
sourceRefobjectoptional

Provenance marker for the source system this party was imported from (e.g. TANSS). NOTE: The weclapp sync anchor lives in externalReferences[system="weclapp"], NOT here (ADR 0147 §3).

Default: nullnullable
systemstringerforderlich

Source system identifier (e.g. tanss, weclapp)

idstringerforderlich

Entity ID in the source system

externalReferencesobject[]optional

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

Default: []
systemstringerforderlich
max 100 Zeichen
externalIdstringerforderlich
max 200 Zeichen
externalVersionstringoptional
nullable
externalNumberstringoptional
max 200 Zeichennullable
syncedAtdatetimeoptional
nullable
lastSyncCorrelationIdstringoptional
nullable
lastInboundHashstringoptional
max 64 Zeichennullable
lastOutboundHashstringoptional
max 64 Zeichennullable
syncWithWeclappbooleanoptional

Opt-in flag for the bidirectional weclapp party sync (ADR 0147). Only consulted when the tenant runs partySync.scope.mode = "opt-in"; ignored in "all"/"filtered"/"off".

Default: nullnullable
shopConfigobjectoptional

Customer-portal shop configuration for this organization. Master switches that gate per-role permissions defined in shop_roles.

Default: nullnullable
enabledbooleanoptional

Whether the customer portal shop is enabled for this customer at all. Disabled = portal users belonging to this party see no shop UI.

Default: false
globalPermissionsstring[]optional

Fallback permissions granted to portal users of this organization who have no shop role assigned. Use sparingly — prefer explicit roles.

Default: []
featureFlagsobjectoptional

Org-level feature flags. A role may grant a permission, but the flag must also allow it. Use to disable a feature globally for one customer regardless of roles.

nullable
allowOrdersbooleanoptional
Default: true
allowSubscriptionsbooleanoptional
Default: true
viewInvoicesbooleanoptional
Default: true
onboardingDismissedAtdatetimeoptional

Set when the admin explicitly hides the Shop-Tab onboarding checklist. Null = checklist still relevant. ISO timestamp = dismissed (auto-hidden).

nullable
crmobjectoptional

Aggregated CRM relationship metrics (satisfaction, NPS, etc.)

Default: nullnullable
csatobjectoptional

Rolling 90-day CSAT aggregate (normalized 0-100)

nullable
avgnumberoptional

Weighted average CSAT over the last 90 days (0-100)

0 – 100nullable
trendstringoptional

Trend of last 30 days vs previous 60 days

upstabledownnull
nullable
sampleSizeintegeroptional

Number of responses included in the rolling window

≥ 0nullable
lastUpdateddatetimeoptional

When this aggregate was last recalculated

nullable
lastScorenumberoptional

Most recent raw CSAT score

nullable
npsobjectoptional

Rolling 90-day NPS aggregate (-100 to 100)

nullable
scorenumberoptional

Net Promoter Score over the last 90 days

-100 – 100nullable
trendstringoptional
upstabledownnull
nullable
sampleSizeintegeroptional
≥ 0nullable
lastUpdateddatetimeoptional
nullable
lastScorenumberoptional
nullable
inboundReplyAckedAtdatetimeoptional

Timestamp at which the latest inbound customer email linked to this party was acknowledged as "handled, no reply needed". Clears the account-level awaiting-reply badge in the CRM list when >= the last inbound email time; a newer inbound email re-arms it. Mirrors opportunity.inboundReplyAckedAt.

nullable
inboundReplyAckedBystringoptional

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

nullable

Standard-Endpoints

Diese Resource folgt dem generischen CRUD-Vertrag der Plattform. Lesen Sie die Konventionen für Pagination, Idempotenz, Optimistic Locking und Audit. Die wichtigsten Endpoints:

  • GET /api/v1/parties — Liste, paginiert + filterbar
  • GET /api/v1/parties/<id> — Einzelne Entity
  • POST /api/v1/parties — Anlegen
  • PATCH /api/v1/parties/<id> — Teil-Update
  • DELETE /api/v1/parties/<id> — Soft-Delete
  • GET /api/v1/parties/<id>/timeline — Audit + Aktivitäten

Suche