API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola
Entidad · parties

Party Schema

ID del esquema
party
Colección
parties
Permisos
  • Leerparty_view
  • Crearparty_create
  • Modificarparty_edit
  • Eliminarparty_delete

Campos

Party Schema

parties4 permisos

Schema for validating party entities

partyTypestringobligatorio

Type of party

ORGANIZATIONPERSON
namestringobligatorio

Party name

1–200 caracteres
displayNamestringobligatorio

Display name

1–200 caracteres
abbreviationstringopcional

Unique ALL CAPS abbreviation (e.g. ITF)

2–10 caracteresPatrónadmite null
isCustomerbooleanopcional

Whether party is a customer

Valor por defecto: falseadmite null
isProspectbooleanopcional

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

Valor por defecto: falseadmite null
isSupplierbooleanopcional

Whether party is a supplier

Valor por defecto: falseadmite null
isApproverbooleanopcional

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

Valor por defecto: falseadmite null
createdViaInvitationbooleanopcional

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.

Valor por defecto: falseadmite null
approvalLimitnumberopcional

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

≥ 0admite null
addressesobject[]opcional
Valor por defecto: []admite null
_iduuidopcional

Address ID (UUIDv7, auto-generated)

solo lectura
sourceRefobjectopcional

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

admite null
systemstringobligatorio
máx. 50 caracteres
idstringobligatorio
máx. 200 caracteres
namestringopcional

Site name (e.g. Niederlassung Berlin)

máx. 200 caracteresadmite null
typestringopcional

Address type

MAINBRANCHDELIVERYBILLINGDUNNINGOTHER
Valor por defecto: "MAIN"
labelstringopcional

Custom label (e.g. Standort Berlin)

máx. 100 caracteresadmite null
streetstringobligatorio
1–200 caracteres
zipCodestringobligatorio
1–20 caracteres
citystringobligatorio
1–100 caracteres
statestringopcional
máx. 100 caracteresadmite null
countryCodestringobligatorio

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

Patrón
latitudenumberopcional

GPS latitude (WGS84)

-90 – 90admite null
longitudenumberopcional

GPS longitude (WGS84)

-180 – 180admite null
invoiceReferencestringopcional

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

máx. 100 caracteresadmite null
showInvoiceReferencebooleanopcional

Whether invoiceReference is printed on invoices using this address.

Valor por defecto: false
separateBillingbooleanopcional

Bill this site separately: its bookings get their own performance record and invoice (same customer, site address as recipient). Missing = billed with the customer.

Valor por defecto: false
languagestringopcional

Communication language for tickets of this site (ADR 0875). null = inherit from customer/tenant.

deenesfrnlnull
admite null
phonestringopcional

Central phone number of this site (e.g. the front desk of a branch).

máx. 50 caracteresadmite null
emailemailopcional

Email address of this address entry (e.g. the mailbox of a branch, or the accounting mailbox of a billing address).

máx. 254 caracteresadmite null
contactChannelsobject[]opcional
Valor por defecto: []admite null
typestringobligatorio
PHONEMOBILEEMAILFAXURLOTHER
valuestringobligatorio
1–255 caracteres
labelstringopcional
máx. 50 caracteresadmite null
isPrimarybooleanopcional
Valor por defecto: false
purposesstring[]opcional

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

Valor por defecto: []admite null
providerAccountsobject[]opcional

Numbers under which this ORGANIZATION is known at a third-party provider (customer number, contract number, line id). Internal only — never exposed to portal users. Passwords belong in the vault (secretId), never here (ADR 1101).

máx. 100 elementosadmite null
_iduuidopcional
solo lectura
providerPartyIduuidopcional

Provider as an ORGANIZATION party in the CRM (preferred).

admite null
providerNamestringopcional

Free-text provider name when it is not in the CRM; copy of the provider name otherwise.

máx. 200 caracteresadmite null
kindstringopcional
CUSTOMER_NUMBERCONTRACT_NUMBERLINE_IDOTHERnull
admite null
numberstringobligatorio
1–100 caracteres
labelstringopcional
máx. 100 caracteresadmite null
partyAddressIduuidopcional

