API · v1 · stable
CODEMETA OSDeveloper Center
EN
Open console
Entity · service_requests

Service Request Schema

Schema ID
service_request
Collection
service_requests
Permissions
  • Readservice_request_view
  • Createadmin_bypass
  • Editadmin_bypass
  • Deleteadmin_bypass
Relationships

Fields

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.

requestNumberstringoptional

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

max 50 charactersDefault: nullread-onlynullable
catalogItemIduuidrequired
catalogItemTitleSnapshotstringoptional

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

max 200 charactersDefault: nullread-onlynullable
customerPartyIduuidrequired
requesterPersonPartyIduuidrequired

PERSON party of the submitter (always set).

requesterUserIdstringoptional

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

PatternDefault: nullread-onlynullable
beneficiaryPersonPartyIdstringoptional

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

PatternDefault: nullnullable
formDataobjectoptional

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

Default: {}
statusstringoptional
draftpending_approvalapprovedin_fulfillmentdonerejectedcancelled
Default: "draft"read-only
approvalStepsobject[]optional

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

Default: []read-only
indexnumberrequired
≥ 0
approverDslstringrequired
1–1000 characters
modestringrequired
one_ofall_of
conditionsobject[]optional
Default: []
addressedUserIdsuuid[]required
Default: []
decisionsobject[]required
Default: []
userIduuidrequired
decisionstringrequired
approvereject
decidedAtdatetimerequired
commentstringoptional
max 2000 charactersDefault: nullnullable
viastringoptional
portalemail_token
Default: "portal"
statusstringrequired
waiting_resolutionpendingapprovedrejectedskippedescalated
read-only
resolvedAtdatetimeoptional
Default: nullnullable
slaDeadlinedatetimeoptional
Default: nullnullable
skipReasonstringoptional
max 200 charactersDefault: nullnullable
slaHoursnumberoptional
≥ 0Default: nullnullable
remindedAtdatetimeoptional
Default: nullnullable
currentApprovalStepIndexnumberoptional

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

Default: -1read-only
currentStepSlaDeadlinedatetimeoptional

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
relatedTicketIdstringoptional

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

PatternDefault: nullread-onlynullable
fulfillmentLogobject[]optional

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

Default: []read-only
atdatetimerequired
actorUserIdstringoptional
PatternDefault: nullnullable
transitionstringrequired
max 100 characters
notestringoptional
max 2000 charactersDefault: nullnullable
fulfillmentAutomationobjectoptional

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
rejectionReasonstringoptional
max 2000 charactersDefault: nullnullable
cancelledReasonstringoptional
max 2000 charactersDefault: nullnullable
costCenterstringoptional
max 100 charactersDefault: nullnullable

Standard endpoints

This resource follows the platform's generic CRUD contract. Read the conventions for pagination, idempotency, optimistic locking and audit. The most important endpoints:

  • GET /api/v1/service_requests — List, paginated + filterable
  • GET /api/v1/service_requests/<id> — Single entity
  • POST /api/v1/service_requests — Create
  • PATCH /api/v1/service_requests/<id> — Partial update
  • DELETE /api/v1/service_requests/<id> — Soft delete
  • GET /api/v1/service_requests/<id>/timeline — Audit + activities

Search