API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · service_requests

Service Request Schema

ID du schéma
service_request
Collection
service_requests
Autorisations
  • Lireservice_request_view
  • Créeradmin_bypass
  • Modifieradmin_bypass
  • Supprimeradmin_bypass
Relations

Champs

Service Request Schema

service_requests4 autorisations

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

requestNumberstringfacultatif

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

max. 50 caractèresPar défaut : nulllecture seulenullable
catalogItemIduuidobligatoire
catalogItemTitleSnapshotstringfacultatif

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

max. 200 caractèresPar défaut : nulllecture seulenullable
customerPartyIduuidobligatoire
requesterPersonPartyIduuidobligatoire

PERSON party of the submitter (always set).

requesterUserIdstringfacultatif

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

MotifPar défaut : nulllecture seulenullable
beneficiaryPersonPartyIdstringfacultatif

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

MotifPar défaut : nullnullable
formDataobjectfacultatif

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

Par défaut : {}
statusstringfacultatif
draftpending_approvalapprovedin_fulfillmentdonerejectedcancelled
Par défaut : "draft"lecture seule
approvalStepsobject[]facultatif

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

Par défaut : []lecture seule
indexnumberobligatoire
≥ 0
approverDslstringobligatoire
1–1000 caractères
modestringobligatoire
one_ofall_of
conditionsobject[]facultatif
Par défaut : []
addressedUserIdsuuid[]obligatoire
Par défaut : []
decisionsobject[]obligatoire
Par défaut : []
userIduuidobligatoire
decisionstringobligatoire
approvereject
decidedAtdatetimeobligatoire
commentstringfacultatif
max. 2000 caractèresPar défaut : nullnullable
viastringfacultatif
portalemail_token
Par défaut : "portal"
statusstringobligatoire
waiting_resolutionpendingapprovedrejectedskippedescalated
lecture seule
resolvedAtdatetimefacultatif
Par défaut : nullnullable
slaDeadlinedatetimefacultatif
Par défaut : nullnullable
skipReasonstringfacultatif
max. 200 caractèresPar défaut : nullnullable
slaHoursnumberfacultatif
≥ 0Par défaut : nullnullable
remindedAtdatetimefacultatif
Par défaut : nullnullable
currentApprovalStepIndexnumberfacultatif

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

Par défaut : -1lecture seule
currentStepSlaDeadlinedatetimefacultatif

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.

Par défaut : nulllecture seulenullable
relatedTicketIdstringfacultatif

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

MotifPar défaut : nulllecture seulenullable
fulfillmentLogobject[]facultatif

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

Par défaut : []lecture seule
atdatetimeobligatoire
actorUserIdstringfacultatif
MotifPar défaut : nullnullable
transitionstringobligatoire
max. 100 caractères
notestringfacultatif
max. 2000 caractèresPar défaut : nullnullable
fulfillmentAutomationobjectfacultatif

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.

Par défaut : nulllecture seulenullable
rejectionReasonstringfacultatif
max. 2000 caractèresPar défaut : nullnullable
cancelledReasonstringfacultatif
max. 2000 caractèresPar défaut : nullnullable
costCenterstringfacultatif
max. 100 caractèresPar défaut : nullnullable

Endpoints standard

Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :

  • GET /api/v1/service_requests — Liste, paginée et filtrable
  • GET /api/v1/service_requests/<id> — Une entité
  • POST /api/v1/service_requests — Créer
  • PATCH /api/v1/service_requests/<id> — Mise à jour partielle
  • DELETE /api/v1/service_requests/<id> — Suppression logique
  • GET /api/v1/service_requests/<id>/timeline — Audit et activités

Recherche