Service Request Schema
Campos
Service Request Schema
A concrete service-catalog request from a customer portal user. Carries the formData payload, an embedded resolved approval chain and a status machine.
requestNumber
Sequence-generated number like "SR-2026-00042". Server-assigned.
catalogItemTitleSnapshot
Title copied at submission so audit reflects the item state at that time.
requesterPersonPartyId
PERSON party of the submitter (always set).
requesterUserId
Convenience cache: better-auth user-id of the requester. May be null for offline-created records.
beneficiaryPersonPartyId
When the request is on behalf of another colleague. null = requester is the beneficiary.
formData
Form payload, validated against the catalog item's formSchema at submit time.
status
draftpending_approvalapprovedin_fulfillmentdonerejectedcancelledapprovalSteps
Embedded resolved approval steps, snapshot from the catalog item at submission. Index-aligned with currentApprovalStepIndex.
index
approverDsl
mode
one_ofall_ofconditions
addressedUserIds
status
waiting_resolutionpendingapprovedrejectedskippedescalatedresolvedAt
slaDeadline
skipReason
slaHours
remindedAt
currentApprovalStepIndex
-1 when no approval is in flight (draft, approved+, terminal states).
currentStepSlaDeadline
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.
fulfillmentLog
State-machine audit trail (timestamp + actor + transition + note).
actorUserId
transition
note
fulfillmentAutomation
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.
rejectionReason
cancelledReason
costCenter
Ningún campo coincide con el filtro.
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_requests— Lista, paginada y filtrableGET /api/v1/service_requests/<id>— Una entidadPOST /api/v1/service_requests— CrearPATCH /api/v1/service_requests/<id>— Actualización parcialDELETE /api/v1/service_requests/<id>— Eliminación lógicaGET /api/v1/service_requests/<id>/timeline— Auditoría y actividades