Site (addresses[]._id) the number belongs to; null = whole company.

admite null
secretIduuidopcional

Vault entry (secrets) holding the customer password / PIN.

admite null
notesstringopcional
máx. 1000 caracteresadmite null
microsoftTenantsobject[]opcional

Microsoft 365 tenants of this ORGANIZATION, used only to build links into the Microsoft admin portals. Holds no credentials. Internal only.

máx. 20 elementosadmite null
_iduuidopcional
solo lectura
tenantIduuidobligatorio

Microsoft Entra tenant id.

solo lectura
initialDomainstringobligatorio

Initial domain of the tenant (contoso.onmicrosoft.com).

máx. 100 caracteresPatrón
labelstringopcional
máx. 100 caracteresadmite null
checkedAtdatetimeopcional

Last successful check against Microsoft.

admite null
isPartnerbooleanopcional

Whether party is a partner

Valor por defecto: falseadmite null
parentPartyIduuidopcional

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

admite null
partyAddressIduuidopcional

Address ID at the parent organization where this person is located

Valor por defecto: nulladmite null
websitestringopcional

Website URL

máx. 500 caracteresadmite null
emailDomainsstring[]opcional

Mail domains of an ORGANIZATION (lowercase, without "@"). Exact-match anchor for attaching auto-provisioned portal users to this company (ADR 0808). Freemail domains are rejected by the party hook. Must be empty on PERSON parties.

máx. 20 elementoselementos únicosValor por defecto: []admite null
emailDomainPrimarybooleanopcional

When several ORGANIZATIONs share a domain in `emailDomains`, the one carrying this flag wins the domain match (ADR 0808). At most one non-deleted party per tenant and domain may carry it — enforced by the party hook.

Valor por defecto: falseadmite null
businessHoursobjectopcional

Customer business/opening hours (Geschäftszeiten)

admite null
weeklyScheduleobjectopcional

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.

admite null
monobject[]opcional
admite null
startstringobligatorio
Patrón
endstringobligatorio
Patrón
tueobject[]opcional
admite null
startstringobligatorio
Patrón
endstringobligatorio
Patrón
wedobject[]opcional
admite null
startstringobligatorio
Patrón
endstringobligatorio
Patrón
thuobject[]opcional
admite null
startstringobligatorio
Patrón
endstringobligatorio
Patrón
friobject[]opcional
admite null
startstringobligatorio
Patrón
endstringobligatorio
Patrón
satobject[]opcional
admite null
startstringobligatorio
Patrón
endstringobligatorio
Patrón
sunobject[]opcional
admite null
startstringobligatorio
Patrón
endstringobligatorio
Patrón
notestringopcional

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

máx. 500 caracteresadmite null
taxIdstringopcional

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.

máx. 20 caracteresPatrónadmite null
vatIdstringopcional

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.

máx. 20 caracteresPatrónadmite null
notesstringopcional

Free-text notes

máx. 5000 caracteresadmite null
firstNamestringopcional

First name (for PERSON type)

máx. 100 caracteresadmite null
lastNamestringopcional

Last name (for PERSON type)

máx. 100 caracteresadmite null
salutationstringopcional

Salutation (for PERSON type)

HerrFrauDivers
admite null
academicTitlestringopcional

Academic/honorary title, e.g. "Dr." or "Prof. Dr." (for PERSON type)

máx. 60 caracteresadmite null
jobTitlestringopcional

Job title (for PERSON type)

máx. 200 caracteresadmite null
birthDatedateopcional

Date of birth as YYYY-MM-DD (for PERSON type)

admite null
preferredLanguagestringopcional

Preferred communication language (ISO 639-1). PERSON: language of the contact. ORGANIZATION: customer-wide default for ticket communication (ADR 0875).

aaabaeafakamanarasavayazbabebgbhbibmbnbo
admite null
additionalLanguagesstring[]opcional

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

Valor por defecto: []
postResolutionContactPreferencestringopcional

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
admite null
customerNumberstringopcional

