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

Service Type Schema

ID du schéma
service_type
Collection
service_types
Autorisations
  • Lireservice_type_view
  • Créerservice_type_create
  • Modifierservice_type_edit
  • Supprimerservice_type_delete

Champs

Service Type Schema

service_types4 autorisations

Schema for validating service type / Leistungstyp entities

namestringobligatoire

Service type name (e.g. Standard Support, Consulting)

1–100 caractères
descriptionstringfacultatif

Service type description

max. 500 caractèresnullable
codestringfacultatif

Short code (e.g. STD, ADM, CON)

max. 20 caractèresnullable
colorstringfacultatif

Display color as hex (e.g. #18cc63)

Motifnullable
iconstringfacultatif

MUI icon name

max. 50 caractèresnullable
isActivebooleanobligatoire

Whether this service type is available for selection

Par défaut : true
isDefaultbooleanfacultatif

Whether this is the tenant-level default service type. Only one service type per tenant can be the default. User-level preferences override this.

Par défaut : false
requiresContractbooleanfacultatif

Bookable only for customers with a contract in force on the service date that lists this type in contract.releasedServiceTypeIds. Applies to everyone including admins; internal bookings are exempt. Missing/null/false = bookable for every customer (no backfill).

nullable
sortOrderintegerfacultatif

Display sort order

≥ 0Par défaut : 0
categorystringfacultatif

Category for backward compatibility with entryType

WORKTRAVELREMOTEON_SITEPHONEADMINCONSULTINGMAINTENANCESUPPORTCUSTOM
nullable
serviceNaturestringfacultatif

Klassifizierung für die Full-Service-Auswertung: SUPPORT = im Full-Service-Pauschalpreis enthalten, ORDER_BASED = auftragsbezogene Dienstleistung (separat berechenbar). Wird beim Buchen als Snapshot auf den time_record kopiert.

SUPPORTORDER_BASEDnull
nullable
defaultLocationstringfacultatif

Default location when this service type is selected

OFFICECUSTOMER_SITEREMOTETRAVEL
nullable
articleIduuidfacultatif

Linked article UUID for invoice line items (maps to weclapp articleNumber via article SKU)

nullable
priceSourcestringfacultatif

Where the hourly rate is sourced from when creating time records: MASK = use billing.pricing[] on this service type, ARTICLE = resolve from articlePrices[] on the linked article (requires articleId).

MASKARTICLE
Par défaut : "MASK"
billingobjectfacultatif

Billing parameters for this service type

nullable
roundingMinutesintegerfacultatif

Round billable minutes to this increment

≥ 1Par défaut : 15
roundingModestringfacultatif

Rounding direction

UPDOWNNEAREST
Par défaut : "UP"
minimumMinutesintegerfacultatif

Minimum billable minutes. If tracked time > 0 but < minimum, it is raised to this value (applied after rounding).

≥ 0Par défaut : 0
billingUnitMinutesintegerfacultatif

Size of one billing unit (Arbeitseinheit) in minutes, used for invoicing. Does not affect rounding — only determines how billable minutes are expressed as units on invoices.

≥ 1Par défaut : 15
inclusiveMinutesintegerfacultatif

Free minutes included before billing starts

≥ 0Par défaut : 0
locationRoundingobject[]facultatif

Rounding that deviates per booking location. Unset fields inherit the service-type values above. Customer and contract rounding still take precedence.

max. 4 éléments
locationstringobligatoire
OFFICECUSTOMER_SITEREMOTETRAVEL
roundingMinutesintegerfacultatif
≥ 1nullable
roundingModestringfacultatif
UPDOWNNEARESTnull
nullable
minimumMinutesintegerfacultatif
≥ 0nullable
inclusiveMinutesintegerfacultatif
≥ 0nullable
defaultBillablebooleanfacultatif

SOFT default: preselects billableType=NONE in the booking dialog when false. The user may still switch the booking back to billable — use `neverBillable` for a hard rule.

Par défaut : true
neverBillablebooleanfacultatif

HARD flag (ADR 0463): bookings on this service type are never billable ("n.b."). The server forces billableType=NONE / billable=false / billableMinutes=0 and freezes a 0,00 € rate snapshot on every write path (CRUD, timer-stop, import), so the position always invoices at 0 €. Absent/false = todays behaviour; no backfill needed.

Par défaut : false
defaultBudgetCapMinutesintegerfacultatif

Default budget cap in minutes for tickets using this service type. Applied when a ticket is created with this service type.

≥ 0nullable
allowFlatRatebooleanfacultatif

Whether flat-rate billing is allowed for this type

Par défaut : false
pricingDateBasisstringfacultatif

ADR 0415 — which date resolves the price schedules at Leistungsnachweis generation: SERVICE_DATE (default, the day the work was performed — time_record.date) or BILLING_DATE (the day of the billing run — performanceRecordDate; a price change between service and billing then applies). Tenant-wide default for this service type; party.serviceTypeOverrides[].pricingDateBasis overrides per customer. Only the base rate follows this date — contract rates/surcharges, rounding, inclusive minutes and contingents always stay on the service date.

SERVICE_DATEBILLING_DATEnull
nullable
pricingobject[]facultatif

Price schedule sorted by validFrom. System picks the entry valid for the booking date.

min. 1 éléments
validFromdateobligatoire

Price effective from this date (ISO date)

ratePerHourstringobligatoire

Hourly rate in EUR as decimal string

Motif
flatRateAmountstringfacultatif

Flat rate amount in EUR as decimal string

Motifnullable
surchargeStackingModestringfacultatif

Tenant default for how surcharges combine when several apply to the same minute (ADR 0431). ADDITIVE (default) sums them; MAX lets the single highest win. A contract can override this via conditions.surchargeStackingMode.

ADDITIVEMAX
nullable
surchargesobject[]facultatif

Surcharges/discounts applied to the hourly rate

Par défaut : []
_idstringfacultatif

UUIDv7 surcharge ID

lecture seule
namestringobligatoire

Surcharge name (e.g. Abendzuschlag, Wochenendzuschlag)

max. 100 caractères
percentChangenumberobligatoire

Percentage change: +25 for surcharge, -10 for discount

applyModestringfacultatif

AUTO (default, also when absent) = time-window driven: auto-detected in the booking dialog and billed for the minutes inside timeRanges (ADR 0431). MANUAL = no time ranges; never auto-preselected, always offered as a pickable chip, and — when picked — applies to the FULL booking duration (mapped to an all-day window in the segmentation). ADR 0442.

AUTOMANUAL
nullable
holidayModestringfacultatif

Public-holiday behaviour (ADR 0740). NEUTRAL (default, also when absent) = holidays have no influence, only the weekday gate counts. ALSO_ON_HOLIDAYS = the time ranges additionally apply on every public holiday regardless of the weekday. ONLY_ON_HOLIDAYS = the time ranges apply ONLY on public holidays and daysOfWeek is ignored (use 00:00-23:59 for a whole-day holiday surcharge). The contract-surcharge IGNORE suppression (ADR 0163) is deliberately NOT offered here — it would disable every existing service-type surcharge on a holiday. When absent, the legacy boolean alsoOnHolidays is read instead (no backfill).

NEUTRALALSO_ON_HOLIDAYSONLY_ON_HOLIDAYSnull
nullable
alsoOnHolidaysbooleanfacultatif

DEPRECATED since ADR 0740 — superseded by holidayMode, which can additionally express ONLY_ON_HOLIDAYS. Still read as a fallback for documents written before ADR 0740 (true = ALSO_ON_HOLIDAYS, false/absent = NEUTRAL) and therefore never removed without a migration; holidayMode wins whenever it is set. ADR 0442.

Par défaut : falsenullable
timeRangesobject[]facultatif
fromTimestringobligatoire

Start time (HH:MM)

Motif
toTimestringobligatoire

End time (HH:MM)

Motif
daysOfWeekinteger[]facultatif

Days of week (0=Sunday). Empty means all days.

validFromdatefacultatif

Effective from date (ISO date)

nullable
validUntildatefacultatif

Effective until date (ISO date)

nullable
isActivebooleanfacultatif

Whether this surcharge is active

Par défaut : true
accessobjectfacultatif

ADR 0463 — who may book on this service type. BOTH lists empty/absent = available to everyone (the default, and what every pre-existing service type resolves to — no backfill). As soon as either list has an entry the type is restricted, and a user needs a match in EITHER list (union, not intersection). `admin_bypass` and holders of `service_type_edit` always see every type.

nullable
roleIdsuuid[]facultatif

role_definitions._id values whose members may book on this service type

Par défaut : []
orgUnitIdsuuid[]facultatif

org_units._id values (Teams) whose members may book on this service type

Par défaut : []
tagsstring[]facultatif

Tags for categorization

Par défaut : []

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

Recherche