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

Service Request Schema

Schema-ID
service_request
Collection
service_requests
Permissions
  • Lezenservice_request_view
  • Aanmakenadmin_bypass
  • Wijzigenadmin_bypass
  • Verwijderenadmin_bypass
Relaties

Velden

Service Request Schema

service_requests4 permissions

A concrete service-catalog request from a customer portal user. Carries the formData payload, an embedded resolved approval chain and a status machine.

requestNumberstringoptioneel

Sequence-generated number like "SR-2026-00042". Server-assigned.

max. 50 tekensDefault: nullread-onlynullable
catalogItemIduuidvereist
catalogItemTitleSnapshotstringoptioneel

Title copied at submission so audit reflects the item state at that time.

max. 200 tekensDefault: nullread-onlynullable
customerPartyIduuidvereist
requesterPersonPartyIduuidvereist

PERSON party of the submitter (always set).

requesterUserIdstringoptioneel

Convenience cache: better-auth user-id of the requester. May be null for offline-created records.

PatternDefault: nullread-onlynullable
beneficiaryPersonPartyIdstringoptioneel

When the request is on behalf of another colleague. null = requester is the beneficiary.

PatternDefault: nullnullable
formDataobjectoptioneel

Form payload, validated against the catalog item's formSchema at submit time.

Default: {}
statusstringoptioneel
draftpending_approvalapprovedin_fulfillmentdonerejectedcancelled
Default: "draft"read-only
approvalStepsobject[]optioneel

Embedded resolved approval steps, snapshot from the catalog item at submission. Index-aligned with currentApprovalStepIndex.

Default: []read-only
indexnumbervereist
≥ 0
approverDslstringvereist
1–1000 tekens
modestringvereist
one_ofall_of
conditionsobject[]optioneel
Default: []
addressedUserIdsuuid[]vereist
Default: []
decisionsobject[]vereist
Default: []
userIduuidvereist
decisionstringvereist
approvereject
decidedAtdatetimevereist
commentstringoptioneel
max. 2000 tekensDefault: nullnullable
viastringoptioneel
portalemail_token
Default: "portal"
statusstringvereist
waiting_resolutionpendingapprovedrejectedskippedescalated
read-only
resolvedAtdatetimeoptioneel
Default: nullnullable
slaDeadlinedatetimeoptioneel
Default: nullnullable
skipReasonstringoptioneel
max. 200 tekensDefault: nullnullable
slaHoursnumberoptioneel
≥ 0Default: nullnullable
remindedAtdatetimeoptioneel
Default: nullnullable
currentApprovalStepIndexnumberoptioneel

-1 when no approval is in flight (draft, approved+, terminal states).

Default: -1read-only
currentStepSlaDeadlinedatetimeoptioneel

Top-level mirror of approvalSteps[currentApprovalStepIndex].slaDeadline. Exists so the generic escalation engine (ADR 0085) can filter on a plain field. Server-maintained; clients must not write it.

Default: nullread-onlynullable
relatedTicketIdstringoptioneel

Ticket created for manual_ticket fulfillment. Status-sync back on ticket close.

PatternDefault: nullread-onlynullable
fulfillmentLogobject[]optioneel

State-machine audit trail (timestamp + actor + transition + note).

Default: []read-only
atdatetimevereist
actorUserIdstringoptioneel
PatternDefault: nullnullable
transitionstringvereist
max. 100 tekens
notestringoptioneel
max. 2000 tekensDefault: nullnullable
fulfillmentAutomationobjectoptioneel

Automation run that fulfils this request (fulfillmentType automation, ADR 1222). Server-maintained: set when the run is started after approval, updated by the worker when the run completes or fails. Clients must not write it.

Default: nullread-onlynullable
rejectionReasonstringoptioneel
max. 2000 tekensDefault: nullnullable
cancelledReasonstringoptioneel
max. 2000 tekensDefault: nullnullable
costCenterstringoptioneel
max. 100 tekensDefault: nullnullable

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

Zoeken