Customer number

máx. 50 caracteresadmite null
datevDebitorenkontostringopcional

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

máx. 10 caracteressolo lecturaadmite null
datevKreditorenkontostringopcional

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

máx. 10 caracteressolo lecturaadmite null
supplierNumberstringopcional

Supplier number (Lieferantennummer)

máx. 50 caracteresadmite null
responsibleUserIduuidopcional

Account manager / responsible user (synced with weclapp)

admite null
hasOwnResponsibleUserbooleanopcional

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.

Valor por defecto: false
inheritedResponsibleUserIdsuuid[]opcional

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

Valor por defecto: []solo lectura
teamIduuidopcional

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

admite null
assignedOrgUnitIdsuuid[]opcional

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.

Valor por defecto: []
hasOwnTeambooleanopcional

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

Valor por defecto: false
inheritedTeamIdsuuid[]opcional

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.

Valor por defecto: []solo lectura
dispatchPreferredTechniciansOnlybooleanopcional

AutoDispatch may only assign technicians marked as preferred for this customer (user_party_affinities.preferredContact). None available → the ticket waits for manual assignment instead of going to the general pool. Missing/false: preferred technicians still go first, others are allowed when none is available.

admite null
classificationstringopcional

Customer classification (A = highest priority)

ABCD
admite null
isVipbooleanopcional

VIP customer/contact (feature request 2026-10-28). Internal only: highlights the name in the ticket list, ticket boards, ticket detail and party pickers (gold + crown), never shown in the customer portal. Applies to exactly this party — contacts do NOT inherit it from their organization. Missing/null/false = not VIP (no backfill). Codemeta-master, never synced with weclapp.

admite null
tagsstring[]opcional

Party tags

Valor por defecto: []admite null
isSelfCompanybooleanopcional

Whether this party represents the tenant own company

Valor por defecto: falsesolo lectura
isInternalCompanybooleanopcional

Whether work booked on this party counts as INTERNAL in reports (ADR 1013). Unlike isSelfCompany this flag may be set on MANY parties of a tenant: a Systemhaus whose branches are each kept as their own party record ticks it on all of them. isSelfCompany stays single-valued — it identifies THE legal entity and nine read sites in API and worker resolve it with findOne({ isSelfCompany: true }) for the letterhead, the travel start point, availability, company sites, the mail sender and onboarding; a second match would hand them an arbitrary branch. isSelfCompany: true already implies internal, so readers build { $or: [{ isSelfCompany: true }, { isInternalCompany: true }] } and nobody has to tick both.

Valor por defecto: falseadmite null
travelConfigobjectopcional

Travel/distance configuration for this party

admite null
distancesobject[]opcional
Valor por defecto: []
ownLocationIdstringobligatorio

ID of own company location address

ownLocationLabelstringopcional

Display label of the own location

máx. 200 caracteresadmite null
customerAddressIduuidopcional

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

admite null
distanceKmnumberobligatorio

Distance in kilometers

≥ 0
durationMinutesnumberobligatorio

Travel duration in minutes

≥ 0
travelAllowanceIduuidopcional

Default travel allowance for this route

admite null
calculatedAtdatetimeopcional

When the distance was last calculated

admite null
calculationSourcestringopcional

How the distance was determined

MANUALOPENROUTESERVICE
admite null
defaultBillingModestringopcional

Default billing mode for travel to this party

DISTANCE_BASEDFLAT_RATE
admite null
notesstringopcional

Travel configuration notes

máx. 1000 caracteresadmite null
dunningBlockedbooleanopcional

Block all dunning for this customer (Mahnsperre)

Valor por defecto: falseadmite null
inactivebooleanopcional

Party is retired: kept for historical references but no longer offered in any selector. Absence of the field means active — read filters must use { $ne: true }, never { inactive: false }.

Valor por defecto: falseadmite null
inactiveReasonstringopcional

Why the party was set inactive (e.g. "Kunde abgewandert 03/2026").

máx. 500 caracteresadmite null
inactiveAtdatetimeopcional

