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

Service Type Schema

ID del esquema
service_type
Colección
service_types
Permisos
  • Leerservice_type_view
  • Crearservice_type_create
  • Modificarservice_type_edit
  • Eliminarservice_type_delete

Campos

Service Type Schema

service_types4 permisos

Schema for validating service type / Leistungstyp entities

namestringobligatorio

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

1–100 caracteres
descriptionstringopcional

Service type description

máx. 500 caracteresadmite null
codestringopcional

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

máx. 20 caracteresadmite null
colorstringopcional

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

Patrónadmite null
iconstringopcional

MUI icon name

máx. 50 caracteresadmite null
isActivebooleanobligatorio

Whether this service type is available for selection

Valor por defecto: true
isDefaultbooleanopcional

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

Valor por defecto: false
requiresContractbooleanopcional

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

admite null
sortOrderintegeropcional

Display sort order

≥ 0Valor por defecto: 0
categorystringopcional

Category for backward compatibility with entryType

WORKTRAVELREMOTEON_SITEPHONEADMINCONSULTINGMAINTENANCESUPPORTCUSTOM
admite null
serviceNaturestringopcional

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

Default location when this service type is selected

OFFICECUSTOMER_SITEREMOTETRAVEL
admite null
articleIduuidopcional

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

admite null
priceSourcestringopcional

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
Valor por defecto: "MASK"
billingobjectopcional

Billing parameters for this service type

admite null
roundingMinutesintegeropcional

Round billable minutes to this increment

≥ 1Valor por defecto: 15
roundingModestringopcional

Rounding direction

UPDOWNNEAREST
Valor por defecto: "UP"
minimumMinutesintegeropcional

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

≥ 0Valor por defecto: 0
billingUnitMinutesintegeropcional

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.

≥ 1Valor por defecto: 15
inclusiveMinutesintegeropcional

Free minutes included before billing starts

≥ 0Valor por defecto: 0
locationRoundingobject[]opcional

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

máx. 4 elementos
locationstringobligatorio
OFFICECUSTOMER_SITEREMOTETRAVEL
roundingMinutesintegeropcional
≥ 1admite null
roundingModestringopcional
UPDOWNNEARESTnull
admite null
minimumMinutesintegeropcional
≥ 0admite null
inclusiveMinutesintegeropcional
≥ 0admite null
defaultBillablebooleanopcional

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.

Valor por defecto: true
neverBillablebooleanopcional

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.

Valor por defecto: false
defaultBudgetCapMinutesintegeropcional

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

≥ 0admite null
allowFlatRatebooleanopcional

Whether flat-rate billing is allowed for this type

Valor por defecto: false
pricingDateBasisstringopcional

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

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

mín. 1 elementos
validFromdateobligatorio

Price effective from this date (ISO date)

ratePerHourstringobligatorio

Hourly rate in EUR as decimal string

Patrón
flatRateAmountstringopcional

Flat rate amount in EUR as decimal string

Patrónadmite null
surchargeStackingModestringopcional

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

Surcharges/discounts applied to the hourly rate

Valor por defecto: []
_idstringopcional

UUIDv7 surcharge ID

solo lectura
namestringobligatorio

Surcharge name (e.g. Abendzuschlag, Wochenendzuschlag)

máx. 100 caracteres
percentChangenumberobligatorio

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

applyModestringopcional

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

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

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.

Valor por defecto: falseadmite null
timeRangesobject[]opcional
fromTimestringobligatorio

Start time (HH:MM)

Patrón
toTimestringobligatorio

End time (HH:MM)

Patrón
daysOfWeekinteger[]opcional

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

validFromdateopcional

Effective from date (ISO date)

admite null
validUntildateopcional

Effective until date (ISO date)

admite null
isActivebooleanopcional

Whether this surcharge is active

Valor por defecto: true
accessobjectopcional

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.

admite null
roleIdsuuid[]opcional

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

Valor por defecto: []
orgUnitIdsuuid[]opcional

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

Valor por defecto: []
tagsstring[]opcional

Tags for categorization

Valor por defecto: []

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

Búsqueda