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

Service Type Schema

Schema-ID
service_type
Collection
service_types
Permissions
  • Lezenservice_type_view
  • Aanmakenservice_type_create
  • Wijzigenservice_type_edit
  • Verwijderenservice_type_delete

Velden

Service Type Schema

service_types4 permissions

Schema for validating service type / Leistungstyp entities

namestringvereist

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

1–100 tekens
descriptionstringoptioneel

Service type description

max. 500 tekensnullable
codestringoptioneel

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

max. 20 tekensnullable
colorstringoptioneel

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

Patternnullable
iconstringoptioneel

MUI icon name

max. 50 tekensnullable
isActivebooleanvereist

Whether this service type is available for selection

Default: true
isDefaultbooleanoptioneel

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
requiresContractbooleanoptioneel

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
sortOrderintegeroptioneel

Display sort order

≥ 0Default: 0
categorystringoptioneel

Category for backward compatibility with entryType

WORKTRAVELREMOTEON_SITEPHONEADMINCONSULTINGMAINTENANCESUPPORTCUSTOM
nullable
serviceNaturestringoptioneel

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
defaultLocationstringoptioneel

Default location when this service type is selected

OFFICECUSTOMER_SITEREMOTETRAVEL
nullable
articleIduuidoptioneel

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

nullable
priceSourcestringoptioneel

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

Billing parameters for this service type

nullable
roundingMinutesintegeroptioneel

Round billable minutes to this increment

≥ 1Default: 15
roundingModestringoptioneel

Rounding direction

UPDOWNNEAREST
Default: "UP"
minimumMinutesintegeroptioneel

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

≥ 0Default: 0
billingUnitMinutesintegeroptioneel

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
inclusiveMinutesintegeroptioneel

Free minutes included before billing starts

≥ 0Default: 0
locationRoundingobject[]optioneel

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

max. 4 items
locationstringvereist
OFFICECUSTOMER_SITEREMOTETRAVEL
roundingMinutesintegeroptioneel
≥ 1nullable
roundingModestringoptioneel
UPDOWNNEARESTnull
nullable
minimumMinutesintegeroptioneel
≥ 0nullable
inclusiveMinutesintegeroptioneel
≥ 0nullable
defaultBillablebooleanoptioneel

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
neverBillablebooleanoptioneel

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
defaultBudgetCapMinutesintegeroptioneel

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

≥ 0nullable
allowFlatRatebooleanoptioneel

Whether flat-rate billing is allowed for this type

Default: false
pricingDateBasisstringoptioneel

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

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

min. 1 items
validFromdatevereist

Price effective from this date (ISO date)

ratePerHourstringvereist

Hourly rate in EUR as decimal string

Pattern
flatRateAmountstringoptioneel

Flat rate amount in EUR as decimal string

Patternnullable
surchargeStackingModestringoptioneel

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

Surcharges/discounts applied to the hourly rate

Default: []
_idstringoptioneel

UUIDv7 surcharge ID

read-only
namestringvereist

Surcharge name (e.g. Abendzuschlag, Wochenendzuschlag)

max. 100 tekens
percentChangenumbervereist

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

applyModestringoptioneel

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
holidayModestringoptioneel

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
alsoOnHolidaysbooleanoptioneel

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.

Default: falsenullable
timeRangesobject[]optioneel
fromTimestringvereist

Start time (HH:MM)

Pattern
toTimestringvereist

End time (HH:MM)

Pattern
daysOfWeekinteger[]optioneel

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

validFromdateoptioneel

Effective from date (ISO date)

nullable
validUntildateoptioneel

Effective until date (ISO date)

nullable
isActivebooleanoptioneel

Whether this surcharge is active

Default: true
accessobjectoptioneel

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

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

Default: []
orgUnitIdsuuid[]optioneel

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

Default: []
tagsstring[]optioneel

Tags for categorization

Default: []

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

Zoeken