When the party was set inactive. Server-filled by the party beforeUpdate hook, which overwrites any client value.

admite null
inactiveBystringopcional

Internal users._id that set the party inactive. Server-filled by the party beforeUpdate hook, which overwrites any client value.

admite null
mergedIntoPartyIduuidopcional

The company this party was merged into. Set on the first confirmed merge run and kept through delete/retire so old links can be forwarded.

solo lecturaadmite null
mergedAtdatetimeopcional

When the merge into mergedIntoPartyId was started.

solo lecturaadmite null
mergedBystringopcional

Internal users._id that started the merge.

solo lecturaadmite null
mergedIntoAddressIduuidopcional

Site (addresses[]._id of mergedIntoPartyId) the merged documents were pointed at; null when the merge targeted the company as a whole. Written with mergedIntoPartyId so later batches of the same merge cannot switch sites.

solo lecturaadmite null
billingBlockobjectopcional

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

admite null
activebooleanobligatorio
Valor por defecto: false
reasonstringopcional
máx. 1000 caracteresadmite null
blockedAtdatetimeopcional
solo lecturaadmite null
blockedByuuidopcional
solo lecturaadmite null
blockedUntildateopcional
admite null
contractBillingobjectopcional

Collective contract billing (ADR 1280): when collective is true, all contracts of this customer due in the same billing run go onto one invoice. Written only via POST /parties/:id/contract-billing (billing_manage).

solo lecturaadmite null
collectivebooleanobligatorio
Valor por defecto: false
sourcestringopcional
CODEMETAWECLAPP
Valor por defecto: "CODEMETA"
updatedAtdatetimeopcional
solo lecturaadmite null
serviceBlockobjectopcional

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

admite null
activebooleanobligatorio
Valor por defecto: false
reasonstringopcional
máx. 1000 caracteresadmite null
blockedAtdatetimeopcional
solo lecturaadmite null
blockedByuuidopcional
solo lecturaadmite null
blockedUntildateopcional
admite null
weclappBlockobjectopcional

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.

admite null
blockedbooleanobligatorio
Valor por defecto: false
noticestringopcional
máx. 1000 caracteresadmite null
syncedAtdatetimeopcional
admite null
logoFileIduuidopcional

File ID of the party logo (from file storage)

admite null
serviceTypeOverridesobject[]opcional

Per-customer overrides for service type billing parameters

Valor por defecto: []admite null
serviceTypeIduuidobligatorio

Service type to override pricing for

roundingMinutesintegeropcional

Override rounding increment for this customer

≥ 1admite null
inclusiveMinutesintegeropcional

Override inclusive minutes for this customer

≥ 0admite null
pricingDateBasisstringopcional

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
admite null
pricingobject[]opcional

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

admite null
validFromdateobligatorio

Price effective from this date

ratePerHourstringopcional

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

Patrónadmite null
discountPercentnumberopcional

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

0 – 100admite null
flatRateAmountstringopcional

Customer-specific flat rate amount

Patrónadmite null
travelBillingobjectopcional

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

admite null
ratePerKmstringopcional

Customer-wide mileage rate in EUR per km (baseline until the first dated entry)

Patrónadmite null
ratePerKmScheduleobject[]opcional

Dated customer mileage rates. For a trip the entry with the latest validFrom <= trip date wins; before the first entry the baseline ratePerKm applies. Add a new entry to change the rate so earlier trips keep theirs.

máx. 50 elementosadmite null
validFromstringobligatorio
Patrón
ratePerKmstringobligatorio
Patrón
flatRatestringopcional

Customer-wide flat travel fee per assignment

Patrónadmite null
vehicleBaseFeestringopcional

Customer-wide vehicle base fee per assignment

Patrónadmite null
performanceRecordSettingsobjectopcional

ADR 0909 — per-customer presentation of the Leistungsnachweis. Resolved via resolveGroupPositionsByTicket() at generation time and snapshotted on the performance record.

admite null
groupPositionsByTicketbooleanopcional

Overrides billingSettings.groupPositionsByTicket for this customer. null/missing = tenant default.

