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

Service Type Schema

Schema-ID
service_type
Collection
service_types
Permissions
  • Lesenservice_type_view
  • Anlegenservice_type_create
  • Ändernservice_type_edit
  • Löschenservice_type_delete

Felder

Service Type Schema

service_types4 Permissions

Schema for validating service type / Leistungstyp entities

namestringerforderlich

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

1–100 Zeichen
descriptionstringoptional

Service type description

max 500 Zeichennullable
codestringoptional

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

max 20 Zeichennullable
colorstringoptional

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

Patternnullable
iconstringoptional

MUI icon name

max 50 Zeichennullable
isActivebooleanerforderlich

Whether this service type is available for selection

Default: true
isDefaultbooleanoptional

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

Default: false
sortOrderintegeroptional

Display sort order

≥ 0Default: 0
categorystringoptional

Category for backward compatibility with entryType

WORKTRAVELREMOTEON_SITEPHONEADMINCONSULTINGMAINTENANCESUPPORTCUSTOM
nullable
serviceNaturestringoptional

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
defaultLocationstringoptional

Default location when this service type is selected

OFFICECUSTOMER_SITEREMOTETRAVEL
nullable
articleIduuidoptional

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

nullable
priceSourcestringoptional

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
Default: "MASK"
billingobjectoptional

Billing parameters for this service type

nullable
roundingMinutesintegeroptional

Round billable minutes to this increment

≥ 1Default: 15
roundingModestringoptional

Rounding direction

UPDOWNNEAREST
Default: "UP"
minimumMinutesintegeroptional

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

≥ 0Default: 0
billingUnitMinutesintegeroptional

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.

≥ 1Default: 15
inclusiveMinutesintegeroptional

Free minutes included before billing starts

≥ 0Default: 0
defaultBillablebooleanoptional

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.

Default: true
neverBillablebooleanoptional

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.

Default: false
defaultBudgetCapMinutesintegeroptional

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

≥ 0nullable
allowFlatRatebooleanoptional

Whether flat-rate billing is allowed for this type

Default: false
pricingDateBasisstringoptional

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

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

min 1 Items
validFromdateerforderlich

Price effective from this date (ISO date)

ratePerHourstringerforderlich

Hourly rate in EUR as decimal string

Pattern
flatRateAmountstringoptional

Flat rate amount in EUR as decimal string

Patternnullable
surchargeStackingModestringoptional

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

Surcharges/discounts applied to the hourly rate

Default: []
_idstringoptional

UUIDv7 surcharge ID

read-only
namestringerforderlich

Surcharge name (e.g. Abendzuschlag, Wochenendzuschlag)

max 100 Zeichen
percentChangenumbererforderlich

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

applyModestringoptional

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
alsoOnHolidaysbooleanoptional

The time ranges additionally apply on every public holiday regardless of the weekday — same semantics as includeHolidays of the overtime weekend rule (ADR 0441). false/absent = holidays have NO influence (day match only; deliberately NOT the contract-surcharge IGNORE suppression from ADR 0163). ADR 0442.

Default: falsenullable
timeRangesobject[]optional
fromTimestringerforderlich

Start time (HH:MM)

Pattern
toTimestringerforderlich

End time (HH:MM)

Pattern
daysOfWeekinteger[]optional

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

validFromdateoptional

Effective from date (ISO date)

nullable
validUntildateoptional

Effective until date (ISO date)

nullable
isActivebooleanoptional

Whether this surcharge is active

Default: true
accessobjectoptional

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

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

Default: []
orgUnitIdsuuid[]optional

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

Default: []
tagsstring[]optional

Tags for categorization

Default: []

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

Suche