admite null
emergencyServiceBillingstringopcional

ADR 0914 — overrides billingSettings.emergencyServiceBilling for this customer. null/missing = tenant default.

COMBINEDSEPARATEnull
admite null
openTicketBillingstringopcional

ADR 1209 — overrides billingSettings.openTicketBilling for this customer: ALLOW bills time on still-open tickets, BLOCK waits for ticket close. null/missing = tenant default. Writing it additionally requires ticket_billing_override.

BLOCKALLOWnull
admite null
noticesobject[]opcional

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.

Valor por defecto: []admite null
_iduuidopcional

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

solo lectura
namestringopcional

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.

máx. 200 caracteresadmite null
textstringobligatorio

Hinweistext (Plaintext, mehrzeilig erlaubt)

1–5000 caracteres
severitystringopcional

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

INFOWARNINGCRITICAL
Valor por defecto: "INFO"
showOnTicketbooleanopcional

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

Valor por defecto: true
showOnTimeRecordbooleanopcional

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

Valor por defecto: true
sourcestringopcional

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

máx. 100 caracteresadmite null
validFromdateopcional

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.

admite null
validUntildateopcional

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.

admite null
createdAtdatetimeopcional

Anlagezeitpunkt (informativ).

solo lecturaadmite null
sourceRefobjectopcional

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

Valor por defecto: nulladmite null
systemstringobligatorio

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

idstringobligatorio

Entity ID in the source system

externalReferencesobject[]opcional

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.

Valor por defecto: []
systemstringobligatorio
máx. 100 caracteres
externalIdstringobligatorio
máx. 200 caracteres
externalVersionstringopcional
admite null
externalNumberstringopcional
máx. 200 caracteresadmite null
syncedAtdatetimeopcional
admite null
lastSyncCorrelationIdstringopcional
admite null
lastInboundHashstringopcional
máx. 64 caracteresadmite null
lastOutboundHashstringopcional
máx. 64 caracteresadmite null
syncWithWeclappbooleanopcional

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

Valor por defecto: nulladmite null
shopConfigobjectopcional

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

Valor por defecto: nulladmite null
enabledbooleanopcional

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

Valor por defecto: false
globalPermissionsstring[]opcional

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

Valor por defecto: []
featureFlagsobjectopcional

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.

admite null
allowOrdersbooleanopcional
Valor por defecto: true
allowSubscriptionsbooleanopcional
Valor por defecto: true
viewInvoicesbooleanopcional
Valor por defecto: true
onboardingDismissedAtdatetimeopcional

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

admite null
crmobjectopcional

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

Valor por defecto: nulladmite null
csatobjectopcional

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

admite null
avgnumberopcional

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

0 – 100admite null
trendstringopcional

Trend of last 30 days vs previous 60 days

upstabledownnull
admite null
sampleSizeintegeropcional

Number of responses included in the rolling window

≥ 0admite null
lastUpdateddatetimeopcional

When this aggregate was last recalculated

admite null
lastScorenumberopcional

Most recent raw CSAT score

admite null
npsobjectopcional

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

admite null
scorenumberopcional

Net Promoter Score over the last 90 days

-100 – 100admite null
trendstringopcional
upstabledownnull
admite null
sampleSizeintegeropcional
≥ 0admite null
lastUpdateddatetimeopcional
admite null
lastScorenumberopcional
admite null
inboundReplyAckedAtdatetimeopcional

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.

admite null
inboundReplyAckedBystringopcional

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

admite null

Endpoints estándar

Este recurso sigue el contrato CRUD genérico de la plataforma. Lea las convenciones sobre paginación, idempotencia, bloqueo optimista y auditoría. Los endpoints principales:

  • GET /api/v1/parties — Lista, paginada y filtrable
  • GET /api/v1/parties/<id> — Una entidad
  • POST /api/v1/parties — Crear
  • PATCH /api/v1/parties/<id> — Actualización parcial
  • DELETE /api/v1/parties/<id> — Eliminación lógica
  • GET /api/v1/parties/<id>/timeline — Auditoría y actividades

Búsqueda